diff --git a/librarian.yaml b/librarian.yaml index 1a538d4e020e..ed8adb00bfa3 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. language: nodejs -version: v0.24.0 +version: v0.25.0 repo: googleapis/google-cloud-node sources: googleapis: @@ -536,6 +536,14 @@ libraries: copyright_year: "2026" nodejs: default_version: v1 + - name: google-cloud-bigtable-api + version: 1.0.0 + apis: + - path: google/bigtable/v2 + - path: google/bigtable/admin/v2 + copyright_year: "2026" + nodejs: + package_name: '@google-cloud/bigtable-api' - name: google-cloud-billing version: 5.1.2 apis: diff --git a/packages/google-cloud-bigtable-api/.gitignore b/packages/google-cloud-bigtable-api/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/google-cloud-bigtable-api/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-bigtable-api/.jsdoc.js b/packages/google-cloud-bigtable-api/.jsdoc.js new file mode 100644 index 000000000000..9d9f8a904e80 --- /dev/null +++ b/packages/google-cloud-bigtable-api/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2026 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/bigtable-api', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-bigtable-api/.nycrc b/packages/google-cloud-bigtable-api/.nycrc new file mode 100644 index 000000000000..81a95fc94b00 --- /dev/null +++ b/packages/google-cloud-bigtable-api/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/packages/google-cloud-bigtable-api/.repo-metadata.json b/packages/google-cloud-bigtable-api/.repo-metadata.json new file mode 100644 index 000000000000..2249d0462795 --- /dev/null +++ b/packages/google-cloud-bigtable-api/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_description": "API for reading and writing the contents of Bigtable tables associated with\na Google Cloud project.", + "api_id": "bigtable.googleapis.com", + "api_shortname": "bigtable", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/bigtable-api/latest", + "default_version": "v2", + "distribution_name": "@google-cloud/bigtable-api", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=187206&template=0", + "language": "nodejs", + "library_type": "GAPIC_AUTO", + "name": "bigtable", + "name_pretty": "Cloud Bigtable", + "product_documentation": "https://cloud.google.com/bigtable/docs", + "release_level": "stable", + "repo": "googleapis/google-cloud-node" +} \ No newline at end of file diff --git a/packages/google-cloud-bigtable-api/README.md b/packages/google-cloud-bigtable-api/README.md new file mode 100644 index 000000000000..ee7dacfc8168 --- /dev/null +++ b/packages/google-cloud-bigtable-api/README.md @@ -0,0 +1,108 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Cloud Bigtable Admin API: Nodejs Client][homepage] + +[//]: # "releaseLevel" + +[![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable-api.svg)](https://www.npmjs.org/package/@google-cloud/bigtable-api) + +Cloud Bigtable Admin API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Cloud Bigtable Admin API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/admin/latest) +* [Cloud Bigtable Admin API Documentation](https://cloud.google.com/bigtable/docs/overview) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Bigtable Admin API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/bigtable-api +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +[//]: # "samples" + +## Supported Node.js Versions + +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 +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/bigtable-api@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigtableadmin.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-bigtable-admin/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-bigtable-admin/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-bigtable-admin diff --git a/packages/google-cloud-bigtable-api/package.json b/packages/google-cloud-bigtable-api/package.json new file mode 100644 index 000000000000..c626740a259a --- /dev/null +++ b/packages/google-cloud-bigtable-api/package.json @@ -0,0 +1,63 @@ +{ + "name": "@google-cloud/bigtable-api", + "version": "0.1.0", + "description": "Admin client for Node.js", + "repository": { + "type": "git", + "directory": "packages/google-cloud-bigtable-api", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google admin", + "admin", + "bigtable instance admin", + "bigtable table admin" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha --config ../../.mocharc.cjs --no-parallel build/system-test", + "test": "c8 mocha --config ../../.mocharc.cjs build/test" + }, + "dependencies": { + "google-gax": "^5.1.1-rc.1" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.18.12", + "@types/sinon": "^20.0.0", + "c8": "^10.1.3", + "gapic-tools": "^1.0.3", + "gts": "^6.0.2", + "jsdoc": "^4.0.5", + "jsdoc-fresh": "^5.0.2", + "jsdoc-region-tag": "^4.0.1", + "mocha": "^11.7.4", + "pack-n-play": "^4.2.1", + "typescript": "5.8.3", + "sinon": "^20.0.0" + }, + "engines": { + "node": ">=18" + } +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto new file mode 100644 index 000000000000..a800f990da0b --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto @@ -0,0 +1,1137 @@ +// Copyright 2025 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.admin.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/bigtable/admin/v2/instance.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "BigtableInstanceAdminProto"; +option java_package = "com.google.bigtable.admin.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; +option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; + +// Service for creating, configuring, and deleting Cloud Bigtable Instances and +// Clusters. Provides access to the Instance and Cluster schemas only, not the +// tables' metadata or data stored in those tables. +service BigtableInstanceAdmin { + option (google.api.default_host) = "bigtableadmin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigtable.admin," + "https://www.googleapis.com/auth/bigtable.admin.cluster," + "https://www.googleapis.com/auth/bigtable.admin.instance," + "https://www.googleapis.com/auth/cloud-bigtable.admin," + "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Create an instance within a project. + // + // Note that exactly one of Cluster.serve_nodes and + // Cluster.cluster_config.cluster_autoscaling_config can be set. If + // serve_nodes is set to non-zero, then the cluster is manually scaled. If + // cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + // enabled. + rpc CreateInstance(CreateInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/instances" + body: "*" + }; + option (google.api.method_signature) = + "parent,instance_id,instance,clusters"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "CreateInstanceMetadata" + }; + } + + // Gets information about an instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists information about instances in a project. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/instances" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an instance within a project. This method updates only the display + // name and type for an Instance. To update other Instance properties, such as + // labels, use PartialUpdateInstance. + rpc UpdateInstance(Instance) returns (Instance) { + option (google.api.http) = { + put: "/v2/{name=projects/*/instances/*}" + body: "*" + }; + } + + // Partially updates an instance within a project. This method can modify all + // fields of an Instance and is the preferred way to update an Instance. + rpc PartialUpdateInstance(PartialUpdateInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{instance.name=projects/*/instances/*}" + body: "instance" + }; + option (google.api.method_signature) = "instance,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "UpdateInstanceMetadata" + }; + } + + // Delete an instance from a project. + rpc DeleteInstance(DeleteInstanceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a cluster within an instance. + // + // Note that exactly one of Cluster.serve_nodes and + // Cluster.cluster_config.cluster_autoscaling_config can be set. If + // serve_nodes is set to non-zero, then the cluster is manually scaled. If + // cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + // enabled. + rpc CreateCluster(CreateClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/clusters" + body: "cluster" + }; + option (google.api.method_signature) = "parent,cluster_id,cluster"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "CreateClusterMetadata" + }; + } + + // Gets information about a cluster. + rpc GetCluster(GetClusterRequest) returns (Cluster) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/clusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists information about clusters in an instance. + rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*}/clusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a cluster within an instance. + // + // Note that UpdateCluster does not support updating + // cluster_config.cluster_autoscaling_config. In order to update it, you + // must use PartialUpdateCluster. + rpc UpdateCluster(Cluster) returns (google.longrunning.Operation) { + option (google.api.http) = { + put: "/v2/{name=projects/*/instances/*/clusters/*}" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "UpdateClusterMetadata" + }; + } + + // Partially updates a cluster within a project. This method is the preferred + // way to update a Cluster. + // + // To enable and update autoscaling, set + // cluster_config.cluster_autoscaling_config. When autoscaling is enabled, + // serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it + // are ignored. Note that an update cannot simultaneously set serve_nodes to + // non-zero and cluster_config.cluster_autoscaling_config to non-empty, and + // also specify both in the update_mask. + // + // To disable autoscaling, clear cluster_config.cluster_autoscaling_config, + // and explicitly set a serve_node count via the update_mask. + rpc PartialUpdateCluster(PartialUpdateClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{cluster.name=projects/*/instances/*/clusters/*}" + body: "cluster" + }; + option (google.api.method_signature) = "cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "PartialUpdateClusterMetadata" + }; + } + + // Deletes a cluster from an instance. + rpc DeleteCluster(DeleteClusterRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/clusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an app profile within an instance. + rpc CreateAppProfile(CreateAppProfileRequest) returns (AppProfile) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/appProfiles" + body: "app_profile" + }; + option (google.api.method_signature) = "parent,app_profile_id,app_profile"; + } + + // Gets information about an app profile. + rpc GetAppProfile(GetAppProfileRequest) returns (AppProfile) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/appProfiles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists information about app profiles in an instance. + rpc ListAppProfiles(ListAppProfilesRequest) + returns (ListAppProfilesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*}/appProfiles" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an app profile within an instance. + rpc UpdateAppProfile(UpdateAppProfileRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}" + body: "app_profile" + }; + option (google.api.method_signature) = "app_profile,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AppProfile" + metadata_type: "UpdateAppProfileMetadata" + }; + } + + // Deletes an app profile from an instance. + rpc DeleteAppProfile(DeleteAppProfileRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/appProfiles/*}" + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,ignore_warnings"; + } + + // Gets the access control policy for an instance resource. Returns an empty + // policy if an instance exists but does not have a policy set. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/materializedViews/*}:getIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/logicalViews/*}:getIamPolicy" + body: "*" + } + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the access control policy on an instance resource. Replaces any + // existing policy. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/materializedViews/*}:setIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/logicalViews/*}:setIamPolicy" + body: "*" + } + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Returns permissions that the caller has on the specified instance resource. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/materializedViews/*}:testIamPermissions" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/logicalViews/*}:testIamPermissions" + body: "*" + } + }; + option (google.api.method_signature) = "resource,permissions"; + } + + // Lists hot tablets in a cluster, within the time range provided. Hot + // tablets are ordered based on CPU usage. + rpc ListHotTablets(ListHotTabletsRequest) returns (ListHotTabletsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a logical view within an instance. + rpc CreateLogicalView(CreateLogicalViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/logicalViews" + body: "logical_view" + }; + option (google.api.method_signature) = + "parent,logical_view,logical_view_id"; + option (google.longrunning.operation_info) = { + response_type: "LogicalView" + metadata_type: "CreateLogicalViewMetadata" + }; + } + + // Gets information about a logical view. + rpc GetLogicalView(GetLogicalViewRequest) returns (LogicalView) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/logicalViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists information about logical views in an instance. + rpc ListLogicalViews(ListLogicalViewsRequest) + returns (ListLogicalViewsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*}/logicalViews" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a logical view within an instance. + rpc UpdateLogicalView(UpdateLogicalViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{logical_view.name=projects/*/instances/*/logicalViews/*}" + body: "logical_view" + }; + option (google.api.method_signature) = "logical_view,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "LogicalView" + metadata_type: "UpdateLogicalViewMetadata" + }; + } + + // Deletes a logical view from an instance. + rpc DeleteLogicalView(DeleteLogicalViewRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/logicalViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a materialized view within an instance. + rpc CreateMaterializedView(CreateMaterializedViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/materializedViews" + body: "materialized_view" + }; + option (google.api.method_signature) = + "parent,materialized_view,materialized_view_id"; + option (google.longrunning.operation_info) = { + response_type: "MaterializedView" + metadata_type: "CreateMaterializedViewMetadata" + }; + } + + // Gets information about a materialized view. + rpc GetMaterializedView(GetMaterializedViewRequest) + returns (MaterializedView) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/materializedViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists information about materialized views in an instance. + rpc ListMaterializedViews(ListMaterializedViewsRequest) + returns (ListMaterializedViewsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*}/materializedViews" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a materialized view within an instance. + rpc UpdateMaterializedView(UpdateMaterializedViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{materialized_view.name=projects/*/instances/*/materializedViews/*}" + body: "materialized_view" + }; + option (google.api.method_signature) = "materialized_view,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MaterializedView" + metadata_type: "UpdateMaterializedViewMetadata" + }; + } + + // Deletes a materialized view from an instance. + rpc DeleteMaterializedView(DeleteMaterializedViewRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/materializedViews/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for BigtableInstanceAdmin.CreateInstance. +message CreateInstanceRequest { + // Required. The unique name of the project in which to create the new + // instance. Values are of the form `projects/{project}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The ID to be used when referring to the new instance within its + // project, e.g., just `myinstance` rather than + // `projects/myproject/instances/myinstance`. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The instance to create. + // Fields marked `OutputOnly` must be left blank. + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The clusters to be created within the instance, mapped by desired + // cluster ID, e.g., just `mycluster` rather than + // `projects/myproject/instances/myinstance/clusters/mycluster`. + // Fields marked `OutputOnly` must be left blank. + map clusters = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BigtableInstanceAdmin.GetInstance. +message GetInstanceRequest { + // Required. The unique name of the requested instance. Values are of the form + // `projects/{project}/instances/{instance}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; +} + +// Request message for BigtableInstanceAdmin.ListInstances. +message ListInstancesRequest { + // Required. The unique name of the project for which a list of instances is + // requested. Values are of the form `projects/{project}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // DEPRECATED: This field is unused and ignored. + string page_token = 2; +} + +// Response message for BigtableInstanceAdmin.ListInstances. +message ListInstancesResponse { + // The list of requested instances. + repeated Instance instances = 1; + + // Locations from which Instance information could not be retrieved, + // due to an outage or some other transient condition. + // Instances whose Clusters are all in one of the failed locations + // may be missing from `instances`, and Instances with at least one + // Cluster in a failed location may only have partial information returned. + // Values are of the form `projects//locations/` + repeated string failed_locations = 2; + + // DEPRECATED: This field is unused and ignored. + string next_page_token = 3; +} + +// Request message for BigtableInstanceAdmin.PartialUpdateInstance. +message PartialUpdateInstanceRequest { + // Required. The Instance which will (partially) replace the current value. + Instance instance = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The subset of Instance fields which should be replaced. + // Must be explicitly set. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BigtableInstanceAdmin.DeleteInstance. +message DeleteInstanceRequest { + // Required. The unique name of the instance to be deleted. + // Values are of the form `projects/{project}/instances/{instance}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; +} + +// Request message for BigtableInstanceAdmin.CreateCluster. +message CreateClusterRequest { + // Required. The unique name of the instance in which to create the new + // cluster. Values are of the form `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The ID to be used when referring to the new cluster within its + // instance, e.g., just `mycluster` rather than + // `projects/myproject/instances/myinstance/clusters/mycluster`. + string cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The cluster to be created. + // Fields marked `OutputOnly` must be left blank. + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BigtableInstanceAdmin.GetCluster. +message GetClusterRequest { + // Required. The unique name of the requested cluster. Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Cluster" + } + ]; +} + +// Request message for BigtableInstanceAdmin.ListClusters. +message ListClustersRequest { + // Required. The unique name of the instance for which a list of clusters is + // requested. Values are of the form + // `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list + // Clusters for all Instances in a project, e.g., + // `projects/myproject/instances/-`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // DEPRECATED: This field is unused and ignored. + string page_token = 2; +} + +// Response message for BigtableInstanceAdmin.ListClusters. +message ListClustersResponse { + // The list of requested clusters. + repeated Cluster clusters = 1; + + // Locations from which Cluster information could not be retrieved, + // due to an outage or some other transient condition. + // Clusters from these locations may be missing from `clusters`, + // or may only have partial information returned. + // Values are of the form `projects//locations/` + repeated string failed_locations = 2; + + // DEPRECATED: This field is unused and ignored. + string next_page_token = 3; +} + +// Request message for BigtableInstanceAdmin.DeleteCluster. +message DeleteClusterRequest { + // Required. The unique name of the cluster to be deleted. Values are of the + // form `projects/{project}/instances/{instance}/clusters/{cluster}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Cluster" + } + ]; +} + +// The metadata for the Operation returned by CreateInstance. +message CreateInstanceMetadata { + // The request that prompted the initiation of this CreateInstance operation. + CreateInstanceRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// The metadata for the Operation returned by UpdateInstance. +message UpdateInstanceMetadata { + // The request that prompted the initiation of this UpdateInstance operation. + PartialUpdateInstanceRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// The metadata for the Operation returned by CreateCluster. +message CreateClusterMetadata { + // Progress info for copying a table's data to the new cluster. + message TableProgress { + enum State { + STATE_UNSPECIFIED = 0; + + // The table has not yet begun copying to the new cluster. + PENDING = 1; + + // The table is actively being copied to the new cluster. + COPYING = 2; + + // The table has been fully copied to the new cluster. + COMPLETED = 3; + + // The table was deleted before it finished copying to the new cluster. + // Note that tables deleted after completion will stay marked as + // COMPLETED, not CANCELLED. + CANCELLED = 4; + } + + // Estimate of the size of the table to be copied. + int64 estimated_size_bytes = 2; + + // Estimate of the number of bytes copied so far for this table. + // This will eventually reach 'estimated_size_bytes' unless the table copy + // is CANCELLED. + int64 estimated_copied_bytes = 3; + + State state = 4; + } + + // The request that prompted the initiation of this CreateCluster operation. + CreateClusterRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; + + // Keys: the full `name` of each table that existed in the instance when + // CreateCluster was first called, i.e. + // `projects//instances//tables/`. Any table added + // to the instance by a later API call will be created in the new cluster by + // that API call, not this one. + // + // Values: information on how much of a table's data has been copied to the + // newly-created cluster so far. + map tables = 4; +} + +// The metadata for the Operation returned by UpdateCluster. +message UpdateClusterMetadata { + // The request that prompted the initiation of this UpdateCluster operation. + Cluster original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// The metadata for the Operation returned by PartialUpdateCluster. +message PartialUpdateClusterMetadata { + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 1; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 2; + + // The original request for PartialUpdateCluster. + PartialUpdateClusterRequest original_request = 3; +} + +// Request message for BigtableInstanceAdmin.PartialUpdateCluster. +message PartialUpdateClusterRequest { + // Required. The Cluster which contains the partial updates to be applied, + // subject to the update_mask. + Cluster cluster = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The subset of Cluster fields which should be replaced. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BigtableInstanceAdmin.CreateAppProfile. +message CreateAppProfileRequest { + // Required. The unique name of the instance in which to create the new app + // profile. Values are of the form `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The ID to be used when referring to the new app profile within + // its instance, e.g., just `myprofile` rather than + // `projects/myproject/instances/myinstance/appProfiles/myprofile`. + string app_profile_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The app profile to be created. + // Fields marked `OutputOnly` will be ignored. + AppProfile app_profile = 3 [(google.api.field_behavior) = REQUIRED]; + + // If true, ignore safety checks when creating the app profile. + bool ignore_warnings = 4; +} + +// Request message for BigtableInstanceAdmin.GetAppProfile. +message GetAppProfileRequest { + // Required. The unique name of the requested app profile. Values are of the + // form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AppProfile" + } + ]; +} + +// Request message for BigtableInstanceAdmin.ListAppProfiles. +message ListAppProfilesRequest { + // Required. The unique name of the instance for which a list of app profiles + // is requested. Values are of the form + // `projects/{project}/instances/{instance}`. + // Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + // e.g., `projects/myproject/instances/-`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Maximum number of results per page. + // + // A page_size of zero lets the server choose the number of items to return. + // A page_size which is strictly positive will return at most that many items. + // A negative page_size will cause an error. + // + // Following the first request, subsequent paginated calls are not required + // to pass a page_size. If a page_size is set in subsequent calls, it must + // match the page_size given in the first request. + int32 page_size = 3; + + // The value of `next_page_token` returned by a previous call. + string page_token = 2; +} + +// Response message for BigtableInstanceAdmin.ListAppProfiles. +message ListAppProfilesResponse { + // The list of requested app profiles. + repeated AppProfile app_profiles = 1; + + // Set if not all app profiles could be returned in a single response. + // Pass this value to `page_token` in another request to get the next + // page of results. + string next_page_token = 2; + + // Locations from which AppProfile information could not be retrieved, + // due to an outage or some other transient condition. + // AppProfiles from these locations may be missing from `app_profiles`. + // Values are of the form `projects//locations/` + repeated string failed_locations = 3; +} + +// Request message for BigtableInstanceAdmin.UpdateAppProfile. +message UpdateAppProfileRequest { + // Required. The app profile which will (partially) replace the current value. + AppProfile app_profile = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The subset of app profile fields which should be replaced. + // If unset, all fields will be replaced. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // If true, ignore safety checks when updating the app profile. + bool ignore_warnings = 3; +} + +// Request message for BigtableInstanceAdmin.DeleteAppProfile. +message DeleteAppProfileRequest { + // Required. The unique name of the app profile to be deleted. Values are of + // the form + // `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AppProfile" + } + ]; + + // Required. If true, ignore safety checks when deleting the app profile. + bool ignore_warnings = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by UpdateAppProfile. +message UpdateAppProfileMetadata {} + +// Request message for BigtableInstanceAdmin.ListHotTablets. +message ListHotTabletsRequest { + // Required. The cluster name to list hot tablets. + // Value is in the following form: + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Cluster" + } + ]; + + // The start time to list hot tablets. The hot tablets in the response will + // have start times between the requested start time and end time. Start time + // defaults to Now if it is unset, and end time defaults to Now - 24 hours if + // it is unset. The start time should be less than the end time, and the + // maximum allowed time range between start time and end time is 48 hours. + // Start time and end time should have values between Now and Now - 14 days. + google.protobuf.Timestamp start_time = 2; + + // The end time to list hot tablets. + google.protobuf.Timestamp end_time = 3; + + // Maximum number of results per page. + // + // A page_size that is empty or zero lets the server choose the number of + // items to return. A page_size which is strictly positive will return at most + // that many items. A negative page_size will cause an error. + // + // Following the first request, subsequent paginated calls do not need a + // page_size field. If a page_size is set in subsequent calls, it must match + // the page_size given in the first request. + int32 page_size = 4; + + // The value of `next_page_token` returned by a previous call. + string page_token = 5; +} + +// Response message for BigtableInstanceAdmin.ListHotTablets. +message ListHotTabletsResponse { + // List of hot tablets in the tables of the requested cluster that fall + // within the requested time range. Hot tablets are ordered by node cpu usage + // percent. If there are multiple hot tablets that correspond to the same + // tablet within a 15-minute interval, only the hot tablet with the highest + // node cpu usage will be included in the response. + repeated HotTablet hot_tablets = 1; + + // Set if not all hot tablets could be returned in a single response. + // Pass this value to `page_token` in another request to get the next + // page of results. + string next_page_token = 2; +} + +// Request message for BigtableInstanceAdmin.CreateLogicalView. +message CreateLogicalViewRequest { + // Required. The parent instance where this logical view will be created. + // Format: `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The ID to use for the logical view, which will become the final + // component of the logical view's resource name. + string logical_view_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The logical view to create. + LogicalView logical_view = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by CreateLogicalView. +message CreateLogicalViewMetadata { + // The request that prompted the initiation of this CreateLogicalView + // operation. + CreateLogicalViewRequest original_request = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for BigtableInstanceAdmin.GetLogicalView. +message GetLogicalViewRequest { + // Required. The unique name of the requested logical view. Values are of the + // form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/LogicalView" + } + ]; +} + +// Request message for BigtableInstanceAdmin.ListLogicalViews. +message ListLogicalViewsRequest { + // Required. The unique name of the instance for which the list of logical + // views is requested. Values are of the form + // `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/LogicalView" + } + ]; + + // Optional. The maximum number of logical views to return. The service may + // return fewer than this value + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListLogicalViews` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListLogicalViews` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for BigtableInstanceAdmin.ListLogicalViews. +message ListLogicalViewsResponse { + // The list of requested logical views. + repeated LogicalView logical_views = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for BigtableInstanceAdmin.UpdateLogicalView. +message UpdateLogicalViewRequest { + // Required. The logical view to update. + // + // The logical view's `name` field is used to identify the view to update. + // Format: + // `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + LogicalView logical_view = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The metadata for the Operation returned by UpdateLogicalView. +message UpdateLogicalViewMetadata { + // The request that prompted the initiation of this UpdateLogicalView + // operation. + UpdateLogicalViewRequest original_request = 1; + + // The time at which this operation was started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for BigtableInstanceAdmin.DeleteLogicalView. +message DeleteLogicalViewRequest { + // Required. The unique name of the logical view to be deleted. + // Format: + // `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/LogicalView" + } + ]; + + // Optional. The current etag of the logical view. + // If an etag is provided and does not match the current etag of the + // logical view, deletion will be blocked and an ABORTED error will be + // returned. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for BigtableInstanceAdmin.CreateMaterializedView. +message CreateMaterializedViewRequest { + // Required. The parent instance where this materialized view will be created. + // Format: `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The ID to use for the materialized view, which will become the + // final component of the materialized view's resource name. + string materialized_view_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The materialized view to create. + MaterializedView materialized_view = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by CreateMaterializedView. +message CreateMaterializedViewMetadata { + // The request that prompted the initiation of this CreateMaterializedView + // operation. + CreateMaterializedViewRequest original_request = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for BigtableInstanceAdmin.GetMaterializedView. +message GetMaterializedViewRequest { + // Required. The unique name of the requested materialized view. Values are of + // the form + // `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; +} + +// Request message for BigtableInstanceAdmin.ListMaterializedViews. +message ListMaterializedViewsRequest { + // Required. The unique name of the instance for which the list of + // materialized views is requested. Values are of the form + // `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; + + // Optional. The maximum number of materialized views to return. The service + // may return fewer than this value + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListMaterializedViews` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMaterializedViews` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for BigtableInstanceAdmin.ListMaterializedViews. +message ListMaterializedViewsResponse { + // The list of requested materialized views. + repeated MaterializedView materialized_views = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for BigtableInstanceAdmin.UpdateMaterializedView. +message UpdateMaterializedViewRequest { + // Required. The materialized view to update. + // + // The materialized view's `name` field is used to identify the view to + // update. Format: + // `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + MaterializedView materialized_view = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The metadata for the Operation returned by UpdateMaterializedView. +message UpdateMaterializedViewMetadata { + // The request that prompted the initiation of this UpdateMaterializedView + // operation. + UpdateMaterializedViewRequest original_request = 1; + + // The time at which this operation was started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for BigtableInstanceAdmin.DeleteMaterializedView. +message DeleteMaterializedViewRequest { + // Required. The unique name of the materialized view to be deleted. + // Format: + // `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; + + // Optional. The current etag of the materialized view. + // If an etag is provided and does not match the current etag of the + // materialized view, deletion will be blocked and an ABORTED error will be + // returned. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/bigtable_table_admin.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/bigtable_table_admin.proto new file mode 100644 index 000000000000..6267fa90973b --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -0,0 +1,1660 @@ +// Copyright 2025 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.admin.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/bigtable/admin/v2/common.proto"; +import "google/bigtable/admin/v2/table.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "BigtableTableAdminProto"; +option java_package = "com.google.bigtable.admin.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; +option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; + +// Service for creating, configuring, and deleting Cloud Bigtable tables. +// +// +// Provides access to the table schemas only, not the data stored within +// the tables. +service BigtableTableAdmin { + option (google.api.default_host) = "bigtableadmin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigtable.admin," + "https://www.googleapis.com/auth/bigtable.admin.table," + "https://www.googleapis.com/auth/cloud-bigtable.admin," + "https://www.googleapis.com/auth/cloud-bigtable.admin.table," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Creates a new table in the specified instance. + // The table can be created with a full set of initial column families, + // specified in the request. + rpc CreateTable(CreateTableRequest) returns (Table) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/tables" + body: "*" + }; + option (google.api.method_signature) = "parent,table_id,table"; + } + + // Creates a new table from the specified snapshot. The target table must + // not exist. The snapshot and the table must be in the same instance. + // + // Note: This is a private alpha release of Cloud Bigtable snapshots. This + // feature is not currently available to most Cloud Bigtable customers. This + // feature might be changed in backward-incompatible ways and is not + // recommended for production use. It is not subject to any SLA or deprecation + // policy. + rpc CreateTableFromSnapshot(CreateTableFromSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot" + body: "*" + }; + option (google.api.method_signature) = "parent,table_id,source_snapshot"; + option (google.longrunning.operation_info) = { + response_type: "Table" + metadata_type: "CreateTableFromSnapshotMetadata" + }; + } + + // Lists all tables served from a specified instance. + rpc ListTables(ListTablesRequest) returns (ListTablesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*}/tables" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets metadata information about the specified table. + rpc GetTable(GetTableRequest) returns (Table) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/tables/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a specified table. + rpc UpdateTable(UpdateTableRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{table.name=projects/*/instances/*/tables/*}" + body: "table" + }; + option (google.api.method_signature) = "table,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Table" + metadata_type: "UpdateTableMetadata" + }; + } + + // Permanently deletes a specified table and all of its data. + rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/tables/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Restores a specified table which was accidentally deleted. + rpc UndeleteTable(UndeleteTableRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*/tables/*}:undelete" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Table" + metadata_type: "UndeleteTableMetadata" + }; + } + + // Creates a new AuthorizedView in a table. + rpc CreateAuthorizedView(CreateAuthorizedViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews" + body: "authorized_view" + }; + option (google.api.method_signature) = + "parent,authorized_view,authorized_view_id"; + option (google.longrunning.operation_info) = { + response_type: "AuthorizedView" + metadata_type: "CreateAuthorizedViewMetadata" + }; + } + + // Lists all AuthorizedViews from a specific table. + rpc ListAuthorizedViews(ListAuthorizedViewsRequest) + returns (ListAuthorizedViewsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information from a specified AuthorizedView. + rpc GetAuthorizedView(GetAuthorizedViewRequest) returns (AuthorizedView) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an AuthorizedView in a table. + rpc UpdateAuthorizedView(UpdateAuthorizedViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}" + body: "authorized_view" + }; + option (google.api.method_signature) = "authorized_view,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AuthorizedView" + metadata_type: "UpdateAuthorizedViewMetadata" + }; + } + + // Permanently deletes a specified AuthorizedView. + rpc DeleteAuthorizedView(DeleteAuthorizedViewRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Performs a series of column family modifications on the specified table. + // Either all or none of the modifications will occur before this method + // returns, but data requests received prior to that point may see a table + // where only some modifications have taken effect. + rpc ModifyColumnFamilies(ModifyColumnFamiliesRequest) returns (Table) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies" + body: "*" + }; + option (google.api.method_signature) = "name,modifications"; + } + + // Permanently drop/delete a row range from a specified table. The request can + // specify whether to delete all rows in a table, or only those that match a + // particular prefix. + rpc DropRowRange(DropRowRangeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange" + body: "*" + }; + } + + // Generates a consistency token for a Table, which can be used in + // CheckConsistency to check whether mutations to the table that finished + // before this call started have been replicated. The tokens will be available + // for 90 days. + rpc GenerateConsistencyToken(GenerateConsistencyTokenRequest) + returns (GenerateConsistencyTokenResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Checks replication consistency based on a consistency token, that is, if + // replication has caught up based on the conditions specified in the token + // and the check request. + rpc CheckConsistency(CheckConsistencyRequest) + returns (CheckConsistencyResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency" + body: "*" + }; + option (google.api.method_signature) = "name,consistency_token"; + } + + // Creates a new snapshot in the specified cluster from the specified + // source table. The cluster and the table must be in the same instance. + // + // Note: This is a private alpha release of Cloud Bigtable snapshots. This + // feature is not currently available to most Cloud Bigtable customers. This + // feature might be changed in backward-incompatible ways and is not + // recommended for production use. It is not subject to any SLA or deprecation + // policy. + rpc SnapshotTable(SnapshotTableRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*/tables/*}:snapshot" + body: "*" + }; + option (google.api.method_signature) = + "name,cluster,snapshot_id,description"; + option (google.longrunning.operation_info) = { + response_type: "Snapshot" + metadata_type: "SnapshotTableMetadata" + }; + } + + // Gets metadata information about the specified snapshot. + // + // Note: This is a private alpha release of Cloud Bigtable snapshots. This + // feature is not currently available to most Cloud Bigtable customers. This + // feature might be changed in backward-incompatible ways and is not + // recommended for production use. It is not subject to any SLA or deprecation + // policy. + rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all snapshots associated with the specified cluster. + // + // Note: This is a private alpha release of Cloud Bigtable snapshots. This + // feature is not currently available to most Cloud Bigtable customers. This + // feature might be changed in backward-incompatible ways and is not + // recommended for production use. It is not subject to any SLA or deprecation + // policy. + rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots" + }; + option (google.api.method_signature) = "parent"; + } + + // Permanently deletes the specified snapshot. + // + // Note: This is a private alpha release of Cloud Bigtable snapshots. This + // feature is not currently available to most Cloud Bigtable customers. This + // feature might be changed in backward-incompatible ways and is not + // recommended for production use. It is not subject to any SLA or deprecation + // policy. + rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts creating a new Cloud Bigtable Backup. The returned backup + // [long-running operation][google.longrunning.Operation] can be used to + // track creation of the backup. The + // [metadata][google.longrunning.Operation.metadata] field type is + // [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The + // [response][google.longrunning.Operation.response] field type is + // [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the + // returned operation will stop the creation and delete the backup. + rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*/clusters/*}/backups" + body: "backup" + }; + option (google.api.method_signature) = "parent,backup_id,backup"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "CreateBackupMetadata" + }; + } + + // Gets metadata on a pending or completed Cloud Bigtable Backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/clusters/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a pending or completed Cloud Bigtable Backup. + rpc UpdateBackup(UpdateBackupRequest) returns (Backup) { + option (google.api.http) = { + patch: "/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + } + + // Deletes a pending or completed Cloud Bigtable backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/clusters/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Cloud Bigtable backups. Returns both completed and pending + // backups. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*/clusters/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new table by restoring from a completed backup. The + // returned table [long-running operation][google.longrunning.Operation] can + // be used to track the progress of the operation, and to cancel it. The + // [metadata][google.longrunning.Operation.metadata] field type is + // [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The + // [response][google.longrunning.Operation.response] type is + // [Table][google.bigtable.admin.v2.Table], if successful. + rpc RestoreTable(RestoreTableRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/tables:restore" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Table" + metadata_type: "RestoreTableMetadata" + }; + } + + // Copy a Cloud Bigtable backup to a new backup in the destination cluster + // located in the destination instance and project. + rpc CopyBackup(CopyBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*/clusters/*}/backups:copy" + body: "*" + }; + option (google.api.method_signature) = + "parent,backup_id,source_backup,expire_time"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "CopyBackupMetadata" + }; + } + + // Gets the access control policy for a Bigtable resource. + // Returns an empty policy if the resource exists but does not have a policy + // set. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:getIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:getIamPolicy" + body: "*" + } + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the access control policy on a Bigtable resource. + // Replaces any existing policy. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:setIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:setIamPolicy" + body: "*" + } + }; + option (google.api.method_signature) = "resource,policy"; + } + + // Returns permissions that the caller has on the specified Bigtable + // resource. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:testIamPermissions" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:testIamPermissions" + body: "*" + } + }; + option (google.api.method_signature) = "resource,permissions"; + } + + // Creates a new schema bundle in the specified table. + rpc CreateSchemaBundle(CreateSchemaBundleRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*/tables/*}/schemaBundles" + body: "schema_bundle" + }; + option (google.api.method_signature) = + "parent,schema_bundle_id,schema_bundle"; + option (google.longrunning.operation_info) = { + response_type: "SchemaBundle" + metadata_type: "CreateSchemaBundleMetadata" + }; + } + + // Updates a schema bundle in the specified table. + rpc UpdateSchemaBundle(UpdateSchemaBundleRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{schema_bundle.name=projects/*/instances/*/tables/*/schemaBundles/*}" + body: "schema_bundle" + }; + option (google.api.method_signature) = "schema_bundle,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "SchemaBundle" + metadata_type: "UpdateSchemaBundleMetadata" + }; + } + + // Gets metadata information about the specified schema bundle. + rpc GetSchemaBundle(GetSchemaBundleRequest) returns (SchemaBundle) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/tables/*/schemaBundles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all schema bundles associated with the specified table. + rpc ListSchemaBundles(ListSchemaBundlesRequest) + returns (ListSchemaBundlesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*/tables/*}/schemaBundles" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a schema bundle in the specified table. + rpc DeleteSchemaBundle(DeleteSchemaBundleRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/tables/*/schemaBundles/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// The request for +// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]. +message RestoreTableRequest { + // Required. The name of the instance in which to create the restored + // table. Values are of the form `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The id of the table to create and restore to. This + // table must not already exist. The `table_id` appended to + // `parent` forms the full table name of the form + // `projects//instances//tables/`. + string table_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The source from which to restore. + oneof source { + // Name of the backup from which to restore. Values are of the form + // `projects//instances//clusters//backups/`. + string backup = 3 [(google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Backup" + }]; + } +} + +// Metadata type for the long-running operation returned by +// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]. +message RestoreTableMetadata { + // Name of the table being created and restored to. + string name = 1; + + // The type of the restore source. + RestoreSourceType source_type = 2; + + // Information about the source used to restore the table, as specified by + // `source` in + // [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest]. + oneof source_info { + BackupInfo backup_info = 3; + } + + // If exists, the name of the long-running operation that will be used to + // track the post-restore optimization process to optimize the performance of + // the restored table. The metadata type of the long-running operation is + // [OptimizeRestoreTableMetadata][]. The response type is + // [Empty][google.protobuf.Empty]. This long-running operation may be + // automatically created by the system if applicable after the + // RestoreTable long-running operation completes successfully. This operation + // may not be created if the table is already optimized or the restore was + // not successful. + string optimize_table_operation_name = 4; + + // The progress of the + // [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] + // operation. + OperationProgress progress = 5; +} + +// Metadata type for the long-running operation used to track the progress +// of optimizations performed on a newly restored table. This long-running +// operation is automatically created by the system after the successful +// completion of a table restore, and cannot be cancelled. +message OptimizeRestoredTableMetadata { + // Name of the restored table being optimized. + string name = 1; + + // The progress of the post-restore optimizations. + OperationProgress progress = 2; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable] +message CreateTableRequest { + // An initial split point for a newly created table. + message Split { + // Row key to use as an initial tablet boundary. + bytes key = 1; + } + + // Required. The unique name of the instance in which to create the table. + // Values are of the form `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The name by which the new table should be referred to within the + // parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + // Maximum 50 characters. + string table_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Table to create. + Table table = 3 [(google.api.field_behavior) = REQUIRED]; + + // The optional list of row keys that will be used to initially split the + // table into several tablets (tablets are similar to HBase regions). + // Given two split keys, `s1` and `s2`, three tablets will be created, + // spanning the key ranges: `[, s1), [s1, s2), [s2, )`. + // + // Example: + // + // * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` + // `"other", "zz"]` + // * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` + // * Key assignment: + // - Tablet 1 `[, apple) => {"a"}.` + // - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + // - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + // - Tablet 4 `[customer_2, other) => {"customer_2"}.` + // - Tablet 5 `[other, ) => {"other", "zz"}.` + repeated Split initial_splits = 4; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot] +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message CreateTableFromSnapshotRequest { + // Required. The unique name of the instance in which to create the table. + // Values are of the form `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The name by which the new table should be referred to within the + // parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + string table_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The unique name of the snapshot from which to restore the table. + // The snapshot and the table must be in the same instance. Values are of the + // form + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + string source_snapshot = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Snapshot" + } + ]; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange] +message DropRowRangeRequest { + // Required. The unique name of the table on which to drop a range of rows. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Delete all rows or by prefix. + oneof target { + // Delete all rows that start with this row key prefix. Prefix cannot be + // zero length. + bytes row_key_prefix = 2; + + // Delete all rows in the table. Setting this to false is a no-op. + bool delete_all_data_from_table = 3; + } +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] +message ListTablesRequest { + // Required. The unique name of the instance for which tables should be + // listed. Values are of the form `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // The view to be applied to the returned tables' fields. + // NAME_ONLY view (default) and REPLICATION_VIEW are supported. + Table.View view = 2; + + // Maximum number of results per page. + // + // A page_size of zero lets the server choose the number of items to return. + // A page_size which is strictly positive will return at most that many items. + // A negative page_size will cause an error. + // + // Following the first request, subsequent paginated calls are not required + // to pass a page_size. If a page_size is set in subsequent calls, it must + // match the page_size given in the first request. + int32 page_size = 4; + + // The value of `next_page_token` returned by a previous call. + string page_token = 3; +} + +// Response message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] +message ListTablesResponse { + // The tables present in the requested instance. + repeated Table tables = 1; + + // Set if not all tables could be returned in a single response. + // Pass this value to `page_token` in another request to get the next + // page of results. + string next_page_token = 2; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable] +message GetTableRequest { + // Required. The unique name of the requested table. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // The view to be applied to the returned table's fields. + // Defaults to `SCHEMA_VIEW` if unspecified. + Table.View view = 2; +} + +// The request for +// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. +message UpdateTableRequest { + // Required. The table to update. + // The table's `name` field is used to identify the table to update. + Table table = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + // 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 fields: + // + // * `change_stream_config` + // * `change_stream_config.retention_period` + // * `deletion_protection` + // * `row_key_schema` + // + // If `column_families` is set in `update_mask`, it will return an + // UNIMPLEMENTED error. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, ignore safety checks when updating the table. + bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata type for the operation returned by +// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. +message UpdateTableMetadata { + // The name of the table being updated. + string name = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable] +message DeleteTableRequest { + // Required. The unique name of the table to be deleted. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable] +message UndeleteTableRequest { + // Required. The unique name of the table to be restored. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; +} + +// Metadata type for the operation returned by +// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]. +message UndeleteTableMetadata { + // The name of the table being restored. + string name = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was cancelled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies] +message ModifyColumnFamiliesRequest { + // A create, update, or delete of a particular column family. + message Modification { + // The ID of the column family to be modified. + string id = 1; + + // Column family modifications. + oneof mod { + // Create a new column family with the specified schema, or fail if + // one already exists with the given ID. + ColumnFamily create = 2; + + // Update an existing column family to the specified schema, or fail + // if no column family exists with the given ID. + ColumnFamily update = 3; + + // Drop (delete) the column family with the given ID, or fail if no such + // family exists. + bool drop = 4; + } + + // Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + // mod should be updated, ignored for other modification types. If unset or + // empty, we treat it as updating `gc_rule` to be backward compatible. + google.protobuf.FieldMask update_mask = 6 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The unique name of the table whose families should be modified. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Required. Modifications to be atomically applied to the specified table's + // families. Entries are applied in order, meaning that earlier modifications + // can be masked by later ones (in the case of repeated updates to the same + // family, for example). + repeated Modification modifications = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, ignore safety checks when modifying the column families. + bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] +message GenerateConsistencyTokenRequest { + // Required. The unique name of the Table for which to create a consistency + // token. Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; +} + +// Response message for +// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] +message GenerateConsistencyTokenResponse { + // The generated consistency token. + string consistency_token = 1; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] +message CheckConsistencyRequest { + // Required. The unique name of the Table for which to check replication + // consistency. Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Required. The token created using GenerateConsistencyToken for the Table. + string consistency_token = 2 [(google.api.field_behavior) = REQUIRED]; + + // Which type of read needs to consistently observe which type of write? + // Default: `standard_read_remote_writes` + oneof mode { + // Checks that reads using an app profile with `StandardIsolation` can + // see all writes committed before the token was created, even if the + // read and write target different clusters. + StandardReadRemoteWrites standard_read_remote_writes = 3; + + // Checks that reads using an app profile with `DataBoostIsolationReadOnly` + // can see all writes committed before the token was created, but only if + // the read and write target the same cluster. + DataBoostReadLocalWrites data_boost_read_local_writes = 4; + } +} + +// Checks that all writes before the consistency token was generated are +// replicated in every cluster and readable. +message StandardReadRemoteWrites {} + +// Checks that all writes before the consistency token was generated in the same +// cluster are readable by Databoost. +message DataBoostReadLocalWrites {} + +// Response message for +// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] +message CheckConsistencyResponse { + // True only if the token is consistent. A token is consistent if replication + // has caught up with the restrictions specified in the request. + bool consistent = 1; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable] +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message SnapshotTableRequest { + // Required. The unique name of the table to have the snapshot taken. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Required. The name of the cluster where the snapshot will be created in. + // Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string cluster = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Cluster" + } + ]; + + // Required. The ID by which the new snapshot should be referred to within the + // parent cluster, e.g., `mysnapshot` of the form: + // `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // The amount of time that the new snapshot can stay active after it is + // created. Once 'ttl' expires, the snapshot will get deleted. The maximum + // amount of time a snapshot can stay active is 7 days. If 'ttl' is not + // specified, the default value of 24 hours will be used. + google.protobuf.Duration ttl = 4; + + // Description of the snapshot. + string description = 5; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot] +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message GetSnapshotRequest { + // Required. The unique name of the requested snapshot. + // Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Snapshot" + } + ]; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots] +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message ListSnapshotsRequest { + // Required. The unique name of the cluster for which snapshots should be + // listed. Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + // Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + // e.g., `projects/{project}/instances/{instance}/clusters/-`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Cluster" + } + ]; + + // The maximum number of snapshots to return per page. + // CURRENTLY UNIMPLEMENTED AND IGNORED. + int32 page_size = 2; + + // The value of `next_page_token` returned by a previous call. + string page_token = 3; +} + +// Response message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots] +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message ListSnapshotsResponse { + // The snapshots present in the requested cluster. + repeated Snapshot snapshots = 1; + + // Set if not all snapshots could be returned in a single response. + // Pass this value to `page_token` in another request to get the next + // page of results. + string next_page_token = 2; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot] +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message DeleteSnapshotRequest { + // Required. The unique name of the snapshot to be deleted. + // Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Snapshot" + } + ]; +} + +// The metadata for the Operation returned by SnapshotTable. +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message SnapshotTableMetadata { + // The request that prompted the initiation of this SnapshotTable operation. + SnapshotTableRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// The metadata for the Operation returned by CreateTableFromSnapshot. +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message CreateTableFromSnapshotMetadata { + // The request that prompted the initiation of this CreateTableFromSnapshot + // operation. + CreateTableFromSnapshotRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// The request for +// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]. +message CreateBackupRequest { + // Required. This must be one of the clusters in the instance in which this + // table is located. The backup will be stored in this cluster. Values are + // of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Cluster" + } + ]; + + // Required. The id of the backup to be created. The `backup_id` along with + // the parent `parent` are combined as {parent}/backups/{backup_id} to create + // the full backup name, of the form: + // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + // This string must be between 1 and 50 characters in length and match the + // regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The backup to create. + Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata type for the operation returned by +// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]. +message CreateBackupMetadata { + // The name of the backup being created. + string name = 1; + + // The name of the table the backup is created from. + string source_table = 2; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 3; + + // If set, the time at which this operation finished or was cancelled. + google.protobuf.Timestamp end_time = 4; +} + +// The request for +// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]. +message UpdateBackupRequest { + // Required. The backup to update. `backup.name`, and the fields to be updated + // as specified by `update_mask` are required. Other fields are ignored. + // Update is only supported for the following fields: + // + // * `backup.expire_time`. + Backup backup = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A mask specifying which fields (e.g. `expire_time`) in the + // Backup resource should be updated. This mask is relative to the Backup + // resource, not to the request message. The field mask must always be + // specified; this prevents any future fields from being erased accidentally + // by clients that do not know about them. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request for +// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]. +message GetBackupRequest { + // Required. Name of the backup. + // Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Backup" + } + ]; +} + +// The request for +// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]. +message DeleteBackupRequest { + // Required. Name of the backup to delete. + // Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Backup" + } + ]; +} + +// The request for +// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. +message ListBackupsRequest { + // Required. The cluster to list backups from. Values are of the + // form `projects/{project}/instances/{instance}/clusters/{cluster}`. + // Use `{cluster} = '-'` to list backups for all clusters in an instance, + // e.g., `projects/{project}/instances/{instance}/clusters/-`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Cluster" + } + ]; + + // A filter expression that filters backups listed in the response. + // The expression must specify the field name, a comparison operator, + // and the value that you want to use for filtering. The value must be a + // string, a number, or a boolean. The comparison operator must be + // <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + // roughly synonymous with equality. Filter rules are case insensitive. + // + // The fields eligible for filtering are: + // + // * `name` + // * `source_table` + // * `state` + // * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + // * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + // * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + // * `size_bytes` + // + // To filter on multiple expressions, provide each separate expression within + // parentheses. By default, each expression is an AND expression. However, + // you can include AND, OR, and NOT expressions explicitly. + // + // Some examples of using filters are: + // + // * `name:"exact"` --> The backup's name is the string "exact". + // * `name:howl` --> The backup's name contains the string "howl". + // * `source_table:prod` + // --> The source_table's name contains the string "prod". + // * `state:CREATING` --> The backup is pending creation. + // * `state:READY` --> The backup is fully created and ready for use. + // * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + // --> The backup name contains the string "howl" and start_time + // of the backup is before 2018-03-28T14:50:00Z. + // * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + string filter = 2; + + // An expression for specifying the sort order of the results of the request. + // The string value should specify one or more fields in + // [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at + // https://aip.dev/132#ordering. + // + // Fields supported are: + // + // * name + // * source_table + // * expire_time + // * start_time + // * end_time + // * size_bytes + // * state + // + // For example, "start_time". The default sorting order is ascending. + // To specify descending order for the field, a suffix " desc" should + // be appended to the field name. For example, "start_time desc". + // Redundant space characters in the syntax are insigificant. + // + // If order_by is empty, results will be sorted by `start_time` in descending + // order starting from the most recently created backup. + string order_by = 3; + + // Number of backups to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 4; + + // If non-empty, `page_token` should contain a + // [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] + // from a previous + // [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the + // same `parent` and with the same `filter`. + string page_token = 5; +} + +// The response for +// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. +message ListBackupsResponse { + // The list of matching backups. + repeated Backup backups = 1; + + // `next_page_token` can be sent in a subsequent + // [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call + // to fetch more of the matching backups. + string next_page_token = 2; +} + +// The request for +// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]. +message CopyBackupRequest { + // Required. The name of the destination cluster that will contain the backup + // copy. The cluster must already exist. Values are of the form: + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Cluster" + } + ]; + + // Required. The id of the new backup. The `backup_id` along with `parent` + // are combined as {parent}/backups/{backup_id} to create the full backup + // name, of the form: + // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + // This string must be between 1 and 50 characters in length and match the + // regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The source backup to be copied from. + // The source backup needs to be in READY state for it to be copied. + // Copying a copied backup is not allowed. + // Once CopyBackup is in progress, the source backup cannot be deleted or + // cleaned up on expiration until CopyBackup is finished. + // Values are of the form: + // `projects//instances//clusters//backups/`. + string source_backup = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Backup" + } + ]; + + // Required. Required. The expiration time of the copied backup with + // microsecond granularity that must be at least 6 hours and at most 30 days + // from the time the request is received. Once the `expire_time` has + // passed, Cloud Bigtable will delete the backup and free the resources used + // by the backup. + google.protobuf.Timestamp expire_time = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata type for the google.longrunning.Operation returned by +// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]. +message CopyBackupMetadata { + // The name of the backup being created through the copy operation. + // Values are of the form + // `projects//instances//clusters//backups/`. + string name = 1 [(google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Backup" + }]; + + // Information about the source backup that is being copied from. + BackupInfo source_backup_info = 2; + + // The progress of the + // [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] + // operation. + OperationProgress progress = 3; +} + +// The request for +// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView] +message CreateAuthorizedViewRequest { + // Required. This is the name of the table the AuthorizedView belongs to. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Required. The id of the AuthorizedView to create. This AuthorizedView must + // not already exist. The `authorized_view_id` appended to `parent` forms the + // full AuthorizedView name of the form + // `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + string authorized_view_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AuthorizedView to create. + AuthorizedView authorized_view = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by CreateAuthorizedView. +message CreateAuthorizedViewMetadata { + // The request that prompted the initiation of this CreateAuthorizedView + // operation. + CreateAuthorizedViewRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] +message ListAuthorizedViewsRequest { + // Required. The unique name of the table for which AuthorizedViews should be + // listed. Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Optional. Maximum number of results per page. + // + // A page_size of zero lets the server choose the number of items to return. + // A page_size which is strictly positive will return at most that many items. + // A negative page_size will cause an error. + // + // Following the first request, subsequent paginated calls are not required + // to pass a page_size. If a page_size is set in subsequent calls, it must + // match the page_size given in the first request. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of `next_page_token` returned by a previous call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource_view to be applied to the returned AuthorizedViews' + // fields. Default to NAME_ONLY. + AuthorizedView.ResponseView view = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] +message ListAuthorizedViewsResponse { + // The AuthorizedViews present in the requested table. + repeated AuthorizedView authorized_views = 1; + + // Set if not all tables could be returned in a single response. + // Pass this value to `page_token` in another request to get the next + // page of results. + string next_page_token = 2; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView] +message GetAuthorizedViewRequest { + // Required. The unique name of the requested AuthorizedView. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Optional. The resource_view to be applied to the returned AuthorizedView's + // fields. Default to BASIC. + AuthorizedView.ResponseView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for +// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]. +message UpdateAuthorizedViewRequest { + // Required. The AuthorizedView to update. The `name` in `authorized_view` is + // used to identify the AuthorizedView. AuthorizedView name must in this + // format: + // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + AuthorizedView authorized_view = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + // A mask specifying which fields in the AuthorizedView resource should be + // updated. This mask is relative to the AuthorizedView resource, not to the + // request message. A field will be overwritten if it is in the mask. If + // empty, all fields set in the request will be overwritten. A special value + // `*` means to overwrite all fields (including fields not set in the + // request). + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, ignore the safety checks when updating the + // AuthorizedView. + bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata for the google.longrunning.Operation returned by +// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]. +message UpdateAuthorizedViewMetadata { + // The request that prompted the initiation of this UpdateAuthorizedView + // operation. + UpdateAuthorizedViewRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView] +message DeleteAuthorizedViewRequest { + // Required. The unique name of the AuthorizedView to be deleted. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Optional. The current etag of the AuthorizedView. + // If an etag is provided and does not match the current etag of the + // AuthorizedView, deletion will be blocked and an ABORTED error will be + // returned. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for +// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]. +message CreateSchemaBundleRequest { + // Required. The parent resource where this schema bundle will be created. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Required. The unique ID to use for the schema bundle, which will become the + // final component of the schema bundle's resource name. + string schema_bundle_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The schema bundle to create. + SchemaBundle schema_bundle = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by +// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]. +message CreateSchemaBundleMetadata { + // The unique name identifying this schema bundle. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// The request for +// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]. +message UpdateSchemaBundleRequest { + // Required. The schema bundle to update. + // + // The schema bundle's `name` field is used to identify the schema bundle to + // update. Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + SchemaBundle schema_bundle = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, ignore the safety checks when updating the Schema Bundle. + // The safety checks are: + // - The new Schema Bundle is backwards compatible with the existing Schema + // Bundle. + bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The metadata for the Operation returned by +// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]. +message UpdateSchemaBundleMetadata { + // The unique name identifying this schema bundle. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// The request for +// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]. +message GetSchemaBundleRequest { + // Required. The unique name of the schema bundle to retrieve. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/SchemaBundle" + } + ]; +} + +// The request for +// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]. +message ListSchemaBundlesRequest { + // Required. The parent, which owns this collection of schema bundles. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/SchemaBundle" + } + ]; + + // The maximum number of schema bundles to return. If the value is positive, + // the server may return at most this value. If unspecified, the server will + // return the maximum allowed page size. + int32 page_size = 2; + + // A page token, received from a previous `ListSchemaBundles` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListSchemaBundles` must + // match the call that provided the page token. + string page_token = 3; +} + +// The response for +// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]. +message ListSchemaBundlesResponse { + // The schema bundles from the specified table. + repeated SchemaBundle schema_bundles = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request for +// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]. +message DeleteSchemaBundleRequest { + // Required. The unique name of the schema bundle to delete. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/SchemaBundle" + } + ]; + + // Optional. The etag of the schema bundle. + // If this is provided, it must match the server's etag. The server + // returns an ABORTED error on a mismatched etag. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/common.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/common.proto new file mode 100644 index 000000000000..0503e3f3c4d2 --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/common.proto @@ -0,0 +1,54 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.admin.v2; + +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.bigtable.admin.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; +option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; + +// Storage media types for persisting Bigtable data. +enum StorageType { + // The user did not specify a storage type. + STORAGE_TYPE_UNSPECIFIED = 0; + + // Flash (SSD) storage should be used. + SSD = 1; + + // Magnetic drive (HDD) storage should be used. + HDD = 2; +} + +// Encapsulates progress related information for a Cloud Bigtable long +// running operation. +message OperationProgress { + // Percent completion of the operation. + // Values are between 0 and 100 inclusive. + int32 progress_percent = 1; + + // Time the request was received. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation failed or was completed + // successfully. + google.protobuf.Timestamp end_time = 3; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/instance.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/instance.proto new file mode 100644 index 000000000000..d0a1c028e12e --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/instance.proto @@ -0,0 +1,560 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.admin.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/bigtable/admin/v2/common.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "InstanceProto"; +option java_package = "com.google.bigtable.admin.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; +option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; + +// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and +// the resources that serve them. +// All tables in an instance are served from all +// [Clusters][google.bigtable.admin.v2.Cluster] in the instance. +message Instance { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" + plural: "instances" + singular: "instance" + }; + + // Possible states of an instance. + enum State { + // The state of the instance could not be determined. + STATE_NOT_KNOWN = 0; + + // The instance has been successfully created and can serve requests + // to its tables. + READY = 1; + + // The instance is currently being created, and may be destroyed + // if the creation process encounters an error. + CREATING = 2; + } + + // The type of the instance. + enum Type { + // The type of the instance is unspecified. If set when creating an + // instance, a `PRODUCTION` instance will be created. If set when updating + // an instance, the type will be left unchanged. + TYPE_UNSPECIFIED = 0; + + // An instance meant for production use. `serve_nodes` must be set + // on the cluster. + PRODUCTION = 1; + + // DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces + // a higher minimum node count than DEVELOPMENT. + DEVELOPMENT = 2; + } + + // Possible editions of an instance. + // + // An edition is a specific tier of Cloud Bigtable. Each edition is tailored + // to different customer needs. Higher tiers offer more features and better + // performance. + enum Edition { + // The edition is unspecified. This is treated as `ENTERPRISE`. + EDITION_UNSPECIFIED = 0; + + // The Enterprise edition. This is the default offering that is designed to + // meet the needs of most enterprise workloads. + ENTERPRISE = 1; + + // The Enterprise Plus edition. This is a premium tier that is designed for + // demanding, multi-tenant workloads requiring the highest levels of + // performance, scale, and global availability. + // + // The nodes in the Enterprise Plus tier come at a higher cost than the + // Enterprise tier. Any Enterprise Plus features must be disabled before + // downgrading to Enterprise. + ENTERPRISE_PLUS = 2; + } + + // The unique name of the instance. Values are of the form + // `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. + string name = 1; + + // Required. The descriptive name for this instance as it appears in UIs. + // Can be changed at any time, but should be kept globally unique + // to avoid confusion. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the instance. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The type of the instance. Defaults to `PRODUCTION`. + Type type = 4; + + // Optional. The edition of the instance. See + // [Edition][google.bigtable.admin.v2.Instance.Edition] for details. + Edition edition = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Labels are a flexible and lightweight mechanism for organizing cloud + // resources into groups that reflect a customer's organizational needs and + // deployment strategies. They can be used to filter resources and aggregate + // metrics. + // + // * Label keys must be between 1 and 63 characters long and must conform to + // the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + // * Label values must be between 0 and 63 characters long and must conform to + // the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + // * No more than 64 labels can be associated with a given resource. + // * Keys and values must both be under 128 bytes. + map labels = 5; + + // Output only. A commit timestamp representing when this Instance was + // created. For instances created before this field was added (August 2021), + // this value is `seconds: 0, nanos: 1`. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + optional bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + optional bool satisfies_pzi = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // - "123/environment": "production", + // - "123/costCenter": "marketing" + // + // Tags and Labels (above) are both used to bind metadata to resources, with + // different use-cases. See + // https://cloud.google.com/resource-manager/docs/tags/tags-overview for an + // in-depth overview on the difference between tags and labels. + map tags = 12 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The Autoscaling targets for a Cluster. These determine the recommended nodes. +message AutoscalingTargets { + // The cpu utilization that the Autoscaler should be trying to achieve. + // This number is on a scale from 0 (no utilization) to + // 100 (total utilization), and is limited between 10 and 80, otherwise it + // will return INVALID_ARGUMENT error. + int32 cpu_utilization_percent = 2; + + // The storage utilization that the Autoscaler should be trying to achieve. + // This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD + // cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, + // otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, + // it will be treated as if it were set to the default value: 2560 for SSD, + // 8192 for HDD. + int32 storage_utilization_gib_per_node = 3; +} + +// Limits for the number of nodes a Cluster can autoscale up/down to. +message AutoscalingLimits { + // Required. Minimum number of nodes to scale down to. + int32 min_serve_nodes = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maximum number of nodes to scale up to. + int32 max_serve_nodes = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A resizable group of nodes in a particular cloud location, capable +// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent +// [Instance][google.bigtable.admin.v2.Instance]. +message Cluster { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/Cluster" + pattern: "projects/{project}/instances/{instance}/clusters/{cluster}" + plural: "clusters" + singular: "cluster" + }; + + // Possible states of a cluster. + enum State { + // The state of the cluster could not be determined. + STATE_NOT_KNOWN = 0; + + // The cluster has been successfully created and is ready to serve requests. + READY = 1; + + // The cluster is currently being created, and may be destroyed + // if the creation process encounters an error. + // A cluster may not be able to serve requests while being created. + CREATING = 2; + + // The cluster is currently being resized, and may revert to its previous + // node count if the process encounters an error. + // A cluster is still capable of serving requests while being resized, + // but may exhibit performance as if its number of allocated nodes is + // between the starting and requested states. + RESIZING = 3; + + // The cluster has no backing nodes. The data (tables) still + // exist, but no operations can be performed on the cluster. + DISABLED = 4; + } + + // Possible node scaling factors of the clusters. Node scaling delivers better + // latency and more throughput by removing node boundaries. + enum NodeScalingFactor { + // No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X. + NODE_SCALING_FACTOR_UNSPECIFIED = 0; + + // The cluster is running with a scaling factor of 1. + NODE_SCALING_FACTOR_1X = 1; + + // The cluster is running with a scaling factor of 2. + // All node count values must be in increments of 2 with this scaling factor + // enabled, otherwise an INVALID_ARGUMENT error will be returned. + NODE_SCALING_FACTOR_2X = 2; + } + + // Autoscaling config for a cluster. + message ClusterAutoscalingConfig { + // Required. Autoscaling limits for this cluster. + AutoscalingLimits autoscaling_limits = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Autoscaling targets for this cluster. + AutoscalingTargets autoscaling_targets = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for a cluster. + message ClusterConfig { + // Autoscaling configuration for this cluster. + ClusterAutoscalingConfig cluster_autoscaling_config = 1; + } + + // Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected + // cluster. + message EncryptionConfig { + // Describes the Cloud KMS encryption key that will be used to protect the + // destination Bigtable cluster. The requirements for this key are: + // 1) The Cloud Bigtable service account associated with the project that + // contains this cluster must be granted the + // `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. + // 2) Only regional keys can be used and the region of the CMEK key must + // match the region of the cluster. + // Values are of the form + // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` + string kms_key_name = 1 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; + } + + // The unique name of the cluster. Values are of the form + // `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. + string name = 1; + + // Immutable. The location where this cluster's nodes and storage reside. For + // best performance, clients should be located as close as possible to this + // cluster. Currently only zones are supported, so values should be of the + // form `projects/{project}/locations/{zone}`. + string location = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Output only. The current state of the cluster. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The number of nodes in the cluster. If no value is set, + // Cloud Bigtable automatically allocates nodes based on your data footprint + // and optimized for 50% storage utilization. + int32 serve_nodes = 4; + + // Immutable. The node scaling factor of this cluster. + NodeScalingFactor node_scaling_factor = 9 + [(google.api.field_behavior) = IMMUTABLE]; + + oneof config { + // Configuration for this cluster. + ClusterConfig cluster_config = 7; + } + + // Immutable. The type of storage used by this cluster to serve its + // parent instance's tables, unless explicitly overridden. + StorageType default_storage_type = 5 + [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The encryption configuration for CMEK-protected clusters. + EncryptionConfig encryption_config = 6 + [(google.api.field_behavior) = IMMUTABLE]; +} + +// A configuration object describing how Cloud Bigtable should treat traffic +// from a particular end user application. +message AppProfile { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/AppProfile" + pattern: "projects/{project}/instances/{instance}/appProfiles/{app_profile}" + plural: "appProfiles" + singular: "appProfile" + }; + + // Read/write requests are routed to the nearest cluster in the instance, and + // will fail over to the nearest cluster that is available in the event of + // transient errors or delays. Clusters in a region are considered + // equidistant. Choosing this option sacrifices read-your-writes consistency + // to improve availability. + message MultiClusterRoutingUseAny { + // If enabled, Bigtable will route the request based on the row key of the + // request, rather than randomly. Instead, each row key will be assigned + // to a cluster, and will stick to that cluster. If clusters are added or + // removed, then this may affect which row keys stick to which clusters. + // To avoid this, users can use a cluster group to specify which clusters + // are to be used. In this case, new clusters that are not a part of the + // cluster group will not be routed to, and routing will be unaffected by + // the new cluster. Moreover, clusters specified in the cluster group cannot + // be deleted unless removed from the cluster group. + message RowAffinity {} + + // The set of clusters to route to. The order is ignored; clusters will be + // tried in order of distance. If left empty, all clusters are eligible. + repeated string cluster_ids = 1; + + // Possible algorithms for routing affinity. If enabled, Bigtable will + // route between equidistant clusters in a deterministic order rather than + // choosing randomly. + // + // This mechanism gives read-your-writes consistency for *most* requests + // under *most* circumstances, without sacrificing availability. Consistency + // is *not* guaranteed, as requests might still fail over between clusters + // in the event of errors or latency. + oneof affinity { + // Row affinity sticky routing based on the row key of the request. + // Requests that span multiple rows are routed non-deterministically. + RowAffinity row_affinity = 3; + } + } + + // Unconditionally routes all read/write requests to a specific cluster. + // This option preserves read-your-writes consistency but does not improve + // availability. + message SingleClusterRouting { + // The cluster to which read/write requests should be routed. + string cluster_id = 1; + + // Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are + // allowed by this app profile. It is unsafe to send these requests to + // the same table/row/column in multiple clusters. + bool allow_transactional_writes = 2; + } + + // Possible priorities for an app profile. Note that higher priority writes + // can sometimes queue behind lower priority writes to the same tablet, as + // writes must be strictly sequenced in the durability log. + enum Priority { + // Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation. + PRIORITY_UNSPECIFIED = 0; + + PRIORITY_LOW = 1; + + PRIORITY_MEDIUM = 2; + + PRIORITY_HIGH = 3; + } + + // Standard options for isolating this app profile's traffic from other use + // cases. + message StandardIsolation { + // The priority of requests sent using this app profile. + Priority priority = 1; + } + + // Data Boost is a serverless compute capability that lets you run + // high-throughput read jobs and queries on your Bigtable data, without + // impacting the performance of the clusters that handle your application + // traffic. Data Boost supports read-only use cases with single-cluster + // routing. + message DataBoostIsolationReadOnly { + // Compute Billing Owner specifies how usage should be accounted when using + // Data Boost. Compute Billing Owner also configures which Cloud Project is + // charged for relevant quota. + enum ComputeBillingOwner { + // Unspecified value. + COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; + + // The host Cloud Project containing the targeted Bigtable Instance / + // Table pays for compute. + HOST_PAYS = 1; + } + + // The Compute Billing Owner for this Data Boost App Profile. + optional ComputeBillingOwner compute_billing_owner = 1; + } + + // The unique name of the app profile. Values are of the form + // `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + string name = 1; + + // Strongly validated etag for optimistic concurrency control. Preserve the + // value returned from `GetAppProfile` when calling `UpdateAppProfile` to + // fail the request if there has been a modification in the mean time. The + // `update_mask` of the request need not include `etag` for this protection + // to apply. + // See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and + // [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more + // details. + string etag = 2; + + // Long form description of the use case for this AppProfile. + string description = 3; + + // The routing policy for all read/write requests that use this app profile. + // A value must be explicitly set. + oneof routing_policy { + // Use a multi-cluster routing policy. + MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; + + // Use a single-cluster routing policy. + SingleClusterRouting single_cluster_routing = 6; + } + + // Options for isolating this app profile's traffic from other use cases. + oneof isolation { + // This field has been deprecated in favor of `standard_isolation.priority`. + // If you set this field, `standard_isolation.priority` will be set instead. + // + // The priority of requests sent using this app profile. + Priority priority = 7 [deprecated = true]; + + // The standard options used for isolating this app profile's traffic from + // other use cases. + StandardIsolation standard_isolation = 11; + + // Specifies that this app profile is intended for read-only usage via the + // Data Boost feature. + DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; + } +} + +// A tablet is a defined by a start and end key and is explained in +// https://cloud.google.com/bigtable/docs/overview#architecture and +// https://cloud.google.com/bigtable/docs/performance#optimization. +// A Hot tablet is a tablet that exhibits high average cpu usage during the time +// interval from start time to end time. +message HotTablet { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/HotTablet" + pattern: "projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/{hot_tablet}" + plural: "hotTablets" + singular: "hotTablet" + }; + + // The unique name of the hot tablet. Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. + string name = 1; + + // Name of the table that contains the tablet. Values are of the form + // `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + string table_name = 2 [(google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + }]; + + // Output only. The start time of the hot tablet. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end time of the hot tablet. + google.protobuf.Timestamp end_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Tablet Start Key (inclusive). + string start_key = 5; + + // Tablet End Key (inclusive). + string end_key = 6; + + // Output only. The average CPU usage spent by a node on this tablet over the + // start_time to end_time time range. The percentage is the amount of CPU used + // by the node to serve the tablet, from 0% (tablet was not interacted with) + // to 100% (the node spent all cycles serving the hot tablet). + float node_cpu_usage_percent = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A SQL logical view object that can be referenced in SQL queries. +message LogicalView { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/LogicalView" + pattern: "projects/{project}/instances/{instance}/logicalViews/{logical_view}" + plural: "logicalViews" + singular: "logicalView" + }; + + // Identifier. The unique name of the logical view. + // Format: + // `projects/{project}/instances/{instance}/logicalViews/{logical_view}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The logical view's select query. + string query = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The etag for this logical view. + // This may be sent on update requests to ensure that the client has an + // up-to-date value before proceeding. The server returns an ABORTED error on + // a mismatched etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set to true to make the LogicalView protected against deletion. + bool deletion_protection = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A materialized view object that can be referenced in SQL queries. +message MaterializedView { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + pattern: "projects/{project}/instances/{instance}/materializedViews/{materialized_view}" + plural: "materializedViews" + singular: "materializedView" + }; + + // Identifier. The unique name of the materialized view. + // Format: + // `projects/{project}/instances/{instance}/materializedViews/{materialized_view}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Immutable. The materialized view's select query. + string query = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The etag for this materialized view. + // This may be sent on update requests to ensure that the client has an + // up-to-date value before proceeding. The server returns an ABORTED error on + // a mismatched etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Set to true to make the MaterializedView protected against deletion. + bool deletion_protection = 6; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/table.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/table.proto new file mode 100644 index 000000000000..6da7f8b48709 --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/table.proto @@ -0,0 +1,728 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.admin.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/bigtable/admin/v2/types.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "TableProto"; +option java_package = "com.google.bigtable.admin.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; +option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; + +// Information about a table restore. +message RestoreInfo { + // The type of the restore source. + RestoreSourceType source_type = 1; + + // Information about the source used to restore the table. + oneof source_info { + // Information about the backup used to restore the table. The backup + // may no longer exist. + BackupInfo backup_info = 2; + } +} + +// 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 { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/Table" + pattern: "projects/{project}/instances/{instance}/tables/{table}" + }; + + // The state of a table's data in a particular cluster. + message ClusterState { + // Table replication states. + enum ReplicationState { + // The replication state of the table is unknown in this cluster. + STATE_NOT_KNOWN = 0; + + // The cluster was recently created, and the table must finish copying + // over pre-existing data from other clusters before it can begin + // receiving live replication updates and serving Data API requests. + INITIALIZING = 1; + + // The table is temporarily unable to serve Data API requests from this + // cluster due to planned internal maintenance. + PLANNED_MAINTENANCE = 2; + + // The table is temporarily unable to serve Data API requests from this + // cluster due to unplanned or emergency maintenance. + UNPLANNED_MAINTENANCE = 3; + + // The table can serve Data API requests from this cluster. Depending on + // replication delay, reads may not immediately reflect the state of the + // table in other clusters. + READY = 4; + + // The table is fully created and ready for use after a restore, and is + // being optimized for performance. When optimizations are complete, the + // table will transition to `READY` state. + READY_OPTIMIZING = 5; + } + + // Output only. The state of replication for the table in this cluster. + ReplicationState replication_state = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The encryption information for the table in this cluster. + // If the encryption key protecting this resource is customer managed, then + // its version can be rotated in Cloud Key Management Service (Cloud KMS). + // The primary version of the key and its status will be reflected here when + // changes propagate from Cloud KMS. + repeated EncryptionInfo encryption_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Possible timestamp granularities to use when keeping multiple versions + // of data in a table. + enum TimestampGranularity { + // The user did not specify a granularity. Should not be returned. + // When specified during table creation, MILLIS will be used. + TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; + + // The table keeps data versioned at a granularity of 1ms. + MILLIS = 1; + } + + // Defines a view over a table's fields. + enum View { + // Uses the default view for each method as documented in its request. + VIEW_UNSPECIFIED = 0; + + // Only populates `name`. + NAME_ONLY = 1; + + // Only populates `name` and fields related to the table's schema. + SCHEMA_VIEW = 2; + + // Only populates `name` and fields related to the table's replication + // state. + REPLICATION_VIEW = 3; + + // Only populates `name` and fields related to the table's encryption state. + ENCRYPTION_VIEW = 5; + + // Populates all fields. + FULL = 4; + } + + // Defines an automated backup policy for a table + message AutomatedBackupPolicy { + // Required. How long the automated backups should be retained. Values must + // be at least 3 days and at most 90 days. + google.protobuf.Duration retention_period = 1 + [(google.api.field_behavior) = REQUIRED]; + + // How frequently automated backups should occur. The only supported value + // at this time is 24 hours. An undefined frequency is treated as 24 hours. + google.protobuf.Duration frequency = 2; + + // Optional. A list of Cloud Bigtable zones where automated backups are + // allowed to be created. If empty, automated backups will be created in all + // zones of the instance. Locations are in the format + // `projects/{project}/locations/{zone}`. + // This field can only set for tables in Enterprise Plus instances. + repeated string locations = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + } + + // The unique name of the table. Values are of the form + // `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + // Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` + string name = 1; + + // Output only. Map from cluster ID to per-cluster table state. + // If it could not be determined whether or not the table has data in a + // particular cluster (for example, if its zone is unavailable), then + // there will be an entry for the cluster with UNKNOWN `replication_status`. + // Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` + map cluster_states = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The column families configured for this table, mapped by column family ID. + // Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` + map column_families = 3; + + // Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored + // in this table. Timestamps not matching the granularity will be rejected. If + // unspecified at creation time, the value will be set to `MILLIS`. Views: + // `SCHEMA_VIEW`, `FULL`. + TimestampGranularity granularity = 4 + [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If this table was restored from another data source (e.g. a + // backup), this 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. + // * The column families in the table. + // * The instance containing the table. + // + // Note one can still delete the data stored in the table through Data APIs. + bool deletion_protection = 9; + + oneof automated_backup_config { + // If specified, automated backups are enabled for this table. + // Otherwise, automated backups are disabled. + AutomatedBackupPolicy automated_backup_policy = 13; + } + + // Rules to specify what data is stored in each storage tier. + // Different tiers store data differently, providing different trade-offs + // between cost and performance. Different parts of a table can be stored + // separately on different tiers. + // If a config is specified, tiered storage is enabled for this table. + // Otherwise, tiered storage is disabled. + // Only SSD instances can configure tiered storage. + TieredStorageConfig tiered_storage_config = 14; + + // The row key schema for this table. The schema is used to decode the raw row + // key bytes into a structured format. The order of field declarations in this + // schema is important, as it reflects how the raw row key bytes are + // structured. Currently, this only affects how the key is read via a + // GoogleSQL query from the ExecuteQuery API. + // + // For a SQL query, the _key column is still read as raw bytes. But queries + // can reference the key fields by name, which will be decoded from _key using + // provided type and encoding. Queries that reference key fields will fail if + // they encounter an invalid row key. + // + // For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the + // following schema: + // { + // fields { + // field_name: "id" + // type { string { encoding: utf8_bytes {} } } + // } + // fields { + // field_name: "date" + // type { string { encoding: utf8_bytes {} } } + // } + // fields { + // field_name: "product_code" + // type { int64 { encoding: big_endian_bytes {} } } + // } + // encoding { delimited_bytes { delimiter: "#" } } + // } + // + // The decoded key parts would be: + // id = "some_id", date = "2024-04-30", product_code = 1245427 + // The query "SELECT _key, product_code FROM table" will return two columns: + // /------------------------------------------------------\ + // | _key | product_code | + // | --------------------------------------|--------------| + // | "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 | + // \------------------------------------------------------/ + // + // The schema has the following invariants: + // (1) The decoded field values are order-preserved. For read, the field + // values will be decoded in sorted mode from the raw bytes. + // (2) Every field in the schema must specify a non-empty name. + // (3) Every field must specify a type with an associated encoding. The type + // is limited to scalar types only: Array, Map, Aggregate, and Struct are not + // allowed. + // (4) The field names must not collide with existing column family + // names and reserved keywords "_key" and "_timestamp". + // + // The following update operations are allowed for row_key_schema: + // - Update from an empty schema to a new schema. + // - Remove the existing schema. This operation requires setting the + // `ignore_warnings` flag to `true`, since it might be a backward + // incompatible change. Without the flag, the update request will fail with + // an INVALID_ARGUMENT error. + // Any other row key schema update operation (e.g. update existing schema + // columns names or types) is currently unsupported. + Type.Struct row_key_schema = 15; +} + +// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users +// can configure access to each Authorized View independently from the table and +// use the existing Data APIs to access the subset of data. +message AuthorizedView { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + pattern: "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}" + plural: "authorizedViews" + singular: "authorizedView" + }; + + // Subsets of a column family that are included in this AuthorizedView. + message FamilySubsets { + // Individual exact column qualifiers to be included in the AuthorizedView. + repeated bytes qualifiers = 1; + + // Prefixes for qualifiers to be included in the AuthorizedView. Every + // qualifier starting with one of these prefixes is included in the + // AuthorizedView. To provide access to all qualifiers, include the empty + // string as a prefix + // (""). + repeated bytes qualifier_prefixes = 2; + } + + // Defines a simple AuthorizedView that is a subset of the underlying Table. + message SubsetView { + // Row prefixes to be included in the AuthorizedView. + // To provide access to all rows, include the empty string as a prefix (""). + repeated bytes row_prefixes = 1; + + // Map from column family name to the columns in this family to be included + // in the AuthorizedView. + map family_subsets = 2; + } + + // Defines a subset of an AuthorizedView's fields. + enum ResponseView { + // Uses the default view for each method as documented in the request. + RESPONSE_VIEW_UNSPECIFIED = 0; + + // Only populates `name`. + NAME_ONLY = 1; + + // Only populates the AuthorizedView's basic metadata. This includes: + // name, deletion_protection, etag. + BASIC = 2; + + // Populates every fields. + FULL = 3; + } + + // Identifier. The name of this AuthorizedView. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The type of this AuthorizedView. + oneof authorized_view { + // An AuthorizedView permitting access to an explicit subset of a Table. + SubsetView subset_view = 2; + } + + // The etag for this AuthorizedView. + // If this is provided on update, it must match the server's etag. The server + // returns ABORTED error on a mismatched etag. + string etag = 3; + + // Set to true to make the AuthorizedView protected against deletion. + // The parent Table and containing Instance cannot be deleted if an + // AuthorizedView has this bit set. + bool deletion_protection = 4; +} + +// A set of columns within a table which share a common configuration. +message ColumnFamily { + // Garbage collection rule specified as a protobuf. + // Must serialize to at most 500 bytes. + // + // NOTE: Garbage collection executes opportunistically in the background, and + // so it's possible for reads to return a cell even if it matches the active + // GC expression for its family. + GcRule gc_rule = 1; + + // The type of data stored in each of this family's cell values, including its + // full encoding. If omitted, the family only serves raw untyped bytes. + // + // For now, only the `Aggregate` type is supported. + // + // `Aggregate` can only be set at family creation and is immutable afterwards. + // + // + // If `value_type` is `Aggregate`, written data must be compatible with: + // * `value_type.input_type` for `AddInput` mutations + Type value_type = 3; +} + +// Rule for determining which cells to delete during garbage collection. +message GcRule { + // A GcRule which deletes cells matching all of the given rules. + message Intersection { + // Only delete cells which would be deleted by every element of `rules`. + repeated GcRule rules = 1; + } + + // A GcRule which deletes cells matching any of the given rules. + message Union { + // Delete cells which would be deleted by any element of `rules`. + repeated GcRule rules = 1; + } + + // Garbage collection rules. + oneof rule { + // Delete all cells in a column except the most recent N. + int32 max_num_versions = 1; + + // Delete cells in a column older than the given age. + // Values must be at least one millisecond, and will be truncated to + // microsecond granularity. + google.protobuf.Duration max_age = 2; + + // Delete cells that would be deleted by every nested rule. + Intersection intersection = 3; + + // Delete cells that would be deleted by any nested rule. + Union union = 4; + } +} + +// Encryption information for a given resource. +// If this resource is protected with customer managed encryption, the in-use +// Cloud Key Management Service (Cloud KMS) key version is specified along with +// its status. +message EncryptionInfo { + // Possible encryption types for a resource. + enum EncryptionType { + // Encryption type was not specified, though data at rest remains encrypted. + ENCRYPTION_TYPE_UNSPECIFIED = 0; + + // The data backing this resource is encrypted at rest with a key that is + // fully managed by Google. No key version or status will be populated. + // This is the default state. + GOOGLE_DEFAULT_ENCRYPTION = 1; + + // The data backing this resource is encrypted at rest with a key that is + // managed by the customer. + // The in-use version of the key and its status are populated for + // CMEK-protected tables. + // CMEK-protected backups are pinned to the key version that was in use at + // the time the backup was taken. This key version is populated but its + // status is not tracked and is reported as `UNKNOWN`. + CUSTOMER_MANAGED_ENCRYPTION = 2; + } + + // Output only. The type of encryption used to protect this resource. + EncryptionType encryption_type = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of encrypt/decrypt calls on underlying data for + // this resource. Regardless of status, the existing data is always encrypted + // at rest. + google.rpc.Status encryption_status = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The version of the Cloud KMS key specified in the parent + // cluster that is in use for the data underlying this table. + string kms_key_version = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; +} + +// A snapshot of a table at a particular time. A snapshot can be used as a +// checkpoint for data restoration or a data source for a new table. +// +// Note: This is a private alpha release of Cloud Bigtable snapshots. This +// feature is not currently available to most Cloud Bigtable customers. This +// feature might be changed in backward-incompatible ways and is not recommended +// for production use. It is not subject to any SLA or deprecation policy. +message Snapshot { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/Snapshot" + pattern: "projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}" + }; + + // Possible states of a snapshot. + enum State { + // The state of the snapshot could not be determined. + STATE_NOT_KNOWN = 0; + + // The snapshot has been successfully created and can serve all requests. + READY = 1; + + // The snapshot is currently being created, and may be destroyed if the + // creation process encounters an error. A snapshot may not be restored to a + // table while it is being created. + CREATING = 2; + } + + // The unique name of the snapshot. + // Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + string name = 1; + + // Output only. The source table at the time the snapshot was taken. + Table source_table = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The size of the data in the source table at the time the + // snapshot was taken. In some cases, this value may be computed + // asynchronously via a background process and a placeholder of 0 will be used + // in the meantime. + int64 data_size_bytes = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the snapshot is created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The time when the snapshot will be deleted. The maximum amount of time a + // snapshot can stay active is 365 days. If 'ttl' is not specified, + // the default maximum of 365 days will be used. + google.protobuf.Timestamp delete_time = 5; + + // Output only. The current state of the snapshot. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the snapshot. + string description = 7; +} + +// A backup of a Cloud Bigtable table. +message Backup { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/Backup" + pattern: "projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}" + }; + + // Indicates the current state of the backup. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // The pending backup is still being created. Operations on the + // backup may fail with `FAILED_PRECONDITION` in this state. + CREATING = 1; + + // The backup is complete and ready for use. + READY = 2; + } + + // The type of the backup. + enum BackupType { + // Not specified. + BACKUP_TYPE_UNSPECIFIED = 0; + + // The default type for Cloud Bigtable managed backups. Supported for + // backups created in both HDD and SSD instances. Requires optimization when + // restored to a table in an SSD instance. + STANDARD = 1; + + // A backup type with faster restore to SSD performance. Only supported for + // backups created in SSD instances. A new SSD table restored from a hot + // backup reaches production performance more quickly than a standard + // backup. + HOT = 2; + } + + // A globally unique identifier for the backup which cannot be + // changed. Values are of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}/ + // backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + // The final segment of the name must be between 1 and 50 characters + // in length. + // + // The backup is stored in the cluster identified by the prefix of the backup + // name of the form + // `projects/{project}/instances/{instance}/clusters/{cluster}`. + string name = 1; + + // Required. Immutable. Name of the table from which this backup was created. + // This needs to be in the same instance as the backup. Values are of the form + // `projects/{project}/instances/{instance}/tables/{source_table}`. + string source_table = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. Name of the backup from which this backup was copied. If a + // backup is not created by copying a backup, this field will be empty. Values + // are of the form: + // projects//instances//clusters//backups/ + string source_backup = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The expiration time of the backup. + // When creating a backup or updating its `expire_time`, the value must be + // greater than the backup creation time by: + // - At least 6 hours + // - At most 90 days + // + // Once the `expire_time` has passed, Cloud Bigtable will delete the backup. + google.protobuf.Timestamp expire_time = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. `start_time` is the time that the backup was started + // (i.e. approximately the time the + // [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] + // request is received). The row data in this backup will be no older than + // this timestamp. + google.protobuf.Timestamp start_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. `end_time` is the time that the backup was finished. The row + // data in the backup will be no newer than this timestamp. + google.protobuf.Timestamp end_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Size of the backup in bytes. + int64 size_bytes = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the backup. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The encryption information for the backup. + EncryptionInfo encryption_info = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Indicates the backup type of the backup. + BackupType backup_type = 11; + + // The time at which the hot backup will be converted to a standard backup. + // Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the + // hot backup to a standard backup. This value must be greater than the backup + // creation time by: + // - At least 24 hours + // + // This field only applies for hot backups. When creating or updating a + // standard backup, attempting to set this field will fail the request. + google.protobuf.Timestamp hot_to_standard_time = 12; +} + +// Information about a backup. +message BackupInfo { + // Output only. Name of the backup. + string backup = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time that the backup was started. Row data in the backup + // will be no older than this timestamp. + google.protobuf.Timestamp start_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This time that the backup was finished. Row data in the + // backup will be no newer than this timestamp. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the table the backup was created from. + string source_table = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the backup from which this backup was copied. If a + // backup is not created by copying a backup, this field will be empty. Values + // are of the form: + // projects//instances//clusters//backups/ + string source_backup = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Indicates the type of the restore source. +enum RestoreSourceType { + // No restore associated. + RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; + + // A backup was used as the source of the restore. + BACKUP = 1; +} + +// Config for tiered storage. +// A valid config must have a valid TieredStorageRule. Otherwise the whole +// TieredStorageConfig must be unset. +// By default all data is stored in the SSD tier (only SSD instances can +// configure tiered storage). +message TieredStorageConfig { + // Rule to specify what data is stored in the infrequent access(IA) tier. + // The IA tier allows storing more data per node with reduced performance. + TieredStorageRule infrequent_access = 1; +} + +// Rule to specify what data is stored in a storage tier. +message TieredStorageRule { + // Rules to specify what data is stored in this tier. + oneof rule { + // Include cells older than the given age. + // For the infrequent access tier, this value must be at least 30 days. + google.protobuf.Duration include_if_older_than = 1; + } +} + +// Represents a protobuf schema. +message ProtoSchema { + // Required. Contains a protobuf-serialized + // [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto), + // which could include multiple proto files. + // To generate it, [install](https://grpc.io/docs/protoc-installation/) and + // run `protoc` with + // `--include_imports` and `--descriptor_set_out`. For example, to generate + // for moon/shot/app.proto, run + // ``` + // $protoc --proto_path=/app_path --proto_path=/lib_path \ + // --include_imports \ + // --descriptor_set_out=descriptors.pb \ + // moon/shot/app.proto + // ``` + // For more details, see protobuffer [self + // description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + bytes proto_descriptors = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A named collection of related schemas. +message SchemaBundle { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/SchemaBundle" + pattern: "projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}" + plural: "schemaBundles" + singular: "schemaBundle" + }; + + // Identifier. The unique name identifying this schema bundle. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The type of this schema bundle. The oneof case cannot change after + // creation. + oneof type { + // Schema for Protobufs. + ProtoSchema proto_schema = 2; + } + + // Optional. The etag for this schema bundle. + // This may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. The server + // returns an ABORTED error on a mismatched etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/types.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/types.proto new file mode 100644 index 000000000000..adafda693b9b --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/admin/v2/types.proto @@ -0,0 +1,445 @@ +// Copyright 2025 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.admin.v2; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "TypesProto"; +option java_package = "com.google.bigtable.admin.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; +option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; + +// `Type` represents the type of data that is written to, read from, or stored +// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain +// familiarity and consistency across products and features. +// +// For compatibility with Bigtable's existing untyped APIs, each `Type` includes +// an `Encoding` which describes how to convert to or from the underlying data. +// +// Each encoding can operate in one of two modes: +// +// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` +// if and only if `X <= Y`. This is useful anywhere sort order is important, +// for example when encoding keys. +// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then +// `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For +// example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}" +// are valid encodings of the same JSON value. +// +// The API clearly documents which mode is used wherever an encoding can be +// configured. Each encoding also documents which values are supported in which +// modes. For example, when encoding INT64 as a numeric STRING, negative numbers +// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but +// `STRING("-00001") > STRING("00001")`. +message Type { + // Bytes + // Values of type `Bytes` are stored in `Value.bytes_value`. + message Bytes { + // Rules used to convert to or from lower level types. + message Encoding { + // Leaves the value as-is. + // + // Sorted mode: all values are supported. + // + // Distinct mode: all values are supported. + message Raw {} + + // Which encoding to use. + oneof encoding { + // Use `Raw` encoding. + Raw raw = 1; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } + + // String + // Values of type `String` are stored in `Value.string_value`. + message String { + // Rules used to convert to or from lower level types. + message Encoding { + // Deprecated: prefer the equivalent `Utf8Bytes`. + message Utf8Raw { + option deprecated = true; + } + + // UTF-8 encoding. + // + // Sorted mode: + // - All values are supported. + // - Code point order is preserved. + // + // Distinct mode: all values are supported. + // + // Compatible with: + // + // - BigQuery `TEXT` encoding + // - HBase `Bytes.toBytes` + // - Java `String#getBytes(StandardCharsets.UTF_8)` + message Utf8Bytes {} + + // Which encoding to use. + oneof encoding { + // Deprecated: if set, converts to an empty `utf8_bytes`. + Utf8Raw utf8_raw = 1 [deprecated = true]; + + // Use `Utf8Bytes` encoding. + Utf8Bytes utf8_bytes = 2; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } + + // Int64 + // Values of type `Int64` are stored in `Value.int_value`. + message Int64 { + // Rules used to convert to or from lower level types. + message Encoding { + // Encodes the value as an 8-byte big-endian two's complement value. + // + // Sorted mode: non-negative values are supported. + // + // Distinct mode: all values are supported. + // + // Compatible with: + // + // - BigQuery `BINARY` encoding + // - HBase `Bytes.toBytes` + // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` + message BigEndianBytes { + // Deprecated: ignored if set. + Bytes bytes_type = 1 [deprecated = true]; + } + + // Encodes the value in a variable length binary format of up to 10 bytes. + // Values that are closer to zero use fewer bytes. + // + // Sorted mode: all values are supported. + // + // Distinct mode: all values are supported. + message OrderedCodeBytes {} + + // Which encoding to use. + oneof encoding { + // Use `BigEndianBytes` encoding. + BigEndianBytes big_endian_bytes = 1; + + // Use `OrderedCodeBytes` encoding. + OrderedCodeBytes ordered_code_bytes = 2; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } + + // bool + // Values of type `Bool` are stored in `Value.bool_value`. + message Bool {} + + // Float32 + // Values of type `Float32` are stored in `Value.float_value`. + message Float32 {} + + // Float64 + // Values of type `Float64` are stored in `Value.float_value`. + message Float64 {} + + // Timestamp + // Values of type `Timestamp` are stored in `Value.timestamp_value`. + message Timestamp { + // Rules used to convert to or from lower level types. + message Encoding { + // Which encoding to use. + oneof encoding { + // Encodes the number of microseconds since the Unix epoch using the + // given `Int64` encoding. Values must be microsecond-aligned. + // + // Compatible with: + // + // - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS` + Int64.Encoding unix_micros_int64 = 1; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } + + // Date + // Values of type `Date` are stored in `Value.date_value`. + message Date {} + + // A structured data value, consisting of fields which map to dynamically + // typed values. + // Values of type `Struct` are stored in `Value.array_value` where entries are + // in the same order and number as `field_types`. + message Struct { + // A struct field and its type. + message Field { + // The field name (optional). Fields without a `field_name` are considered + // anonymous and cannot be referenced by name. + string field_name = 1; + + // The type of values in this field. + Type type = 2; + } + + // Rules used to convert to or from lower level types. + message Encoding { + // Uses the encoding of `fields[0].type` as-is. + // Only valid if `fields.size == 1`. + message Singleton {} + + // Fields are encoded independently and concatenated with a configurable + // `delimiter` in between. + // + // A struct with no fields defined is encoded as a single `delimiter`. + // + // Sorted mode: + // + // - Fields are encoded in sorted mode. + // - Encoded field values must not contain any bytes <= `delimiter[0]` + // - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + // `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + // + // Distinct mode: + // + // - Fields are encoded in distinct mode. + // - Encoded field values must not contain `delimiter[0]`. + message DelimitedBytes { + // Byte sequence used to delimit concatenated fields. The delimiter must + // contain at least 1 character and at most 50 characters. + bytes delimiter = 1; + } + + // Fields are encoded independently and concatenated with the fixed byte + // pair {0x00, 0x01} in between. + // + // Any null (0x00) byte in an encoded field is replaced by the fixed byte + // pair {0x00, 0xFF}. + // + // Fields that encode to the empty string "" have special handling: + // + // - If *every* field encodes to "", or if the STRUCT has no fields + // defined, then the STRUCT is encoded as the fixed byte pair + // {0x00, 0x00}. + // - Otherwise, the STRUCT only encodes until the last non-empty field, + // omitting any trailing empty fields. Any empty fields that aren't + // omitted are replaced with the fixed byte pair {0x00, 0x00}. + // + // Examples: + // + // - STRUCT() -> "\00\00" + // - STRUCT("") -> "\00\00" + // - STRUCT("", "") -> "\00\00" + // - STRUCT("", "B") -> "\00\00" + "\00\01" + "B" + // - STRUCT("A", "") -> "A" + // - STRUCT("", "B", "") -> "\00\00" + "\00\01" + "B" + // - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C" + // + // + // Since null bytes are always escaped, this encoding can cause size + // blowup for encodings like `Int64.BigEndianBytes` that are likely to + // produce many such bytes. + // + // Sorted mode: + // + // - Fields are encoded in sorted mode. + // - All values supported by the field encodings are allowed + // - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + // `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + // + // Distinct mode: + // + // - Fields are encoded in distinct mode. + // - All values supported by the field encodings are allowed. + message OrderedCodeBytes {} + + // Which encoding to use. + oneof encoding { + // Use `Singleton` encoding. + Singleton singleton = 1; + + // Use `DelimitedBytes` encoding. + DelimitedBytes delimited_bytes = 2; + + // User `OrderedCodeBytes` encoding. + OrderedCodeBytes ordered_code_bytes = 3; + } + } + + // The names and types of the fields in this struct. + repeated Field fields = 1; + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 2; + } + + // A protobuf message type. + // Values of type `Proto` are stored in `Value.bytes_value`. + message Proto { + // The ID of the schema bundle that this proto is defined in. + string schema_bundle_id = 1; + + // The fully qualified name of the protobuf message, including package. In + // the format of "foo.bar.Message". + string message_name = 2; + } + + // A protobuf enum type. + // Values of type `Enum` are stored in `Value.int_value`. + message Enum { + // The ID of the schema bundle that this enum is defined in. + string schema_bundle_id = 1; + + // The fully qualified name of the protobuf enum message, including package. + // In the format of "foo.bar.EnumMessage". + string enum_name = 2; + } + + // An ordered list of elements of a given type. + // Values of type `Array` are stored in `Value.array_value`. + message Array { + // The type of the elements in the array. This must not be `Array`. + Type element_type = 1; + } + + // A mapping of keys to values of a given type. + // Values of type `Map` are stored in a `Value.array_value` where each entry + // is another `Value.array_value` with two elements (the key and the value, + // in that order). + // Normally encoded Map values won't have repeated keys, however, clients are + // expected to handle the case in which they do. If the same key appears + // multiple times, the _last_ value takes precedence. + message Map { + // The type of a map key. + // Only `Bytes`, `String`, and `Int64` are allowed as key types. + Type key_type = 1; + + // The type of the values in a map. + Type value_type = 2; + } + + // A value that combines incremental updates into a summarized value. + // + // Data is never directly written or read using type `Aggregate`. Writes will + // provide either the `input_type` or `state_type`, and reads will always + // return the `state_type` . + message Aggregate { + // Computes the sum of the input values. + // Allowed input: `Int64` + // State: same as input + message Sum {} + + // Computes the max of the input values. + // Allowed input: `Int64` + // State: same as input + message Max {} + + // Computes the min of the input values. + // Allowed input: `Int64` + // State: same as input + message Min {} + + // Computes an approximate unique count over the input values. When using + // raw data as input, be careful to use a consistent encoding. Otherwise + // the same value encoded differently could count more than once, or two + // distinct values could count as identical. + // Input: Any, or omit for Raw + // State: TBD + // Special state conversions: `Int64` (the unique count estimate) + message HyperLogLogPlusPlusUniqueCount {} + + // Type of the inputs that are accumulated by this `Aggregate`, which must + // specify a full encoding. + // Use `AddInput` mutations to accumulate new inputs. + Type input_type = 1; + + // Output only. Type that holds the internal accumulator state for the + // `Aggregate`. This is a function of the `input_type` and `aggregator` + // chosen, and will always specify a full encoding. + Type state_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Which aggregator function to use. The configured types must match. + oneof aggregator { + // Sum aggregator. + Sum sum = 4; + + // HyperLogLogPlusPlusUniqueCount aggregator. + HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + + // Max aggregator. + Max max = 6; + + // Min aggregator. + Min min = 7; + } + } + + // The kind of type that this represents. + oneof kind { + // Bytes + Bytes bytes_type = 1; + + // String + String string_type = 2; + + // Int64 + Int64 int64_type = 5; + + // Float32 + Float32 float32_type = 12; + + // Float64 + Float64 float64_type = 9; + + // Bool + Bool bool_type = 8; + + // Timestamp + Timestamp timestamp_type = 10; + + // Date + Date date_type = 11; + + // Aggregate + Aggregate aggregate_type = 6; + + // Struct + Struct struct_type = 7; + + // Array + Array array_type = 3; + + // Map + Map map_type = 4; + + // Proto + Proto proto_type = 13; + + // Enum + Enum enum_type = 14; + } +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/bigtable.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/bigtable.proto new file mode 100644 index 000000000000..17d588107a24 --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/bigtable.proto @@ -0,0 +1,1292 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/routing.proto"; +import "google/bigtable/v2/data.proto"; +import "google/bigtable/v2/request_stats.proto"; +import "google/bigtable/v2/session.proto"; +import "google/bigtable/v2/types.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "BigtableProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; +option (google.api.resource_definition) = { + type: "bigtableadmin.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" +}; +option (google.api.resource_definition) = { + type: "bigtableadmin.googleapis.com/Table" + pattern: "projects/{project}/instances/{instance}/tables/{table}" +}; +option (google.api.resource_definition) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + pattern: "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}" +}; +option (google.api.resource_definition) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + pattern: "projects/{project}/instances/{instance}/materializedViews/{materialized_view}" +}; + +// Service for reading from and writing to existing Bigtable tables. +service Bigtable { + option (google.api.default_host) = "bigtable.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigtable.data," + "https://www.googleapis.com/auth/bigtable.data.readonly," + "https://www.googleapis.com/auth/cloud-bigtable.data," + "https://www.googleapis.com/auth/cloud-bigtable.data.readonly," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Streams back the contents of all requested rows in key order, optionally + // applying the same Reader filter to each. Depending on their size, + // rows and cells may be broken up across multiple responses, but + // atomicity of each row will still be preserved. See the + // ReadRowsResponse documentation for details. + rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:readRows" + body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows" + body: "*" + } + additional_bindings { + post: "/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:readRows" + body: "*" + } + }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" + } + routing_parameters { + field: "materialized_view_name" + path_template: "{name=projects/*/instances/*}/**" + } + }; + option (google.api.method_signature) = "table_name"; + option (google.api.method_signature) = "table_name,app_profile_id"; + } + + // Returns a sample of row keys in the table. The returned row keys will + // delimit contiguous sections of the table of approximately equal size, + // which can be used to break up the data for distributed tasks like + // mapreduces. + // + // If a `row_range` is provided in the request, the returned samples will be + // restricted to the specified range. + rpc SampleRowKeys(SampleRowKeysRequest) + returns (stream SampleRowKeysResponse) { + option (google.api.http) = { + get: "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys" + additional_bindings { + get: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys" + } + additional_bindings { + get: "/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:sampleRowKeys" + } + }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" + } + routing_parameters { + field: "materialized_view_name" + path_template: "{name=projects/*/instances/*}/**" + } + }; + option (google.api.method_signature) = "table_name"; + option (google.api.method_signature) = "table_name,app_profile_id"; + } + + // Mutates a row atomically. Cells already present in the row are left + // unchanged unless explicitly changed by `mutation`. + rpc MutateRow(MutateRowRequest) returns (MutateRowResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow" + body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow" + body: "*" + } + }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" + } + }; + option (google.api.method_signature) = "table_name,row_key,mutations"; + option (google.api.method_signature) = + "table_name,row_key,mutations,app_profile_id"; + } + + // Mutates multiple rows in a batch. Each individual row is mutated + // atomically as in MutateRow, but the entire batch is not executed + // atomically. + rpc MutateRows(MutateRowsRequest) returns (stream MutateRowsResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows" + body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows" + body: "*" + } + }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" + } + }; + option (google.api.method_signature) = "table_name,entries"; + option (google.api.method_signature) = "table_name,entries,app_profile_id"; + } + + // Mutates a row atomically based on the output of a predicate Reader filter. + rpc CheckAndMutateRow(CheckAndMutateRowRequest) + returns (CheckAndMutateRowResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow" + body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow" + body: "*" + } + }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" + } + }; + option (google.api.method_signature) = + "table_name,row_key,predicate_filter,true_mutations,false_mutations"; + option (google.api.method_signature) = + "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id"; + } + + // Warm up associated instance metadata for this connection. + // This call is not required but may be useful for connection keep-alive. + rpc PingAndWarm(PingAndWarmRequest) returns (PingAndWarmResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*}:ping" + body: "*" + }; + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{name=projects/*/instances/*}" + } + routing_parameters { field: "app_profile_id" } + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,app_profile_id"; + } + + // Modifies a row atomically on the server. The method reads the latest + // existing timestamp and value from the specified columns and writes a new + // entry based on pre-defined read/modify/write rules. The new value for the + // timestamp is the greater of the existing timestamp or the current server + // time. The method returns the new contents of all modified cells. + rpc ReadModifyWriteRow(ReadModifyWriteRowRequest) + returns (ReadModifyWriteRowResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow" + body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow" + body: "*" + } + }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" + } + }; + option (google.api.method_signature) = "table_name,row_key,rules"; + option (google.api.method_signature) = + "table_name,row_key,rules,app_profile_id"; + } + + // Returns the current list of partitions that make up the table's + // change stream. The union of partitions will cover the entire keyspace. + // Partitions can be read with `ReadChangeStream`. + // NOTE: This API is only intended to be used by Apache Beam BigtableIO. + rpc GenerateInitialChangeStreamPartitions( + GenerateInitialChangeStreamPartitionsRequest) + returns (stream GenerateInitialChangeStreamPartitionsResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions" + body: "*" + }; + option (google.api.method_signature) = "table_name"; + option (google.api.method_signature) = "table_name,app_profile_id"; + } + + // Reads changes from a table's change stream. Changes will + // reflect both user-initiated mutations and mutations that are caused by + // garbage collection. + // NOTE: This API is only intended to be used by Apache Beam BigtableIO. + rpc ReadChangeStream(ReadChangeStreamRequest) + returns (stream ReadChangeStreamResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream" + body: "*" + }; + option (google.api.method_signature) = "table_name"; + option (google.api.method_signature) = "table_name,app_profile_id"; + } + + // Prepares a GoogleSQL query for execution on a particular Bigtable instance. + rpc PrepareQuery(PrepareQueryRequest) returns (PrepareQueryResponse) { + option (google.api.http) = { + post: "/v2/{instance_name=projects/*/instances/*}:prepareQuery" + body: "*" + }; + option (google.api.routing) = { + routing_parameters { + field: "instance_name" + path_template: "{name=projects/*/instances/*}" + } + routing_parameters { field: "app_profile_id" } + }; + option (google.api.method_signature) = "instance_name,query"; + option (google.api.method_signature) = "instance_name,query,app_profile_id"; + } + + // Executes a SQL query against a particular Bigtable instance. + rpc ExecuteQuery(ExecuteQueryRequest) returns (stream ExecuteQueryResponse) { + option (google.api.http) = { + post: "/v2/{instance_name=projects/*/instances/*}:executeQuery" + body: "*" + }; + option (google.api.routing) = { + routing_parameters { + field: "instance_name" + path_template: "{name=projects/*/instances/*}" + } + routing_parameters { field: "app_profile_id" } + }; + option (google.api.method_signature) = "instance_name,query"; + option (google.api.method_signature) = "instance_name,query,app_profile_id"; + } + + // This RPC is only intended to be used by the official Cloud Bigtable client + // libraries to implement the Bigtable Session based protocol. It is subject + // to change without notice. + rpc GetClientConfiguration(GetClientConfigurationRequest) + returns (ClientConfiguration) {} + + // This RPC is only intended to be used by the official Cloud Bigtable client + // libraries to implement the Bigtable Session based protocol. It is subject + // to change without notice. + rpc OpenTable(stream SessionRequest) returns (stream SessionResponse) { + option (google.bigtable.v2.rpc_session_type) = SESSION_TYPE_TABLE; + } + + // This RPC is only intended to be used by the official Cloud Bigtable client + // libraries to implement the Bigtable Session based protocol. It is subject + // to change without notice. + rpc OpenAuthorizedView(stream SessionRequest) + returns (stream SessionResponse) { + option (google.bigtable.v2.rpc_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; + } + + // This RPC is only intended to be used by the official Cloud Bigtable client + // libraries to implement the Bigtable Session based protocol. It is subject + // to change without notice. + rpc OpenMaterializedView(stream SessionRequest) + returns (stream SessionResponse) { + option (google.bigtable.v2.rpc_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; + } +} + +// Request message for Bigtable.ReadRows. +message ReadRowsRequest { + // The desired view into RequestStats that should be returned in the response. + // + // See also: RequestStats message. + enum RequestStatsView { + // The default / unset value. The API will default to the NONE option below. + REQUEST_STATS_VIEW_UNSPECIFIED = 0; + + // Do not include any RequestStats in the response. This will leave the + // RequestStats embedded message unset in the response. + REQUEST_STATS_NONE = 1; + + // Include the full set of available RequestStats in the response, + // applicable to this read. + REQUEST_STATS_FULL = 2; + } + + // Optional. The unique name of the table from which to read. + // + // Values are of the form + // `projects//instances//tables/
`. + string table_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Optional. The unique name of the AuthorizedView from which to read. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Optional. The unique name of the MaterializedView from which to read. + // + // Values are of the form + // `projects//instances//materializedViews/`. + string materialized_view_name = 11 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; + + // 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 + // from all rows. + RowSet rows = 2; + + // The filter to apply to the contents of the specified row(s). If unset, + // reads the entirety of each row. + RowFilter filter = 3; + + // The read will stop after committing to N rows' worth of results. The + // default (zero) is to return all results. + int64 rows_limit = 4; + + // The view into RequestStats, as described above. + RequestStatsView request_stats_view = 6; + + // Experimental API - Please note that this API is currently experimental + // and can change in the future. + // + // Return rows in lexiographical descending order of the row keys. The row + // contents will not be affected by this flag. + // + // Example result set: + // + // [ + // {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + // {key: "k1", "f:col1": "v2", "f:col2": "v2"} + // ] + bool reversed = 7; +} + +// Response message for Bigtable.ReadRows. +message ReadRowsResponse { + // Specifies a piece of a row's contents returned as part of the read + // response stream. + message CellChunk { + // The row key for this chunk of data. If the row key is empty, + // this CellChunk is a continuation of the same row as the previous + // CellChunk in the response stream, even if that CellChunk was in a + // previous ReadRowsResponse message. + bytes row_key = 1; + + // The column family name for this chunk of data. If this message + // is not present this CellChunk is a continuation of the same column + // family as the previous CellChunk. The empty string can occur as a + // column family name in a response so clients must check + // explicitly for the presence of this message, not just for + // `family_name.value` being non-empty. + google.protobuf.StringValue family_name = 2; + + // The column qualifier for this chunk of data. If this message + // is not present, this CellChunk is a continuation of the same column + // as the previous CellChunk. Column qualifiers may be empty so + // clients must check for the presence of this message, not just + // for `qualifier.value` being non-empty. + google.protobuf.BytesValue qualifier = 3; + + // The cell's stored timestamp, which also uniquely identifies it + // within its column. Values are always expressed in + // microseconds, but individual tables may set a coarser + // granularity to further restrict the allowed values. For + // example, a table which specifies millisecond granularity will + // only allow values of `timestamp_micros` which are multiples of + // 1000. Timestamps are only set in the first CellChunk per cell + // (for cells split into multiple chunks). + int64 timestamp_micros = 4; + + // Labels applied to the cell by a + // [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set + // on the first CellChunk per cell. + repeated string labels = 5; + + // The value stored in the cell. Cell values can be split across + // multiple CellChunks. In that case only the value field will be + // set in CellChunks after the first: the timestamp and labels + // will only be present in the first CellChunk, even if the first + // CellChunk came in a previous ReadRowsResponse. + bytes value = 6; + + // If this CellChunk is part of a chunked cell value and this is + // not the final chunk of that cell, value_size will be set to the + // total length of the cell value. The client can use this size + // to pre-allocate memory to hold the full cell value. + int32 value_size = 7; + + // Signals to the client concerning previous CellChunks received. + oneof row_status { + // Indicates that the client should drop all previous chunks for + // `row_key`, as it will be re-read from the beginning. + bool reset_row = 8; + + // Indicates that the client can safely process all previous chunks for + // `row_key`, as its data has been fully read. + bool commit_row = 9; + } + } + + // A collection of a row's contents as part of the read request. + repeated CellChunk chunks = 1; + + // Optionally the server might return the row key of the last row it + // has scanned. The client can use this to construct a more + // efficient retry request if needed: any row keys or portions of + // ranges less than this row key can be dropped from the request. + // This is primarily useful for cases where the server has read a + // lot of data that was filtered out since the last committed row + // key, allowing the client to skip that work on a retry. + bytes last_scanned_row_key = 2; + + // If requested, return enhanced query performance statistics. The field + // request_stats is empty in a streamed response unless the ReadRowsResponse + // message contains request_stats in the last message of the stream. Always + // returned when requested, even when the read request returns an empty + // response. + RequestStats request_stats = 3; +} + +// Request message for Bigtable.SampleRowKeys. +message SampleRowKeysRequest { + // Optional. The unique name of the table from which to sample row keys. + // + // Values are of the form + // `projects//instances//tables/
`. + string table_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Optional. The unique name of the AuthorizedView from which to sample row + // keys. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Optional. The unique name of the MaterializedView from which to read. + // + // Values are of the form + // `projects//instances//materializedViews/`. + string materialized_view_name = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + string app_profile_id = 2; + + // Optional. The row range to sample. If not specified, samples + // from all rows. + // The output will always return the end key in the range as the last sample + // returned. + RowRange row_range = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for Bigtable.SampleRowKeys. +message SampleRowKeysResponse { + // Sorted streamed sequence of sample row keys in the table, restricted to + // the row_range if specified in the request. The table might have contents + // before the first row key in the list and after the last one, but a key + // containing the empty string indicates "end of table" and will be the last + // response given, if present and within the row-range specified in the + // request. + // Note that row keys in this list may not have ever been written to or read + // from, and users should therefore not make any assumptions about the row key + // structure that are specific to their use case. + bytes row_key = 1; + + // Approximate total storage space used by all rows in the table which precede + // `row_key` (and if a row-range is specified in the request, which follow + // what would have been the previous sample before the row-range start). + // Buffering the contents of all rows between two subsequent + // samples would require space roughly equal to the difference in their + // `offset_bytes` fields. + int64 offset_bytes = 2; +} + +// Request message for Bigtable.MutateRow. +message MutateRowRequest { + // Optional. The unique name of the table to which the mutation should be + // applied. + // + // Values are of the form + // `projects//instances//tables/
`. + string table_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Optional. The unique name of the AuthorizedView to which the mutation + // should be applied. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + string app_profile_id = 4; + + // Required. The key of the row to which the mutation should be applied. + bytes row_key = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Changes to be atomically applied to the specified row. Entries + // are applied in order, meaning that earlier mutations can be masked by later + // ones. Must contain at least one entry and at most 100000. + repeated Mutation mutations = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set consistently across retries, prevents this mutation from being + // double applied to aggregate column families within a 15m window. + Idempotency idempotency = 8; +} + +// Response message for Bigtable.MutateRow. +message MutateRowResponse {} + +// Request message for BigtableService.MutateRows. +message MutateRowsRequest { + // A mutation for a given row. + message Entry { + // The key of the row to which the `mutations` should be applied. + bytes row_key = 1; + + // Required. Changes to be atomically applied to the specified row. + // Mutations are applied in order, meaning that earlier mutations can be + // masked by later ones. You must specify at least one mutation. + repeated Mutation mutations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If set consistently across retries, prevents this mutation from being + // double applied to aggregate column families within a 15m window. + Idempotency idempotency = 3; + } + + // Optional. The unique name of the table to which the mutations should be + // applied. + // + // Values are of the form + // `projects//instances//tables/
`. + string table_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Optional. The unique name of the AuthorizedView to which the mutations + // should be applied. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + string app_profile_id = 3; + + // Required. The row keys and corresponding mutations to be applied in bulk. + // Each entry is applied as an atomic mutation, but the entries may be + // applied in arbitrary order (even between entries for the same row). + // At least one entry must be specified, and in total the entries can + // contain at most 100000 mutations. + repeated Entry entries = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for BigtableService.MutateRows. +message MutateRowsResponse { + // The result of applying a passed mutation in the original request. + message Entry { + // The index into the original request's `entries` list of the Entry + // for which a result is being reported. + int64 index = 1; + + // The result of the request Entry identified by `index`. + // Depending on how requests are batched during execution, it is possible + // for one Entry to fail due to an error with another Entry. In the event + // that this occurs, the same error will be reported for both entries. + google.rpc.Status status = 2; + } + + // 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. +message CheckAndMutateRowRequest { + // Optional. The unique name of the table to which the conditional mutation + // should be applied. + // + // Values are of the form + // `projects//instances//tables/
`. + string table_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Optional. The unique name of the AuthorizedView to which the conditional + // mutation should be applied. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + string app_profile_id = 7; + + // Required. The key of the row to which the conditional mutation should be + // applied. + bytes row_key = 2 [(google.api.field_behavior) = REQUIRED]; + + // The filter to be applied to the contents of the specified row. Depending + // on whether or not any results are yielded, either `true_mutations` or + // `false_mutations` will be executed. If unset, checks that the row contains + // any values at all. + RowFilter predicate_filter = 6; + + // Changes to be atomically applied to the specified row if `predicate_filter` + // yields at least one cell when applied to `row_key`. Entries are applied in + // order, meaning that earlier mutations can be masked by later ones. + // Must contain at least one entry if `false_mutations` is empty, and at most + // 100000. + repeated Mutation true_mutations = 4; + + // Changes to be atomically applied to the specified row if `predicate_filter` + // does not yield any cells when applied to `row_key`. Entries are applied in + // order, meaning that earlier mutations can be masked by later ones. + // Must contain at least one entry if `true_mutations` is empty, and at most + // 100000. + repeated Mutation false_mutations = 5; +} + +// Response message for Bigtable.CheckAndMutateRow. +message CheckAndMutateRowResponse { + // Whether or not the request's `predicate_filter` yielded any results for + // the specified row. + bool predicate_matched = 1; +} + +// Request message for client connection keep-alive and warming. +message PingAndWarmRequest { + // Required. The unique name of the instance to check permissions for as well + // as respond. Values are of the form + // `projects//instances/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + string app_profile_id = 2; +} + +// Response message for Bigtable.PingAndWarm connection keepalive and warming. +message PingAndWarmResponse {} + +// Request message for Bigtable.ReadModifyWriteRow. +message ReadModifyWriteRowRequest { + // Optional. The unique name of the table to which the read/modify/write rules + // should be applied. + // + // Values are of the form + // `projects//instances//tables/
`. + string table_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Optional. The unique name of the AuthorizedView to which the + // read/modify/write rules should be applied. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + string app_profile_id = 4; + + // Required. The key of the row to which the read/modify/write rules should be + // applied. + bytes row_key = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Rules specifying how the specified row's contents are to be + // transformed into writes. Entries are applied in order, meaning that earlier + // rules will affect the results of later ones. At least one entry must be + // specified, and there can be at most 100000 rules. + repeated ReadModifyWriteRule rules = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for Bigtable.ReadModifyWriteRow. +message ReadModifyWriteRowResponse { + // A Row containing the new contents of all cells modified by the request. + Row row = 1; +} + +// NOTE: This API is intended to be used by Apache Beam BigtableIO. +// Request message for Bigtable.GenerateInitialChangeStreamPartitions. +message GenerateInitialChangeStreamPartitionsRequest { + // Required. The unique name of the table from which to get change stream + // partitions. Values are of the form + // `projects//instances//tables/
`. + // Change streaming must be enabled on the table. + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + // Single cluster routing must be configured on the profile. + string app_profile_id = 2; +} + +// NOTE: This API is intended to be used by Apache Beam BigtableIO. +// Response message for Bigtable.GenerateInitialChangeStreamPartitions. +message GenerateInitialChangeStreamPartitionsResponse { + // A partition of the change stream. + StreamPartition partition = 1; +} + +// NOTE: This API is intended to be used by Apache Beam BigtableIO. +// Request message for Bigtable.ReadChangeStream. +message ReadChangeStreamRequest { + // Required. The unique name of the table from which to read a change stream. + // Values are of the form + // `projects//instances//tables/
`. + // Change streaming must be enabled on the table. + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + // Single cluster routing must be configured on the profile. + string app_profile_id = 2; + + // The partition to read changes from. + StreamPartition partition = 3; + + // Options for describing where we want to start reading from the stream. + oneof start_from { + // Start reading the stream at the specified timestamp. This timestamp must + // be within the change stream retention period, less than or equal to the + // current time, and after change stream creation, whichever is greater. + // This value is inclusive and will be truncated to microsecond granularity. + google.protobuf.Timestamp start_time = 4; + + // Tokens that describe how to resume reading a stream where reading + // previously left off. If specified, changes will be read starting at the + // the position. Tokens are delivered on the stream as part of `Heartbeat` + // and `CloseStream` messages. + // + // If a single token is provided, the token's partition must exactly match + // the request's partition. If multiple tokens are provided, as in the case + // of a partition merge, the union of the token partitions must exactly + // cover the request's partition. Otherwise, INVALID_ARGUMENT will be + // returned. + StreamContinuationTokens continuation_tokens = 6; + } + + // If specified, OK will be returned when the stream advances beyond + // this time. Otherwise, changes will be continuously delivered on the stream. + // This value is inclusive and will be truncated to microsecond granularity. + google.protobuf.Timestamp end_time = 5; + + // If specified, the duration between `Heartbeat` messages on the stream. + // Otherwise, defaults to 5 seconds. + google.protobuf.Duration heartbeat_duration = 7; +} + +// NOTE: This API is intended to be used by Apache Beam BigtableIO. +// Response message for Bigtable.ReadChangeStream. +message ReadChangeStreamResponse { + // A partial or complete mutation. + message MutationChunk { + // Information about the chunking of this mutation. + // Only `SetCell` mutations can be chunked, and all chunks for a `SetCell` + // will be delivered contiguously with no other mutation types interleaved. + message ChunkInfo { + // The total value size of all the chunks that make up the `SetCell`. + int32 chunked_value_size = 1; + + // The byte offset of this chunk into the total value size of the + // mutation. + int32 chunked_value_offset = 2; + + // When true, this is the last chunk of a chunked `SetCell`. + bool last_chunk = 3; + } + + // If set, then the mutation is a `SetCell` with a chunked value across + // multiple messages. + ChunkInfo chunk_info = 1; + + // If this is a continuation of a chunked message (`chunked_value_offset` > + // 0), ignore all fields except the `SetCell`'s value and merge it with + // the previous message by concatenating the value fields. + Mutation mutation = 2; + } + + // A message corresponding to one or more mutations to the partition + // being streamed. A single logical `DataChange` message may also be split + // across a sequence of multiple individual messages. Messages other than + // the first in a sequence will only have the `type` and `chunks` fields + // populated, with the final message in the sequence also containing `done` + // set to true. + message DataChange { + // The type of mutation. + enum Type { + // The type is unspecified. + TYPE_UNSPECIFIED = 0; + + // A user-initiated mutation. + USER = 1; + + // A system-initiated mutation as part of garbage collection. + // https://cloud.google.com/bigtable/docs/garbage-collection + GARBAGE_COLLECTION = 2; + + // This is a continuation of a multi-message change. + CONTINUATION = 3; + } + + // The type of the mutation. + Type type = 1; + + // The cluster where the mutation was applied. + // Not set when `type` is `GARBAGE_COLLECTION`. + string source_cluster_id = 2; + + // The row key for all mutations that are part of this `DataChange`. + // If the `DataChange` is chunked across multiple messages, then this field + // will only be set for the first message. + bytes row_key = 3; + + // The timestamp at which the mutation was applied on the Bigtable server. + google.protobuf.Timestamp commit_timestamp = 4; + + // A value that lets stream consumers reconstruct Bigtable's + // conflict resolution semantics. + // https://cloud.google.com/bigtable/docs/writes#conflict-resolution + // In the event that the same row key, column family, column qualifier, + // timestamp are modified on different clusters at the same + // `commit_timestamp`, the mutation with the larger `tiebreaker` will be the + // one chosen for the eventually consistent state of the system. + int32 tiebreaker = 5; + + // The mutations associated with this change to the partition. + // May contain complete mutations or chunks of a multi-message chunked + // `DataChange` record. + repeated MutationChunk chunks = 6; + + // When true, indicates that the entire `DataChange` has been read + // and the client can safely process the message. + bool done = 8; + + // An encoded position for this stream's partition to restart reading from. + // This token is for the StreamPartition from the request. + string token = 9; + + // An estimate of the commit timestamp that is usually lower than or equal + // to any timestamp for a record that will be delivered in the future on the + // stream. It is possible that, under particular circumstances that a future + // record has a timestamp that is lower than a previously seen timestamp. + // For an example usage see + // https://beam.apache.org/documentation/basics/#watermarks + google.protobuf.Timestamp estimated_low_watermark = 10; + } + + // A periodic message with information that can be used to checkpoint + // the state of a stream. + message Heartbeat { + // A token that can be provided to a subsequent `ReadChangeStream` call + // to pick up reading at the current stream position. + StreamContinuationToken continuation_token = 1; + + // An estimate of the commit timestamp that is usually lower than or equal + // to any timestamp for a record that will be delivered in the future on the + // stream. It is possible that, under particular circumstances that a future + // record has a timestamp that is lower than a previously seen timestamp. + // For an example usage see + // https://beam.apache.org/documentation/basics/#watermarks + google.protobuf.Timestamp estimated_low_watermark = 2; + } + + // A message indicating that the client should stop reading from the stream. + // If status is OK and `continuation_tokens` & `new_partitions` are empty, the + // stream has finished (for example if there was an `end_time` specified). + // If `continuation_tokens` & `new_partitions` are present, then a change in + // partitioning requires the client to open a new stream for each token to + // resume reading. Example: + // + // [B, D) ends + // | + // v + // new_partitions: [A, C) [C, E) + // continuation_tokens.partitions: [B,C) [C,D) + // ^---^ ^---^ + // ^ ^ + // | | + // | StreamContinuationToken 2 + // | + // StreamContinuationToken 1 + // + // To read the new partition [A,C), supply the continuation tokens whose + // ranges cover the new partition, for example ContinuationToken[A,B) & + // ContinuationToken[B,C). + message CloseStream { + // The status of the stream. + google.rpc.Status status = 1; + + // If non-empty, contains the information needed to resume reading their + // associated partitions. + repeated StreamContinuationToken continuation_tokens = 2; + + // If non-empty, contains the new partitions to start reading from, which + // are related to but not necessarily identical to the partitions for the + // above `continuation_tokens`. + repeated StreamPartition new_partitions = 3; + } + + // The data or control message on the stream. + oneof stream_record { + // A mutation to the partition. + DataChange data_change = 1; + + // A periodic heartbeat message. + Heartbeat heartbeat = 2; + + // An indication that the stream should be closed. + CloseStream close_stream = 3; + } +} + +// Request message for Bigtable.ExecuteQuery +message ExecuteQueryRequest { + // Required. The unique name of the instance against which the query should be + // executed. + // Values are of the form `projects//instances/` + string instance_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Optional. This value specifies routing for replication. If not specified, + // the `default` application profile will be used. + string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The query string. + // + // Exactly one of `query` and `prepared_query` is required. Setting both + // or neither is an `INVALID_ARGUMENT`. + string query = 3 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // A prepared query that was returned from `PrepareQueryResponse`. + // + // Exactly one of `query` and `prepared_query` is required. Setting both + // or neither is an `INVALID_ARGUMENT`. + // + // Setting this field also places restrictions on several other fields: + // - `data_format` must be empty. + // - `validate_only` must be false. + // - `params` must match the `param_types` set in the `PrepareQueryRequest`. + bytes prepared_query = 9; + + // Requested data format for the response. + // + // If `prepared_query` is set, then the `data_format` is fixed by the + // `PrepareQueryRequest`, and a non-empty `data_format` in the + // `ExecuteQueryRequest` will be rejected with `INVALID_ARGUMENT`. + oneof data_format { + // Protocol buffer format as described by ProtoSchema and ProtoRows + // messages. + ProtoFormat proto_format = 4 [deprecated = true]; + } + + // Optional. If this request is resuming a previously interrupted query + // execution, `resume_token` should be copied from the last + // PartialResultSet yielded before the interruption. Doing this + // enables the query execution to resume where the last one left + // off. + // The rest of the request parameters must exactly match the + // request that yielded this token. Otherwise the request will fail. + bytes resume_token = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. params contains string type keys and Bigtable type values that + // bind to placeholders in the query string. In query string, a parameter + // placeholder consists of the + // `@` character followed by the parameter name (for example, `@firstName`) in + // the query string. + // + // For example, if + // `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` + // then `@firstName` will be replaced with googlesql bytes value "foo" in the + // query string during query evaluation. + // + // If `Value.kind` is not set, the value is treated as a NULL value of the + // given type. For example, if + // `params["firstName"] = type {string_type {}}` + // then `@firstName` will be replaced with googlesql null string. + // + // If `query` is set, any empty `Value.type` in the map will be rejected with + // `INVALID_ARGUMENT`. + // + // If `prepared_query` is set, any empty `Value.type` in the map will be + // inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + // `Value.type` must match the corresponding `param_types` entry, or be + // rejected with `INVALID_ARGUMENT`. + map params = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. This map provides the runtime values returned by the + // VIEW_PARAMETERS() function calls, typically used for user-level scoping of + // data based on identity. + // + // The key is the name of the view parameter e.g. `user_id`, and + // the value is the parameter value e.g. `alice@example.com`. + map view_parameters = 12 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for Bigtable.ExecuteQuery +message ExecuteQueryResponse { + // The first response streamed from the server is of type `ResultSetMetadata` + // and includes information about the columns and types of the result set. + // From there on, we stream `PartialResultSet` messages with no additional + // information. `PartialResultSet` will contain `resume_token` to restart the + // response if query interrupts. In case of resumption with `resume_token`, + // the server will not resend the ResultSetMetadata. + oneof response { + // Structure of rows in this response stream. The first (and only the first) + // response streamed from the server will be of this type. + ResultSetMetadata metadata = 1; + + // A partial result set with row data potentially including additional + // instructions on how recent past and future partial responses should be + // interpreted. + PartialResultSet results = 2; + } +} + +// Request message for Bigtable.PrepareQuery +message PrepareQueryRequest { + // Required. The unique name of the instance against which the query should be + // executed. + // Values are of the form `projects//instances/` + string instance_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Optional. This value specifies routing for preparing the query. Note that + // this `app_profile_id` is only used for preparing the query. The actual + // query execution will use the app profile specified in the + // `ExecuteQueryRequest`. If not specified, the `default` application profile + // will be used. + string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The query string. + string query = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Requested data format for the response. Note that the selected + // data format is binding for all `ExecuteQuery` rpcs that use the prepared + // query. + oneof data_format { + // Protocol buffer format as described by ProtoSchema and ProtoRows + // messages. + ProtoFormat proto_format = 4; + } + + // Required. `param_types` is a map of parameter identifier strings to their + // `Type`s. + // + // In query string, a parameter placeholder consists of the + // `@` character followed by the parameter name (for example, `@firstName`) in + // the query string. + // + // For example, if param_types["firstName"] = Bytes then @firstName will be a + // query parameter of type Bytes. The specific `Value` to be used for the + // query execution must be sent in `ExecuteQueryRequest` in the `params` map. + map param_types = 6 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for Bigtable.PrepareQueryResponse +message PrepareQueryResponse { + // Structure of rows in the response stream of `ExecuteQueryResponse` for the + // returned `prepared_query`. + ResultSetMetadata metadata = 1; + + // A serialized prepared query. Clients should treat this as an opaque + // blob of bytes to send in `ExecuteQueryRequest`. + bytes prepared_query = 2; + + // The time at which the prepared query token becomes invalid. + // A token may become invalid early due to changes in the data being read, but + // it provides a guideline to refresh query plans asynchronously. + google.protobuf.Timestamp valid_until = 3; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/data.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/data.proto new file mode 100644 index 000000000000..010637b0016a --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/data.proto @@ -0,0 +1,871 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.v2; + +import "google/api/field_behavior.proto"; +import "google/bigtable/v2/types.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "DataProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// Specifies the complete (requested) contents of a single row of a table. +// Rows which exceed 256MiB in size cannot be read in full. +message Row { + // The unique key which identifies this row within its table. This is the same + // key that's used to identify the row in, for example, a MutateRowRequest. + // May contain any non-empty byte string up to 4KiB in length. + bytes key = 1; + + // May be empty, but only if the entire row is empty. + // The mutual ordering of column families is not specified. + repeated Family families = 2; +} + +// Specifies (some of) the contents of a single row/column family intersection +// of a table. +message Family { + // The unique key which identifies this family within its row. This is the + // same key that's used to identify the family in, for example, a RowFilter + // which sets its "family_name_regex_filter" field. + // Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may + // produce cells in a sentinel family with an empty name. + // Must be no greater than 64 characters in length. + string name = 1; + + // Must not be empty. Sorted in order of increasing "qualifier". + repeated Column columns = 2; +} + +// Specifies (some of) the contents of a single row/column intersection of a +// table. +message Column { + // The unique key which identifies this column within its family. This is the + // same key that's used to identify the column in, for example, a RowFilter + // which sets its `column_qualifier_regex_filter` field. + // May contain any byte string, including the empty string, up to 16kiB in + // length. + bytes qualifier = 1; + + // Must not be empty. Sorted in order of decreasing "timestamp_micros". + repeated Cell cells = 2; +} + +// Specifies (some of) the contents of a single row/column/timestamp of a table. +message Cell { + // The cell's stored timestamp, which also uniquely identifies it within + // its column. + // Values are always expressed in microseconds, but individual tables may set + // a coarser granularity to further restrict the allowed values. For + // example, a table which specifies millisecond granularity will only allow + // values of `timestamp_micros` which are multiples of 1000. + int64 timestamp_micros = 1; + + // The value stored in the cell. + // May contain any byte string, including the empty string, up to 100MiB in + // length. + bytes value = 2; + + // Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. + repeated string labels = 3; +} + +// `Value` represents a dynamically typed value. +// The typed fields in `Value` are used as a transport encoding for the actual +// value (which may be of a more complex type). See the documentation of the +// `Type` message for more details. +message Value { + // The verified `Type` of this `Value`, if it cannot be inferred. + // + // Read results will never specify the encoding for `type` since the value + // will already have been decoded by the server. Furthermore, the `type` will + // be omitted entirely if it can be inferred from a previous response. The + // exact semantics for inferring `type` will vary, and are therefore + // documented separately for each read method. + // + // When using composite types (Struct, Array, Map) only the outermost `Value` + // will specify the `type`. This top-level `type` will define the types for + // any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. + // If a nested `Value` provides a `type` on write, the request will be + // rejected with INVALID_ARGUMENT. + Type type = 7; + + // Options for transporting values within the protobuf type system. A given + // `kind` may support more than one `type` and vice versa. On write, this is + // roughly analogous to a GoogleSQL literal. + // + // The value is `NULL` if none of the fields in `kind` is set. If `type` is + // also omitted on write, we will infer it based on the schema. + oneof kind { + // Represents a raw byte sequence with no type information. + // The `type` field must be omitted. + bytes raw_value = 8; + + // Represents a raw cell timestamp with no type information. + // The `type` field must be omitted. + int64 raw_timestamp_micros = 9; + + // Represents a typed value transported as a byte sequence. + bytes bytes_value = 2; + + // Represents a typed value transported as a string. + string string_value = 3; + + // Represents a typed value transported as an integer. + int64 int_value = 6; + + // Represents a typed value transported as a boolean. + bool bool_value = 10; + + // Represents a typed value transported as a floating point number. + // Does not support NaN or infinities. + double float_value = 11; + + // Represents a typed value transported as a timestamp. + google.protobuf.Timestamp timestamp_value = 12; + + // Represents a typed value transported as a date. + google.type.Date date_value = 13; + + // Represents a typed value transported as a sequence of values. + // To differentiate between `Struct`, `Array`, and `Map`, the outermost + // `Value` must provide an explicit `type` on write. This `type` will + // apply recursively to the nested `Struct` fields, `Array` elements, + // or `Map` key/value pairs, which *must not* supply their own `type`. + ArrayValue array_value = 4; + } +} + +// `ArrayValue` is an ordered list of `Value`. +message ArrayValue { + // The ordered elements in the array. + repeated Value values = 1; +} + +// Specifies a contiguous range of rows. +message RowRange { + // The row key at which to start the range. + // If neither field is set, interpreted as the empty string, inclusive. + oneof start_key { + // Used when giving an inclusive lower bound for the range. + bytes start_key_closed = 1; + + // Used when giving an exclusive lower bound for the range. + bytes start_key_open = 2; + } + + // The row key at which to end the range. + // If neither field is set, interpreted as the infinite row key, exclusive. + oneof end_key { + // Used when giving an exclusive upper bound for the range. + bytes end_key_open = 3; + + // Used when giving an inclusive upper bound for the range. + bytes end_key_closed = 4; + } +} + +// Specifies a non-contiguous set of rows. +message RowSet { + // Single rows included in the set. + repeated bytes row_keys = 1; + + // Contiguous row ranges included in the set. + repeated RowRange row_ranges = 2; +} + +// Specifies a contiguous range of columns within a single column family. +// The range spans from <column_family>:<start_qualifier> to +// <column_family>:<end_qualifier>, where both bounds can be either +// inclusive or exclusive. +message ColumnRange { + // The name of the column family within which this range falls. + string family_name = 1; + + // The column qualifier at which to start the range (within `column_family`). + // If neither field is set, interpreted as the empty string, inclusive. + oneof start_qualifier { + // Used when giving an inclusive lower bound for the range. + bytes start_qualifier_closed = 2; + + // Used when giving an exclusive lower bound for the range. + bytes start_qualifier_open = 3; + } + + // The column qualifier at which to end the range (within `column_family`). + // If neither field is set, interpreted as the infinite string, exclusive. + oneof end_qualifier { + // Used when giving an inclusive upper bound for the range. + bytes end_qualifier_closed = 4; + + // Used when giving an exclusive upper bound for the range. + bytes end_qualifier_open = 5; + } +} + +// Specified a contiguous range of microsecond timestamps. +message TimestampRange { + // Inclusive lower bound. If left empty, interpreted as 0. + int64 start_timestamp_micros = 1; + + // Exclusive upper bound. If left empty, interpreted as infinity. + int64 end_timestamp_micros = 2; +} + +// Specifies a contiguous range of raw byte values. +message ValueRange { + // The value at which to start the range. + // If neither field is set, interpreted as the empty string, inclusive. + oneof start_value { + // Used when giving an inclusive lower bound for the range. + bytes start_value_closed = 1; + + // Used when giving an exclusive lower bound for the range. + bytes start_value_open = 2; + } + + // The value at which to end the range. + // If neither field is set, interpreted as the infinite string, exclusive. + oneof end_value { + // Used when giving an inclusive upper bound for the range. + bytes end_value_closed = 3; + + // Used when giving an exclusive upper bound for the range. + bytes end_value_open = 4; + } +} + +// Restricts the output to cells whose values match the given bitmask. +message ValueBitmask { + // Required. Mask applied to the value. + // Evaluated as: `(value & mask) == mask` + // The mask length must exactly match the value length, otherwise the cell is + // not considered a match. + bytes mask = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Takes a row as input and produces an alternate view of the row based on +// specified rules. For example, a RowFilter might trim down a row to include +// just the cells from columns matching a given regular expression, or might +// return all the cells of a row but not their values. More complicated filters +// can be composed out of these components to express requests such as, "within +// every column of a particular family, give just the two most recent cells +// which are older than timestamp X." +// +// There are two broad categories of RowFilters (true filters and transformers), +// as well as two ways to compose simple filters into more complex ones +// (chains and interleaves). They work as follows: +// +// * True filters alter the input row by excluding some of its cells wholesale +// from the output row. An example of a true filter is the `value_regex_filter`, +// which excludes cells whose values don't match the specified pattern. All +// regex true filters use RE2 syntax (https://github.com/google/re2/wiki/Syntax) +// in raw byte mode (RE2::Latin1), and are evaluated as full matches. An +// important point to keep in mind is that `RE2(.)` is equivalent by default to +// `RE2([^\n])`, meaning that it does not match newlines. When attempting to +// match an arbitrary byte, you should therefore use the escape sequence `\C`, +// which may need to be further escaped as `\\C` in your client language. +// +// * Transformers alter the input row by changing the values of some of its +// cells in the output, without excluding them completely. Currently, the only +// supported transformer is the `strip_value_transformer`, which replaces every +// cell's value with the empty string. +// +// * Chains and interleaves are described in more detail in the +// RowFilter.Chain and RowFilter.Interleave documentation. +// +// The total serialized size of a RowFilter message must not +// exceed 20480 bytes, and RowFilters may not be nested within each other +// (in Chains or Interleaves) to a depth of more than 20. +message RowFilter { + // A RowFilter which sends rows through several RowFilters in sequence. + message Chain { + // The elements of "filters" are chained together to process the input row: + // in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row + // The full chain is executed atomically. + repeated RowFilter filters = 1; + } + + // A RowFilter which sends each row to each of several component + // RowFilters and interleaves the results. + message Interleave { + // The elements of "filters" all process a copy of the input row, and the + // results are pooled, sorted, and combined into a single output row. + // If multiple cells are produced with the same column and timestamp, + // they will all appear in the output row in an unspecified mutual order. + // Consider the following example, with three filters: + // + // input row + // | + // ----------------------------------------------------- + // | | | + // f(0) f(1) f(2) + // | | | + // 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + // 2: foo,blah,11,z far,blah,5,x far,blah,5,x + // | | | + // ----------------------------------------------------- + // | + // 1: foo,bar,10,z // could have switched with #2 + // 2: foo,bar,10,x // could have switched with #1 + // 3: foo,blah,11,z + // 4: far,bar,7,a + // 5: far,blah,5,x // identical to #6 + // 6: far,blah,5,x // identical to #5 + // + // All interleaved filters are executed atomically. + repeated RowFilter filters = 1; + } + + // A RowFilter which evaluates one of two possible RowFilters, depending on + // whether or not a predicate RowFilter outputs any cells from the input row. + // + // IMPORTANT NOTE: The predicate filter does not execute atomically with the + // true and false filters, which may lead to inconsistent or unexpected + // results. Additionally, Condition filters have poor performance, especially + // when filters are set for the false condition. + message Condition { + // If `predicate_filter` outputs any cells, then `true_filter` will be + // evaluated on the input row. Otherwise, `false_filter` will be evaluated. + RowFilter predicate_filter = 1; + + // The filter to apply to the input row if `predicate_filter` returns any + // results. If not provided, no results will be returned in the true case. + RowFilter true_filter = 2; + + // The filter to apply to the input row if `predicate_filter` does not + // return any results. If not provided, no results will be returned in the + // false case. + RowFilter false_filter = 3; + } + + // Which of the possible RowFilter types to apply. If none are set, this + // RowFilter returns all cells in the input row. + oneof filter { + // Applies several RowFilters to the data in sequence, progressively + // narrowing the results. + Chain chain = 1; + + // Applies several RowFilters to the data in parallel and combines the + // results. + Interleave interleave = 2; + + // Applies one of two possible RowFilters to the data based on the output of + // a predicate RowFilter. + Condition condition = 3; + + // ADVANCED USE ONLY. + // Hook for introspection into the RowFilter. Outputs all cells directly to + // the output of the read rather than to any parent filter. Consider the + // following example: + // + // Chain( + // FamilyRegex("A"), + // Interleave( + // All(), + // Chain(Label("foo"), Sink()) + // ), + // QualifierRegex("B") + // ) + // + // A,A,1,w + // A,B,2,x + // B,B,4,z + // | + // FamilyRegex("A") + // | + // A,A,1,w + // A,B,2,x + // | + // +------------+-------------+ + // | | + // All() Label(foo) + // | | + // A,A,1,w A,A,1,w,labels:[foo] + // A,B,2,x A,B,2,x,labels:[foo] + // | | + // | Sink() --------------+ + // | | | + // +------------+ x------+ A,A,1,w,labels:[foo] + // | A,B,2,x,labels:[foo] + // A,A,1,w | + // A,B,2,x | + // | | + // QualifierRegex("B") | + // | | + // A,B,2,x | + // | | + // +--------------------------------+ + // | + // A,A,1,w,labels:[foo] + // A,B,2,x,labels:[foo] // could be switched + // A,B,2,x // could be switched + // + // Despite being excluded by the qualifier filter, a copy of every cell + // that reaches the sink is present in the final result. + // + // As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], + // duplicate cells are possible, and appear in an unspecified mutual order. + // In this case we have a duplicate with column "A:B" and timestamp 2, + // because one copy passed through the all filter while the other was + // passed through the label and sink. Note that one copy has label "foo", + // while the other does not. + // + // Cannot be used within the `predicate_filter`, `true_filter`, or + // `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. + bool sink = 16; + + // Matches all cells, regardless of input. Functionally equivalent to + // leaving `filter` unset, but included for completeness. + bool pass_all_filter = 17; + + // Does not match any cells, regardless of input. Useful for temporarily + // disabling just part of a filter. + bool block_all_filter = 18; + + // Matches only cells from rows whose keys satisfy the given RE2 regex. In + // other words, passes through the entire row when the key matches, and + // otherwise produces an empty row. + // Note that, since row keys can contain arbitrary bytes, the `\C` escape + // sequence must be used if a true wildcard is desired. The `.` character + // will not match the new line character `\n`, which may be present in a + // binary key. + bytes row_key_regex_filter = 4; + + // Matches all cells from a row with probability p, and matches no cells + // from the row with probability 1-p. + double row_sample_filter = 14; + + // Matches only cells from columns whose families satisfy the given RE2 + // regex. For technical reasons, the regex must not contain the `:` + // character, even if it is not being used as a literal. + // Note that, since column families cannot contain the new line character + // `\n`, it is sufficient to use `.` as a full wildcard when matching + // column family names. + string family_name_regex_filter = 5; + + // Matches only cells from columns whose qualifiers satisfy the given RE2 + // regex. + // Note that, since column qualifiers can contain arbitrary bytes, the `\C` + // escape sequence must be used if a true wildcard is desired. The `.` + // character will not match the new line character `\n`, which may be + // present in a binary qualifier. + bytes column_qualifier_regex_filter = 6; + + // Matches only cells from columns within the given range. + ColumnRange column_range_filter = 7; + + // Matches only cells with timestamps within the given range. + TimestampRange timestamp_range_filter = 8; + + // Matches only cells with values that satisfy the given regular expression. + // Note that, since cell values can contain arbitrary bytes, the `\C` escape + // sequence must be used if a true wildcard is desired. The `.` character + // will not match the new line character `\n`, which may be present in a + // binary value. + bytes value_regex_filter = 9; + + // Matches only cells with values that fall within the given range. + ValueRange value_range_filter = 15; + + // Skips the first N cells of each row, matching all subsequent cells. + // If duplicate cells are present, as is possible when using an Interleave, + // each copy of the cell is counted separately. + int32 cells_per_row_offset_filter = 10; + + // Matches only the first N cells of each row. + // If duplicate cells are present, as is possible when using an Interleave, + // each copy of the cell is counted separately. + int32 cells_per_row_limit_filter = 11; + + // Matches only the most recent N cells within each column. For example, + // if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, + // skip all earlier cells in `foo:bar`, and then begin matching again in + // column `foo:bar2`. + // If duplicate cells are present, as is possible when using an Interleave, + // each copy of the cell is counted separately. + int32 cells_per_column_limit_filter = 12; + + // Replaces each cell's value with the empty string. + bool strip_value_transformer = 13; + + // Applies the given label to all cells in the output row. This allows + // the client to determine which results were produced from which part of + // the filter. + // + // Values must be at most 15 characters in length, and match the RE2 + // pattern `[a-z0-9\\-]+` + // + // Due to a technical limitation, it is not currently possible to apply + // multiple labels to a cell. As a result, a Chain may have no more than + // one sub-filter which contains a `apply_label_transformer`. It is okay for + // an Interleave to contain multiple `apply_label_transformers`, as they + // will be applied to separate copies of the input. This may be relaxed in + // the future. + string apply_label_transformer = 19; + + // Matches only cells with values that satisfy the condition `(value & mask) + // == mask`. + // The mask length must exactly match the value length, otherwise the cell + // is not considered a match. + ValueBitmask value_bitmask_filter = 20; + } +} + +// Specifies a particular change to be made to the contents of a row. +message Mutation { + // A Mutation which sets the value of the specified cell. + message SetCell { + // The name of the family into which new data should be written. + // Must match `[-_.a-zA-Z0-9]+` + string family_name = 1; + + // The qualifier of the column into which new data should be written. + // Can be any byte string, including the empty string. + bytes column_qualifier = 2; + + // The timestamp of the cell into which new data should be written. + // Use -1 for current Bigtable server time. + // Otherwise, the client should set this value itself, noting that the + // default value is a timestamp of zero if the field is left unspecified. + // Values must match the granularity of the table (e.g. micros, millis). + int64 timestamp_micros = 3; + + // The value to be written into the specified cell. + bytes value = 4; + } + + // A Mutation which incrementally updates a cell in an `Aggregate` family. + message AddToCell { + // The name of the `Aggregate` family into which new data should be added. + // This must be a family with a `value_type` of `Aggregate`. + // Format: `[-_.a-zA-Z0-9]+` + string family_name = 1; + + // The qualifier of the column into which new data should be added. This + // must be a `raw_value`. + Value column_qualifier = 2; + + // The timestamp of the cell to which new data should be added. This must + // be a `raw_timestamp_micros` that matches the table's `granularity`. + Value timestamp = 3; + + // The input value to be accumulated into the specified cell. This must be + // compatible with the family's `value_type.input_type`. + Value input = 4; + } + + // A Mutation which merges accumulated state into a cell in an `Aggregate` + // family. + message MergeToCell { + // The name of the `Aggregate` family into which new data should be added. + // This must be a family with a `value_type` of `Aggregate`. + // Format: `[-_.a-zA-Z0-9]+` + string family_name = 1; + + // The qualifier of the column into which new data should be added. This + // must be a `raw_value`. + Value column_qualifier = 2; + + // The timestamp of the cell to which new data should be added. This must + // be a `raw_timestamp_micros` that matches the table's `granularity`. + Value timestamp = 3; + + // The input value to be merged into the specified cell. This must be + // compatible with the family's `value_type.state_type`. Merging `NULL` is + // allowed, but has no effect. + Value input = 4; + } + + // A Mutation which deletes cells from the specified column, optionally + // restricting the deletions to a given timestamp range. + message DeleteFromColumn { + // The name of the family from which cells should be deleted. + // Must match `[-_.a-zA-Z0-9]+` + string family_name = 1; + + // The qualifier of the column from which cells should be deleted. + // Can be any byte string, including the empty string. + bytes column_qualifier = 2; + + // The range of timestamps within which cells should be deleted. + TimestampRange time_range = 3; + } + + // A Mutation which deletes all cells from the specified column family. + message DeleteFromFamily { + // The name of the family from which cells should be deleted. + // Must match `[-_.a-zA-Z0-9]+` + string family_name = 1; + } + + // A Mutation which deletes all cells from the containing row. + message DeleteFromRow {} + + // Which of the possible Mutation types to apply. + oneof mutation { + // Set a cell's value. + SetCell set_cell = 1; + + // Incrementally updates an `Aggregate` cell. + AddToCell add_to_cell = 5; + + // Merges accumulated state to an `Aggregate` cell. + MergeToCell merge_to_cell = 6; + + // Deletes cells from a column. + DeleteFromColumn delete_from_column = 2; + + // Deletes cells from a column family. + DeleteFromFamily delete_from_family = 3; + + // Deletes cells from the entire row. + DeleteFromRow delete_from_row = 4; + } +} + +// Specifies an atomic read/modify/write operation on the latest value of the +// specified column. +message ReadModifyWriteRule { + // The name of the family to which the read/modify/write should be applied. + // Must match `[-_.a-zA-Z0-9]+` + string family_name = 1; + + // The qualifier of the column to which the read/modify/write should be + // applied. + // Can be any byte string, including the empty string. + bytes column_qualifier = 2; + + // The rule used to determine the column's new latest value from its current + // latest value. + oneof rule { + // Rule specifying that `append_value` be appended to the existing value. + // If the targeted cell is unset, it will be treated as containing the + // empty string. + bytes append_value = 3; + + // Rule specifying that `increment_amount` be added to the existing value. + // If the targeted cell is unset, it will be treated as containing a zero. + // Otherwise, the targeted cell must contain an 8-byte value (interpreted + // as a 64-bit big-endian signed integer), or the entire request will fail. + int64 increment_amount = 4; + } +} + +// NOTE: This API is intended to be used by Apache Beam BigtableIO. +// A partition of a change stream. +message StreamPartition { + // The row range covered by this partition and is specified by + // [`start_key_closed`, `end_key_open`). + RowRange row_range = 1; +} + +// NOTE: This API is intended to be used by Apache Beam BigtableIO. +// The information required to continue reading the data from multiple +// `StreamPartitions` from where a previous read left off. +message StreamContinuationTokens { + // List of continuation tokens. + repeated StreamContinuationToken tokens = 1; +} + +// NOTE: This API is intended to be used by Apache Beam BigtableIO. +// The information required to continue reading the data from a +// `StreamPartition` from where a previous read left off. +message StreamContinuationToken { + // The partition that this token applies to. + StreamPartition partition = 1; + + // An encoded position in the stream to restart reading from. + string token = 2; +} + +// Protocol buffers format descriptor, as described by Messages ProtoSchema and +// ProtoRows +message ProtoFormat {} + +// Describes a column in a Bigtable Query Language result set. +message ColumnMetadata { + // The name of the column. + string name = 1; + + // The type of the column. + Type type = 2; +} + +// ResultSet schema in proto format +message ProtoSchema { + // The columns in the result set. + repeated ColumnMetadata columns = 1; +} + +// Describes the structure of a Bigtable result set. +message ResultSetMetadata { + // The schema of the ResultSet, contains ordered list of column names + // with types + oneof schema { + // Schema in proto format + ProtoSchema proto_schema = 1; + } +} + +// Rows represented in proto format. +// +// This should be constructed by concatenating the `batch_data` from each +// of the relevant `ProtoRowsBatch` messages and parsing the result as a +// `ProtoRows` message. +message ProtoRows { + // A proto rows message consists of a list of values. Every N complete values + // defines a row, where N is equal to the number of entries in the + // `metadata.proto_schema.columns` value received in the first response. + repeated Value values = 2; +} + +// A part of a serialized `ProtoRows` message. +message ProtoRowsBatch { + // Part of a serialized `ProtoRows` message. + // A complete, parseable ProtoRows message is constructed by + // concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The + // `PartialResultSet` that contains the last part has `complete_batch` set to + // `true`. + bytes batch_data = 1; +} + +// A partial result set from the streaming query API. +// Cloud Bigtable clients buffer partial results received in this message until +// a `resume_token` is received. +// +// The pseudocode below describes how to buffer and parse a stream of +// `PartialResultSet` messages. +// +// Having: +// - queue of row results waiting to be returned `queue` +// - extensible buffer of bytes `buffer` +// - a place to keep track of the most recent `resume_token` +// for each PartialResultSet `p` received { +// if p.reset { +// ensure `queue` is empty +// ensure `buffer` is empty +// } +// if p.estimated_batch_size != 0 { +// (optional) ensure `buffer` is sized to at least `p.estimated_batch_size` +// } +// if `p.proto_rows_batch` is set { +// append `p.proto_rows_batch.bytes` to `buffer` +// } +// if p.batch_checksum is set and `buffer` is not empty { +// validate the checksum matches the contents of `buffer` +// (see comments on `batch_checksum`) +// parse `buffer` as `ProtoRows` message, clearing `buffer` +// add parsed rows to end of `queue` +// } +// if p.resume_token is set { +// release results in `queue` +// save `p.resume_token` in `resume_token` +// } +// } +message PartialResultSet { + // Some rows of the result set in one of the supported formats. + // + // Multiple `PartialResultSet` messages may be sent to represent a complete + // response. The client should buffer data constructed from the fields in + // `partial_rows` until a non-empty `resume_token` is received. Each + // sub-message documents the appropriate way to combine results. + oneof partial_rows { + // Partial rows in serialized ProtoRows format. + ProtoRowsBatch proto_rows_batch = 3; + } + + // CRC32C checksum of concatenated `partial_rows` data for the current batch. + // + // When present, the buffered data from `partial_rows` forms a complete + // parseable message of the appropriate type. + // + // The client should mark the end of a parseable message and prepare to + // receive a new one starting from the next `PartialResultSet` message. + // Clients must verify the checksum of the serialized batch before yielding it + // to the caller. + // + // This does NOT mean the values can be yielded to the callers since a + // `resume_token` is required to safely do so. + // + // If `resume_token` is non-empty and any data has been received since the + // last one, this field is guaranteed to be non-empty. In other words, clients + // may assume that a batch will never cross a `resume_token` boundary. + optional uint32 batch_checksum = 6; + + // An opaque token sent by the server to allow query resumption and signal + // that the buffered values constructed from received `partial_rows` can be + // yielded to the caller. Clients can provide this token in a subsequent + // request to resume the result stream from the current point. + // + // When `resume_token` is non-empty, the buffered values received from + // `partial_rows` since the last non-empty `resume_token` can be yielded to + // the callers, provided that the client keeps the value of `resume_token` and + // uses it on subsequent retries. + // + // A `resume_token` may be sent without information in `partial_rows` to + // checkpoint the progress of a sparse query. Any previous `partial_rows` data + // should still be yielded in this case, and the new `resume_token` should be + // saved for future retries as normal. + // + // A `resume_token` will only be sent on a boundary where there is either no + // ongoing result batch, or `batch_checksum` is also populated. + // + // The server will also send a sentinel `resume_token` when last batch of + // `partial_rows` is sent. If the client retries the ExecuteQueryRequest with + // the sentinel `resume_token`, the server will emit it again without any + // data in `partial_rows`, then return OK. + bytes resume_token = 5; + + // If `true`, any data buffered since the last non-empty `resume_token` must + // be discarded before the other parts of this message, if any, are handled. + bool reset = 7; + + // Estimated size of the buffer required to hold the next batch of results. + // + // This value will be sent with the first `partial_rows` of a batch. That is, + // on the first `partial_rows` received in a stream, on the first message + // after a `batch_checksum` message, and any time `reset` is true. + // + // The client can use this estimate to allocate a buffer for the next batch of + // results. This helps minimize the number of allocations required, though the + // buffer size may still need to be increased if the estimate is too low. + int32 estimated_batch_size = 4; +} + +// Parameters on mutations where clients want to ensure idempotency (i.e. +// at-most-once semantics). This is currently only needed for certain aggregate +// types. +message Idempotency { + // Unique token used to identify replays of this mutation. + // Must be at least 8 bytes long. + bytes token = 1; + + // Client-assigned timestamp when the mutation's first attempt was sent. + // Used to reject mutations that arrive after idempotency protection may + // have expired. May cause spurious rejections if clock skew is too high. + // + // Leave unset or zero to always accept the mutation, at the risk of + // double counting if the protection for previous attempts has expired. + google.protobuf.Timestamp start_time = 2; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/feature_flags.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/feature_flags.proto new file mode 100644 index 000000000000..6cf9ca5b81ac --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/feature_flags.proto @@ -0,0 +1,79 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.v2; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +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 or enabled 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 end users +// directly. +message FeatureFlags { + // Notify the server that the client supports reverse scans. The server will + // reject ReadRowsRequests with the reverse bit set when this is absent. + bool reverse_scans = 1; + + // Notify the server that the client enables batch write flow control by + // requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, + // this disables partial retries. + bool mutate_rows_rate_limit = 3; + + // Notify the server that the client enables batch write flow control by + // requesting RateLimitInfo from MutateRowsResponse. With partial retries + // enabled. + bool mutate_rows_rate_limit2 = 5; + + // Notify the server that the client supports the last_scanned_row field + // in ReadRowsResponse for long-running scans. + bool last_scanned_row_responses = 4; + + // Notify the server that the client supports using encoded routing cookie + // strings to retry requests with. + bool routing_cookie = 6; + + // Notify the server that the client supports using retry info back off + // durations to retry requests with. + bool retry_info = 7; + + // Notify the server that the client has client side metrics enabled. + bool client_side_metrics_enabled = 8; + + // Notify the server that the client using Traffic Director endpoint. + bool traffic_director_enabled = 9; + + // Notify the server that the client explicitly opted in for Direct Access. + bool direct_access_requested = 10; + + // If the client can support using BigtablePeerInfo. + bool peer_info = 11; + + // Indicates whether the client supports the Bigtable Sessions API. + bool sessions_compatible = 12; + + // Internal flag to force sessions for internal projects. + bool sessions_required = 13; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/peer_info.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/peer_info.proto new file mode 100644 index 000000000000..6a89fbf9ed59 --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/peer_info.proto @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.v2; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "PeerInfoProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// PeerInfo contains information about the peer that the client is +// connecting to. +message PeerInfo { + // The transport type that the client used to connect to this peer. + enum TransportType { + // The transport type is unknown. + TRANSPORT_TYPE_UNKNOWN = 0; + + // The client connected to this peer via an external network + // (e.g. outside Google Coud). + TRANSPORT_TYPE_EXTERNAL = 1; + + // The client connected to this peer via CloudPath. + TRANSPORT_TYPE_CLOUD_PATH = 2; + + // The client connected to this peer via DirectAccess. + TRANSPORT_TYPE_DIRECT_ACCESS = 3; + + // The client connected to this peer via Bigtable Sessions using an unknown + // transport type. + TRANSPORT_TYPE_SESSION_UNKNOWN = 4; + + // The client connected to this peer via Bigtable Sessions on an external + // network (e.g. outside Google Cloud). + TRANSPORT_TYPE_SESSION_EXTERNAL = 5; + + // The client connected to this peer via Bigtable Sessions using CloudPath. + TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6; + + // The client connected to this peer via Bigtable Sessions using + // DirectAccess. + TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7; + } + + // An opaque identifier for the Google Frontend which serviced this request. + // Only set when not using DirectAccess. + int64 google_frontend_id = 1; + + // An opaque identifier for the application frontend which serviced this + // request. + int64 application_frontend_id = 2; + + // The Cloud region of the application frontend that served this request. + string application_frontend_region = 6; + + // The Cloud zone of the application frontend that served this request. + string application_frontend_zone = 3 [deprecated = true]; + + // The subzone of the application frontend that served this request, e.g. an + // identifier for where within a zone (within the reported region) the + // application frontend is. + string application_frontend_subzone = 4; + + TransportType transport_type = 5; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/request_stats.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/request_stats.proto new file mode 100644 index 000000000000..bcebc08e65a2 --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/request_stats.proto @@ -0,0 +1,112 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.v2; + +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "RequestStatsProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// +// Messages related to RequestStats, part of the Query Stats feature, that can +// help understand the performance of requests. +// +// The layout of requests below is as follows: +// * RequestStats serves as the top-level container for statistics and +// measures related to Bigtable requests. This common object is returned as +// part of methods in the Data API. +// * RequestStats contains multiple *views* of related data, chosen by an +// option in the source Data API method. The view that is returned is +// designed to have all submessages (and their submessages, and so on) +// filled-in, to provide a comprehensive selection of statistics and +// measures related to the requested view. + +// ReadIterationStats captures information about the iteration of rows or cells +// over the course of a read, e.g. how many results were scanned in a read +// operation versus the results returned. +message ReadIterationStats { + // The rows seen (scanned) as part of the request. This includes the count of + // rows returned, as captured below. + int64 rows_seen_count = 1; + + // The rows returned as part of the request. + int64 rows_returned_count = 2; + + // The cells seen (scanned) as part of the request. This includes the count of + // cells returned, as captured below. + int64 cells_seen_count = 3; + + // The cells returned as part of the request. + int64 cells_returned_count = 4; +} + +// RequestLatencyStats provides a measurement of the latency of the request as +// it interacts with different systems over its lifetime, e.g. how long the +// request took to execute within a frontend server. +message RequestLatencyStats { + // The latency measured by the frontend server handling this request, from + // when the request was received, to when this value is sent back in the + // response. For more context on the component that is measuring this latency, + // see: https://cloud.google.com/bigtable/docs/overview + // + // Note: This value may be slightly shorter than the value reported into + // aggregate latency metrics in Monitoring for this request + // (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value + // needs to be sent in the response before the latency measurement including + // that transmission is finalized. + // + // Note: This value includes the end-to-end latency of contacting nodes in + // the targeted cluster, e.g. measuring from when the first byte arrives at + // the frontend server, to when this value is sent back as the last value in + // the response, including any latency incurred by contacting nodes, waiting + // for results from nodes, and finally sending results from nodes back to the + // caller. + google.protobuf.Duration frontend_server_latency = 1; +} + +// FullReadStatsView captures all known information about a read. +message FullReadStatsView { + // Iteration stats describe how efficient the read is, e.g. comparing + // rows seen vs. rows returned or cells seen vs cells returned can provide an + // indication of read efficiency (the higher the ratio of seen to retuned the + // better). + ReadIterationStats read_iteration_stats = 1; + + // Request latency stats describe the time taken to complete a request, from + // the server side. + RequestLatencyStats request_latency_stats = 2; +} + +// RequestStats is the container for additional information pertaining to a +// single request, helpful for evaluating the performance of the sent request. +// Currently, the following method is supported: google.bigtable.v2.ReadRows +message RequestStats { + // Information pertaining to each request type received. The type is chosen + // based on the requested view. + // + // See the messages above for additional context. + oneof stats_view { + // Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL + // view, see package google.bigtable.v2. + FullReadStatsView full_read_stats_view = 1; + } +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/response_params.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/response_params.proto new file mode 100644 index 000000000000..9a48e2008f5b --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/response_params.proto @@ -0,0 +1,38 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.v2; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "ResponseParamsProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// Response metadata proto +message ResponseParams { + // The cloud bigtable zone associated with the cluster. + optional string zone_id = 1; + + // Identifier for a cluster that represents set of + // bigtable resources. + optional string cluster_id = 2; + + // The AFE ID for the AFE that is served this request. + optional int64 afe_id = 3; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/session.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/session.proto new file mode 100644 index 000000000000..06faaf9dda71 --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/session.proto @@ -0,0 +1,706 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/bigtable/v2/data.proto"; +import "google/bigtable/v2/feature_flags.proto"; +import "google/bigtable/v2/request_stats.proto"; +import "google/protobuf/descriptor.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/error_details.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "SessionProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +extend google.protobuf.MessageOptions { + // Only OpenSessionRequest.payload's with a type matching rpc_session_type are + // accepted by the server, and only OpenSessionResponse.payload's with a type + // matching rpc_session_type are accepted by the client. + google.bigtable.v2.SessionType open_session_type = 138898474; + + // Only VirtualRpcRequest.payload's with a type matching rpc_session_type are + // accepted by the server, and only VirtualRpcResponse.payload's with a type + // matching rpc_session_type are accepted by the client. + repeated google.bigtable.v2.SessionType vrpc_session_type = 138899157; +} + +extend google.protobuf.MethodOptions { + // All session service methods must set this option to indicate which + // messages are permissible within the generic envelope. + google.bigtable.v2.SessionType rpc_session_type = 137964804; +} + +// Supported session types. +enum SessionType { + SESSION_TYPE_UNSET = 0; + + SESSION_TYPE_TABLE = 1; + + SESSION_TYPE_AUTHORIZED_VIEW = 2; + + SESSION_TYPE_MATERIALIZED_VIEW = 3; + + // For internal protocol testing only. + SESSION_TYPE_TEST = 9999; +} + +// See GetClientConfiguration() RPC in bigtable.proto. Internal usage only. +message GetClientConfigurationRequest { + // Required. The unique name of the instance for which the client will target + // with Data API requests. + // + // Values are of the form `projects//instances/` + string instance_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Optional. The name of the AppProfile which will be used by the client when + // sending requests in the Data API. + // + // If not specified, the `default` application profile will be used. + string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for how to balance vRPCs over sessions. Internal usage only. +message LoadBalancingOptions { + // Balances vRPCs over backends, preferring to send new vRPCs to AFEs with the + // least number of active vRPCs. + message LeastInFlight { + // Of all connected AFEs, the size of the random subset to run the algorithm + // on. Zero implies all connected AFEs. + int64 random_subset_size = 1; + } + + // Balances vRPCs over backends, by maintaining a moving average of each AFE's + // round-trip time, weighted by the number of outstanding vRPCs, and + // distribute traffic to AFEs where that cost function is smallest. + // + // See: + // https://linkerd.io/2016/03/16/beyond-round-robin-load-balancing-for-latency + message PeakEwma { + // Of all connected AFEs, the size of the random subset to compare costs + // over. Zero implies all connected AFEs. + int64 random_subset_size = 1; + } + + // Balances vRPCs over backends, by randomly selecting a backend. + message Random {} + + oneof load_balancing_strategy { + LeastInFlight least_in_flight = 1; + + PeakEwma peak_ewma = 2; + + Random random = 4; + } +} + +// Configuration for the Session API. Internal usage only. +message SessionClientConfiguration { + // Configuration for the channel pool. + message ChannelPoolConfiguration { + // A channel mode which allows DirectAccess with a fallback to CloudPath if + // DirectAccess is unavailable. + message DirectAccessWithFallback { + // The threshold for errors on DirectAccess to trigger CloudPath fallback. + // The error rate is calculated based on a count of vRPCs with errors + // divided by a total count of vRPCs, over a rolling window of the past + // check_interval. If this ratio exceeds this threshold, the fallback to + // CloudPath is triggered. [0, 1]. + float error_rate_threshold = 1; + + // The interval to check the error rate over. + google.protobuf.Duration check_interval = 2; + } + + // A channel mode which only allows DirectAccess. + message DirectAccessOnly {} + + // A channel mode which only allows CloudPath. + message CloudPathOnly {} + + // The minimum number of distcint servers to connect to in the channel pool. + // The client will ensure that the channel pool will have at least this many + // distinct servers, but may have multiple channels connected to the same + // server (e.g. the client may have M channels on N machines, where M > N). + int32 min_server_count = 1; + + // The maximum number of distinct servers to connect to in the channel pool. + // The client will ensure that the channel pool will have at most this many + // distinct servers. + int32 max_server_count = 2; + + // Soft maximum for how many sessions are allowed per server. Normally, the + // client will ensure that it does not host more than this count of sessions + // per server, unless there are other limits encountered (e.g. the connected + // servers is already at max_servers). + int32 per_server_session_count = 3; + + // The fallback mode of the channel pool. + oneof mode { + // DirectAccess with a fallback to CloudPath. + DirectAccessWithFallback direct_access_with_fallback = 4; + + // DirectAccess only. + DirectAccessOnly direct_access_only = 5; + + // CloudPath only. + CloudPathOnly cloud_path_only = 6; + } + } + + // Configuration for the session pools. Session pools are tied to a scope + // like a table, an app profile, and a permission. + message SessionPoolConfiguration { + // Fraction of idle sessions to keep in order to manage an increase in + // requests-in-flight. For example, a headroom of 0.5 will keep enough + // sessions to deal with a 50% increase in QPS. + float headroom = 1; + + // The minimum number of sessions for a given scope. + int32 min_session_count = 2; + + // The maximum number of sessions for a given scope. + int32 max_session_count = 3; + + // Number of vRPCs that can be queued per starting session. + int32 new_session_queue_length = 4; + + // How many concurrent session establishments are allowed. The client will + // hold onto a count against this budget whenever it is establishing a new + // session, and release that count once the session is successfully + // established or failed to establish. + int32 new_session_creation_budget = 5; + + // How long to penalize the creation budget for a failed session creation + // attempt. + google.protobuf.Duration new_session_creation_penalty = 6; + + // A threshold for cancelling all pending vRPCs based on how many + // consecutive session establishment errors have been observed. The client + // will eagerly cancel queued vRPCs after this threshold is met to avoid + // them waiting their entire deadlines before terminating (while waiting for + // any session to establish to actually send the vRPC). + int32 consecutive_session_failure_threshold = 8; + + // How to balance vRPC load over connections to AFEs. + // Set only if session_load > 0. + LoadBalancingOptions load_balancing_options = 9; + } + + // What share of requests should operate on a session, [0, 1]. The rest + // should operate on the old-style API. + float session_load = 1; + + LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + + // Configuration for the channel pool. + ChannelPoolConfiguration channel_configuration = 3; + + // Configuration for the session pools. + SessionPoolConfiguration session_pool_configuration = 4; +} + +// Server provided instructions for enabling finer grained observability on +// the client to help diagnose customer issues. Internal usage only. +message TelemetryConfiguration { + // The level of detail of telemetry to be sent from the client. + enum Level { + // Server did not specify a level. Should disable all debug tag counters. + LEVEL_UNSPECIFIED = 0; + + // Enables all debug tag counter levels. + DEBUG = 1; + + // Eables all debug tag counters except for DEBUG. + INFO = 2; + + // Enables all debug tag counters except for DEBUG and INFO. + WARN = 3; + + // Enables only error debug tag counters. + ERROR = 4; + } + + // Selector for the debug counters that should be uploaded. + Level debug_tag_level = 1; +} + +// Configuration for the Session API. Internal usage only. +message ClientConfiguration { + message PollingConfiguration { + // A duration describing the time between GetClientConfiguration RPCs. + // Only strictly positive values are permissible. + google.protobuf.Duration polling_interval = 1; + + // How long the client should consider the configuration it receives from + // GetClientConfiguration valid for. Once this duration has passed, the + // client should consider the configuration invalid and must either: + // - Get a new configuration from GetClientConfiguration + // - Or if it cannot, use a sane default configuration + // + // This duration will be at least as long as the polling interval. + google.protobuf.Duration validity_duration = 2; + + // Number of times the client should retry a failed + // GetClientConfiguration RPC per polling interval before giving up. + int32 max_rpc_retry_count = 6; + } + + // The configuration for Bigtable Sessions. + SessionClientConfiguration session_configuration = 2; + + // How often the client should refresh this configuration. + oneof polling { + // If the client should cease to check for new configurations, e.g. a + // backstop to prevent excessive GetClientConfiguration RPCs. + bool stop_polling = 3; + + // Deprecated, prerfer polling_configuration. + // + // A duration describing the time between GetClientConfiguration RPCs. + // Only strictly positive values are permissible. + google.protobuf.Duration polling_interval = 4 [deprecated = true]; + + // If the client should continue to check for new configurations. + PollingConfiguration polling_configuration = 5; + } + + // Configuration for telemetry. + TelemetryConfiguration telemetry_configuration = 6; +} + +// Internal usage only. +message SessionRequest { + oneof payload { + OpenSessionRequest open_session = 1; + + CloseSessionRequest close_session = 2; + + VirtualRpcRequest virtual_rpc = 3; + } +} + +// Internal usage only. +message SessionResponse { + oneof payload { + OpenSessionResponse open_session = 1; + + // A vRPC can result in either a successful result or an error. + // Error results are separate to allow for multiple vRPC responses, + // e.g. for streaming calls like scans (post-V1). See Flow Control. + VirtualRpcResponse virtual_rpc = 2; + + ErrorResponse error = 3; + + SessionParametersResponse session_parameters = 4; + + HeartbeatResponse heartbeat = 5; + + GoAwayResponse go_away = 6; + + SessionRefreshConfig session_refresh_config = 7; + } +} + +// Internal usage only. +message OpenSessionRequest { + // A version indicator from the client stating its understanding of the + // protocol. This is to disambiguate client behavior amidst changes in + // semantic usage of the API, e.g. if the structure remains the same but + // behavior changes. + int64 protocol_version = 1; + + // Client settings, including a record of + FeatureFlags flags = 2; + + // Used for serverside observability. + int64 consecutive_failed_connection_attempts = 3; + + // How the request should be routed (if presented as part of a GOAWAY + // from a previous session). Post V1. + bytes routing_cookie = 4; + + // Can be Open{Table,AuthorizedView,MaterializedView}Request, + // (or in post-V1, PrepareSqlQueryRequest) + bytes payload = 5; +} + +// Information about the connected backends from a session client's +// perspective. This information may be used to make choices about session +// re-establishment en-masse for sessions with the same backend identifiers. +// Internal usage only. +message BackendIdentifier { + // An opaque identifier for the Google Frontend which serviced this request. + // Only set when not using DirectAccess. + int64 google_frontend_id = 1; + + // An opaque identifier for the application frontend which serviced this + // request. + int64 application_frontend_id = 2; + + // The zone of the application frontend that served this request. + string application_frontend_zone = 3; +} + +// Internal usage only. +message OpenSessionResponse { + // Information on the backend(s) that are hosting this session. + BackendIdentifier backend = 2; + + // Can be Open{Table,AuthorizedView,MaterializedView}Response, + // (or in post-V1, PrepareSqlQueryResponse) + bytes payload = 1; +} + +// Internal usage only. +message CloseSessionRequest { + // Client-generated reason for terminating the session, including a + // plain-text description of why. + // 'reason' may be used for metrics, while both may be logged (server-side). + enum CloseSessionReason { + CLOSE_SESSION_REASON_UNSET = 0; + + CLOSE_SESSION_REASON_GOAWAY = 1; + + CLOSE_SESSION_REASON_ERROR = 2; + + CLOSE_SESSION_REASON_USER = 3; + + CLOSE_SESSION_REASON_DOWNSIZE = 4; + + CLOSE_SESSION_REASON_MISSED_HEARTBEAT = 5; + } + + CloseSessionReason reason = 1; + + string description = 2; +} + +// Internal usage only. +message OpenTableRequest { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_TABLE; + + enum Permission { + PERMISSION_UNSET = 0; + + PERMISSION_READ = 1; + + PERMISSION_WRITE = 2; + + PERMISSION_READ_WRITE = 3; + } + + string table_name = 1; + + string app_profile_id = 2; + + Permission permission = 3; +} + +// Internal usage only. +message OpenTableResponse { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_TABLE; +} + +// Open sessions for an AuthorizedView. Internal usage only. +message OpenAuthorizedViewRequest { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; + + enum Permission { + PERMISSION_UNSET = 0; + + PERMISSION_READ = 1; + + PERMISSION_WRITE = 2; + + PERMISSION_READ_WRITE = 3; + } + + // The Authorized view name to read and write from. Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 1; + + // The app profile id to use for the authorized view sessions. + string app_profile_id = 2; + + // Permission for the session. + Permission permission = 3; +} + +// Internal usage only. +message OpenAuthorizedViewResponse { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; +} + +// Open sessions for a MaterializedView. Internal usage only. +message OpenMaterializedViewRequest { + option (google.bigtable.v2.open_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; + + enum Permission { + PERMISSION_UNSET = 0; + + PERMISSION_READ = 1; + } + + // The Materialized view name to read and write from. Values are of the form + // `projects//instances//materializedViews/`. + string materialized_view_name = 1; + + // The app profile id to use for the materialized view sessions. + string app_profile_id = 2; + + // Permission for the session. + Permission permission = 3; +} + +// Internal usage only. +message OpenMaterializedViewResponse { + option (google.bigtable.v2.open_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; +} + +// Internal usage only. +message VirtualRpcRequest { + // Container for all vRPC Metadata. + message Metadata { + // Track retry attempts for this vRPC at the AFE. + int64 attempt_number = 1; + + // Track the client's known start time for the attempt. This is likely not + // easily compared with the server's time due to clock skew. + google.protobuf.Timestamp attempt_start = 2; + + // Link OpenTelemetry traces (e.g. Tapper). This can be used to link + // attempts together for the same logical operation (e.g. in logs / traces). + // + // Note, this may not be needed for V1, TBD. + string traceparent = 3; + } + + // Client chosen, monotonically increasing identifier for the request. + // Must be unique within a session. + int64 rpc_id = 1; + + // Attempt deadline. + // + // Note, this may not be needed for V1, TBD (e.g. operation vs attempt + // deadline). + google.protobuf.Duration deadline = 2; + + // vRPC metadata. + Metadata metadata = 3; + + // Could be TableRequest (or in post-V1, SqlRequest) + bytes payload = 4; +} + +// Information on which Cluster served a vRPC, e.g. for Client-Side metrics. +// Internal usage only. +message ClusterInformation { + string cluster_id = 1; + + string zone_id = 2; +} + +// Internal usage only. +message SessionRequestStats { + // Backend (critical section) latency for the request. + google.protobuf.Duration backend_latency = 1; +} + +// Internal usage only. +message VirtualRpcResponse { + // Which vRPC this response is for. + int64 rpc_id = 1; + + ClusterInformation cluster_info = 2; + + SessionRequestStats stats = 4; + + // Could be TableResponse (or in post-V1, SqlResponse) + bytes payload = 3; +} + +// Internal usage only. +message ErrorResponse { + // Which vRPC this response is for. + int64 rpc_id = 1; + + ClusterInformation cluster_info = 2; + + // The error from the vRPC and any retry information to consider. + google.rpc.Status status = 3; + + google.rpc.RetryInfo retry_info = 4; +} + +// Internal usage only. +message TableRequest { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_TABLE; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowRequest read_row = 1; + + SessionMutateRowRequest mutate_row = 2; + } +} + +// Internal usage only. +message TableResponse { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_TABLE; + + oneof payload { + SessionReadRowResponse read_row = 1; + + SessionMutateRowResponse mutate_row = 2; + } +} + +// A request wrapper for operations on an authorized view. Internal usage only. +message AuthorizedViewRequest { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowRequest read_row = 1; + + SessionMutateRowRequest mutate_row = 2; + } +} + +// A response wrapper for operations on an authorized view. Internal usage only. +message AuthorizedViewResponse { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowResponse read_row = 1; + + SessionMutateRowResponse mutate_row = 2; + } +} + +// A request wrapper for operations on a materialized view. Internal usage only. +message MaterializedViewRequest { + option (google.bigtable.v2.vrpc_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowRequest read_row = 1; + } +} + +// A response wrapper for operations on a materialized view. Internal usage +// only. +message MaterializedViewResponse { + option (google.bigtable.v2.vrpc_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowResponse read_row = 1; + } +} + +// Internal usage only. +message SessionReadRowRequest { + bytes key = 1; + + RowFilter filter = 2; +} + +// Internal usage only. +message SessionReadRowResponse { + Row row = 1; + + RequestStats stats = 2; +} + +// Internal usage only. +message SessionMutateRowRequest { + bytes key = 1; + + repeated Mutation mutations = 2; +} + +// Internal usage only. +message SessionMutateRowResponse {} + +// Internal usage only. +message SessionParametersResponse { + // Maximum time between messages that the AFE will send to the client. The + // client may use this information to determine its control-flow in relation + // to pruning black-holed or otherwise non-responsive sessions. Must be set + // and positive. + // + // See also Heartbeats. + google.protobuf.Duration keep_alive = 1; +} + +// Internal usage only. +message HeartbeatResponse {} + +// Internal usage only. +message GoAwayResponse { + // Server-generated reason for GOAWAY, including a plain-text description of + // why. 'reason' may be used for CSM, while both may be logged. + string reason = 1; + + string description = 2; + + // The last vRPC which was admitted by the AFE. The client may expect the + // result from the vRPC on the stream before disconnecting, and should + // retry vRPCs beyond this boundary. + int64 last_rpc_id_admitted = 3; +} + +// Internal usage only. +message SessionRefreshConfig { + // Any additional metadata to include when reconnecting. Not a `map<>` type as + // this can be a multimap. + message Metadata { + // Output only. The key for the metadata entry. + string key = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The value for the metadata entry. + bytes value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // An optimized Open request that the session may use on a retry when + // establishing this session again. This can be sent from the AFE to + // avoid certain work e.g. encoding a query plan for BTQL. + OpenSessionRequest optimized_open_request = 1; + + // Output only. Any additional metadata to include when reconnecting. + repeated Metadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/types.proto b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/types.proto new file mode 100644 index 000000000000..607cf2bea9de --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/google/bigtable/v2/types.proto @@ -0,0 +1,465 @@ +// Copyright 2025 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; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "TypesProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// `Type` represents the type of data that is written to, read from, or stored +// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain +// familiarity and consistency across products and features. +// +// For compatibility with Bigtable's existing untyped APIs, each `Type` includes +// an `Encoding` which describes how to convert to or from the underlying data. +// +// Each encoding can operate in one of two modes: +// +// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` +// if and only if `X <= Y`. This is useful anywhere sort order is important, +// for example when encoding keys. +// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then +// `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For +// example, both `{'foo': '1', 'bar': '2'}` and `{'bar': '2', 'foo': '1'}` +// are valid encodings of the same JSON value. +// +// The API clearly documents which mode is used wherever an encoding can be +// configured. Each encoding also documents which values are supported in which +// modes. For example, when encoding INT64 as a numeric STRING, negative numbers +// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but +// `STRING("-00001") > STRING("00001")`. +message Type { + // Bytes + // Values of type `Bytes` are stored in `Value.bytes_value`. + message Bytes { + // Rules used to convert to or from lower level types. + message Encoding { + // Leaves the value as-is. + // + // Sorted mode: all values are supported. + // + // Distinct mode: all values are supported. + message Raw { + // If set, allows NULL values to be encoded as the empty string "". + // + // The actual empty string, or any value which only contains the + // null byte `0x00`, has one more null byte appended. + bool escape_nulls = 1; + } + + // Which encoding to use. + oneof encoding { + // Use `Raw` encoding. + Raw raw = 1; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } + + // String + // Values of type `String` are stored in `Value.string_value`. + message String { + // Rules used to convert to or from lower level types. + message Encoding { + // Deprecated: prefer the equivalent `Utf8Bytes`. + message Utf8Raw { + option deprecated = true; + } + + // UTF-8 encoding. + // + // Sorted mode: + // - All values are supported. + // - Code point order is preserved. + // + // Distinct mode: all values are supported. + // + // Compatible with: + // + // - BigQuery `TEXT` encoding + // - HBase `Bytes.toBytes` + // - Java `String#getBytes(StandardCharsets.UTF_8)` + message Utf8Bytes { + // Single-character escape sequence used to support NULL values. + // + // If set, allows NULL values to be encoded as the empty string "". + // + // The actual empty string, or any value where every character equals + // `null_escape_char`, has one more `null_escape_char` appended. + // + // If `null_escape_char` is set and does not equal the ASCII null + // character `0x00`, then the encoding will not support sorted mode. + // + // . + string null_escape_char = 1; + } + + // Which encoding to use. + oneof encoding { + // Deprecated: if set, converts to an empty `utf8_bytes`. + Utf8Raw utf8_raw = 1 [deprecated = true]; + + // Use `Utf8Bytes` encoding. + Utf8Bytes utf8_bytes = 2; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } + + // Int64 + // Values of type `Int64` are stored in `Value.int_value`. + message Int64 { + // Rules used to convert to or from lower level types. + message Encoding { + // Encodes the value as an 8-byte big-endian two's complement value. + // + // Sorted mode: non-negative values are supported. + // + // Distinct mode: all values are supported. + // + // Compatible with: + // + // - BigQuery `BINARY` encoding + // - HBase `Bytes.toBytes` + // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` + message BigEndianBytes { + // Deprecated: ignored if set. + Bytes bytes_type = 1 [deprecated = true]; + } + + // Encodes the value in a variable length binary format of up to 10 bytes. + // Values that are closer to zero use fewer bytes. + // + // Sorted mode: all values are supported. + // + // Distinct mode: all values are supported. + message OrderedCodeBytes {} + + // Which encoding to use. + oneof encoding { + // Use `BigEndianBytes` encoding. + BigEndianBytes big_endian_bytes = 1; + + // Use `OrderedCodeBytes` encoding. + OrderedCodeBytes ordered_code_bytes = 2; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } + + // bool + // Values of type `Bool` are stored in `Value.bool_value`. + message Bool {} + + // Float32 + // Values of type `Float32` are stored in `Value.float_value`. + message Float32 {} + + // Float64 + // Values of type `Float64` are stored in `Value.float_value`. + message Float64 {} + + // Timestamp + // Values of type `Timestamp` are stored in `Value.timestamp_value`. + message Timestamp { + // Rules used to convert to or from lower level types. + message Encoding { + // Which encoding to use. + oneof encoding { + // Encodes the number of microseconds since the Unix epoch using the + // given `Int64` encoding. Values must be microsecond-aligned. + // + // Compatible with: + // + // - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS` + Int64.Encoding unix_micros_int64 = 1; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } + + // Date + // Values of type `Date` are stored in `Value.date_value`. + message Date {} + + // A structured data value, consisting of fields which map to dynamically + // typed values. + // Values of type `Struct` are stored in `Value.array_value` where entries are + // in the same order and number as `field_types`. + message Struct { + // A struct field and its type. + message Field { + // The field name (optional). Fields without a `field_name` are considered + // anonymous and cannot be referenced by name. + string field_name = 1; + + // The type of values in this field. + Type type = 2; + } + + // Rules used to convert to or from lower level types. + message Encoding { + // Uses the encoding of `fields[0].type` as-is. + // Only valid if `fields.size == 1`. + message Singleton {} + + // Fields are encoded independently and concatenated with a configurable + // `delimiter` in between. + // + // A struct with no fields defined is encoded as a single `delimiter`. + // + // Sorted mode: + // + // - Fields are encoded in sorted mode. + // - Encoded field values must not contain any bytes <= `delimiter[0]` + // - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + // `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + // + // Distinct mode: + // + // - Fields are encoded in distinct mode. + // - Encoded field values must not contain `delimiter[0]`. + message DelimitedBytes { + // Byte sequence used to delimit concatenated fields. The delimiter must + // contain at least 1 character and at most 50 characters. + bytes delimiter = 1; + } + + // Fields are encoded independently and concatenated with the fixed byte + // pair `{0x00, 0x01}` in between. + // + // Any null `(0x00)` byte in an encoded field is replaced by the fixed + // byte pair `{0x00, 0xFF}`. + // + // Fields that encode to the empty string "" have special handling: + // + // - If *every* field encodes to "", or if the STRUCT has no fields + // defined, then the STRUCT is encoded as the fixed byte pair + // `{0x00, 0x00}`. + // - Otherwise, the STRUCT only encodes until the last non-empty field, + // omitting any trailing empty fields. Any empty fields that aren't + // omitted are replaced with the fixed byte pair `{0x00, 0x00}`. + // + // Examples: + // + // ``` + // - STRUCT() -> "\00\00" + // - STRUCT("") -> "\00\00" + // - STRUCT("", "") -> "\00\00" + // - STRUCT("", "B") -> "\00\00" + "\00\01" + "B" + // - STRUCT("A", "") -> "A" + // - STRUCT("", "B", "") -> "\00\00" + "\00\01" + "B" + // - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C" + // ``` + // + // + // Since null bytes are always escaped, this encoding can cause size + // blowup for encodings like `Int64.BigEndianBytes` that are likely to + // produce many such bytes. + // + // Sorted mode: + // + // - Fields are encoded in sorted mode. + // - All values supported by the field encodings are allowed + // - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + // `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + // + // Distinct mode: + // + // - Fields are encoded in distinct mode. + // - All values supported by the field encodings are allowed. + message OrderedCodeBytes {} + + // Which encoding to use. + oneof encoding { + // Use `Singleton` encoding. + Singleton singleton = 1; + + // Use `DelimitedBytes` encoding. + DelimitedBytes delimited_bytes = 2; + + // User `OrderedCodeBytes` encoding. + OrderedCodeBytes ordered_code_bytes = 3; + } + } + + // The names and types of the fields in this struct. + repeated Field fields = 1; + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 2; + } + + // A protobuf message type. + // Values of type `Proto` are stored in `Value.bytes_value`. + message Proto { + // The ID of the schema bundle that this proto is defined in. + string schema_bundle_id = 1; + + // The fully qualified name of the protobuf message, including package. In + // the format of "foo.bar.Message". + string message_name = 2; + } + + // A protobuf enum type. + // Values of type `Enum` are stored in `Value.int_value`. + message Enum { + // The ID of the schema bundle that this enum is defined in. + string schema_bundle_id = 1; + + // The fully qualified name of the protobuf enum message, including package. + // In the format of "foo.bar.EnumMessage". + string enum_name = 2; + } + + // An ordered list of elements of a given type. + // Values of type `Array` are stored in `Value.array_value`. + message Array { + // The type of the elements in the array. This must not be `Array`. + Type element_type = 1; + } + + // A mapping of keys to values of a given type. + // Values of type `Map` are stored in a `Value.array_value` where each entry + // is another `Value.array_value` with two elements (the key and the value, + // in that order). + // Normally encoded Map values won't have repeated keys, however, clients are + // expected to handle the case in which they do. If the same key appears + // multiple times, the _last_ value takes precedence. + message Map { + // The type of a map key. + // Only `Bytes`, `String`, and `Int64` are allowed as key types. + Type key_type = 1; + + // The type of the values in a map. + Type value_type = 2; + } + + // A value that combines incremental updates into a summarized value. + // + // Data is never directly written or read using type `Aggregate`. Writes + // provide either the `input_type` or `state_type`, and reads always return + // the `state_type` . + message Aggregate { + // Computes the sum of the input values. + // Allowed input: `Int64` + // State: same as input + message Sum {} + + // Computes the max of the input values. + // Allowed input: `Int64` + // State: same as input + message Max {} + + // Computes the min of the input values. + // Allowed input: `Int64` + // State: same as input + message Min {} + + // Computes an approximate unique count over the input values. When using + // raw data as input, be careful to use a consistent encoding. Otherwise + // the same value encoded differently could count more than once, or two + // distinct values could count as identical. + // Input: Any, or omit for Raw + // State: TBD + // Special state conversions: `Int64` (the unique count estimate) + message HyperLogLogPlusPlusUniqueCount {} + + // Type of the inputs that are accumulated by this `Aggregate`. + // Use `AddInput` mutations to accumulate new inputs. + Type input_type = 1; + + // Output only. Type that holds the internal accumulator state for the + // `Aggregate`. This is a function of the `input_type` and `aggregator` + // chosen. + Type state_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Which aggregator function to use. The configured types must match. + oneof aggregator { + // Sum aggregator. + Sum sum = 4; + + // HyperLogLogPlusPlusUniqueCount aggregator. + HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + + // Max aggregator. + Max max = 6; + + // Min aggregator. + Min min = 7; + } + } + + // The kind of type that this represents. + oneof kind { + // Bytes + Bytes bytes_type = 1; + + // String + String string_type = 2; + + // Int64 + Int64 int64_type = 5; + + // Float32 + Float32 float32_type = 12; + + // Float64 + Float64 float64_type = 9; + + // Bool + Bool bool_type = 8; + + // Timestamp + Timestamp timestamp_type = 10; + + // Date + Date date_type = 11; + + // Aggregate + Aggregate aggregate_type = 6; + + // Struct + Struct struct_type = 7; + + // Array + Array array_type = 3; + + // Map + Map map_type = 4; + + // Proto + Proto proto_type = 13; + + // Enum + Enum enum_type = 14; + } +} diff --git a/packages/google-cloud-bigtable-api/protos/protos.d.ts b/packages/google-cloud-bigtable-api/protos/protos.d.ts new file mode 100644 index 000000000000..ac56bf8c2f9d --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/protos.d.ts @@ -0,0 +1,49048 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace bigtable. */ + namespace bigtable { + + /** Namespace admin. */ + namespace admin { + + /** Namespace v2. */ + namespace v2 { + + /** Represents a BigtableInstanceAdmin */ + class BigtableInstanceAdmin extends $protobuf.rpc.Service { + + /** + * Constructs a new BigtableInstanceAdmin service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new BigtableInstanceAdmin service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): BigtableInstanceAdmin; + + /** + * Calls CreateInstance. + * @param request CreateInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createInstance(request: google.bigtable.admin.v2.ICreateInstanceRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstanceCallback): void; + + /** + * Calls CreateInstance. + * @param request CreateInstanceRequest message or plain object + * @returns Promise + */ + public createInstance(request: google.bigtable.admin.v2.ICreateInstanceRequest): Promise; + + /** + * Calls GetInstance. + * @param request GetInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Instance + */ + public getInstance(request: google.bigtable.admin.v2.IGetInstanceRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstanceCallback): void; + + /** + * Calls GetInstance. + * @param request GetInstanceRequest message or plain object + * @returns Promise + */ + public getInstance(request: google.bigtable.admin.v2.IGetInstanceRequest): Promise; + + /** + * Calls ListInstances. + * @param request ListInstancesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInstancesResponse + */ + public listInstances(request: google.bigtable.admin.v2.IListInstancesRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstancesCallback): void; + + /** + * Calls ListInstances. + * @param request ListInstancesRequest message or plain object + * @returns Promise + */ + public listInstances(request: google.bigtable.admin.v2.IListInstancesRequest): Promise; + + /** + * Calls UpdateInstance. + * @param request Instance message or plain object + * @param callback Node-style callback called with the error, if any, and Instance + */ + public updateInstance(request: google.bigtable.admin.v2.IInstance, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstanceCallback): void; + + /** + * Calls UpdateInstance. + * @param request Instance message or plain object + * @returns Promise + */ + public updateInstance(request: google.bigtable.admin.v2.IInstance): Promise; + + /** + * Calls PartialUpdateInstance. + * @param request PartialUpdateInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public partialUpdateInstance(request: google.bigtable.admin.v2.IPartialUpdateInstanceRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstanceCallback): void; + + /** + * Calls PartialUpdateInstance. + * @param request PartialUpdateInstanceRequest message or plain object + * @returns Promise + */ + public partialUpdateInstance(request: google.bigtable.admin.v2.IPartialUpdateInstanceRequest): Promise; + + /** + * Calls DeleteInstance. + * @param request DeleteInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteInstance(request: google.bigtable.admin.v2.IDeleteInstanceRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstanceCallback): void; + + /** + * Calls DeleteInstance. + * @param request DeleteInstanceRequest message or plain object + * @returns Promise + */ + public deleteInstance(request: google.bigtable.admin.v2.IDeleteInstanceRequest): Promise; + + /** + * Calls CreateCluster. + * @param request CreateClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createCluster(request: google.bigtable.admin.v2.ICreateClusterRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateClusterCallback): void; + + /** + * Calls CreateCluster. + * @param request CreateClusterRequest message or plain object + * @returns Promise + */ + public createCluster(request: google.bigtable.admin.v2.ICreateClusterRequest): Promise; + + /** + * Calls GetCluster. + * @param request GetClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Cluster + */ + public getCluster(request: google.bigtable.admin.v2.IGetClusterRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.GetClusterCallback): void; + + /** + * Calls GetCluster. + * @param request GetClusterRequest message or plain object + * @returns Promise + */ + public getCluster(request: google.bigtable.admin.v2.IGetClusterRequest): Promise; + + /** + * Calls ListClusters. + * @param request ListClustersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListClustersResponse + */ + public listClusters(request: google.bigtable.admin.v2.IListClustersRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.ListClustersCallback): void; + + /** + * Calls ListClusters. + * @param request ListClustersRequest message or plain object + * @returns Promise + */ + public listClusters(request: google.bigtable.admin.v2.IListClustersRequest): Promise; + + /** + * Calls UpdateCluster. + * @param request Cluster message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCluster(request: google.bigtable.admin.v2.ICluster, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateClusterCallback): void; + + /** + * Calls UpdateCluster. + * @param request Cluster message or plain object + * @returns Promise + */ + public updateCluster(request: google.bigtable.admin.v2.ICluster): Promise; + + /** + * Calls PartialUpdateCluster. + * @param request PartialUpdateClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public partialUpdateCluster(request: google.bigtable.admin.v2.IPartialUpdateClusterRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateClusterCallback): void; + + /** + * Calls PartialUpdateCluster. + * @param request PartialUpdateClusterRequest message or plain object + * @returns Promise + */ + public partialUpdateCluster(request: google.bigtable.admin.v2.IPartialUpdateClusterRequest): Promise; + + /** + * Calls DeleteCluster. + * @param request DeleteClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteCluster(request: google.bigtable.admin.v2.IDeleteClusterRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteClusterCallback): void; + + /** + * Calls DeleteCluster. + * @param request DeleteClusterRequest message or plain object + * @returns Promise + */ + public deleteCluster(request: google.bigtable.admin.v2.IDeleteClusterRequest): Promise; + + /** + * Calls CreateAppProfile. + * @param request CreateAppProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AppProfile + */ + public createAppProfile(request: google.bigtable.admin.v2.ICreateAppProfileRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfileCallback): void; + + /** + * Calls CreateAppProfile. + * @param request CreateAppProfileRequest message or plain object + * @returns Promise + */ + public createAppProfile(request: google.bigtable.admin.v2.ICreateAppProfileRequest): Promise; + + /** + * Calls GetAppProfile. + * @param request GetAppProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AppProfile + */ + public getAppProfile(request: google.bigtable.admin.v2.IGetAppProfileRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfileCallback): void; + + /** + * Calls GetAppProfile. + * @param request GetAppProfileRequest message or plain object + * @returns Promise + */ + public getAppProfile(request: google.bigtable.admin.v2.IGetAppProfileRequest): Promise; + + /** + * Calls ListAppProfiles. + * @param request ListAppProfilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAppProfilesResponse + */ + public listAppProfiles(request: google.bigtable.admin.v2.IListAppProfilesRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfilesCallback): void; + + /** + * Calls ListAppProfiles. + * @param request ListAppProfilesRequest message or plain object + * @returns Promise + */ + public listAppProfiles(request: google.bigtable.admin.v2.IListAppProfilesRequest): Promise; + + /** + * Calls UpdateAppProfile. + * @param request UpdateAppProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAppProfile(request: google.bigtable.admin.v2.IUpdateAppProfileRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfileCallback): void; + + /** + * Calls UpdateAppProfile. + * @param request UpdateAppProfileRequest message or plain object + * @returns Promise + */ + public updateAppProfile(request: google.bigtable.admin.v2.IUpdateAppProfileRequest): Promise; + + /** + * Calls DeleteAppProfile. + * @param request DeleteAppProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAppProfile(request: google.bigtable.admin.v2.IDeleteAppProfileRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfileCallback): void; + + /** + * Calls DeleteAppProfile. + * @param request DeleteAppProfileRequest message or plain object + * @returns Promise + */ + public deleteAppProfile(request: google.bigtable.admin.v2.IDeleteAppProfileRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls ListHotTablets. + * @param request ListHotTabletsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListHotTabletsResponse + */ + public listHotTablets(request: google.bigtable.admin.v2.IListHotTabletsRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTabletsCallback): void; + + /** + * Calls ListHotTablets. + * @param request ListHotTabletsRequest message or plain object + * @returns Promise + */ + public listHotTablets(request: google.bigtable.admin.v2.IListHotTabletsRequest): Promise; + + /** + * Calls CreateLogicalView. + * @param request CreateLogicalViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLogicalView(request: google.bigtable.admin.v2.ICreateLogicalViewRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateLogicalViewCallback): void; + + /** + * Calls CreateLogicalView. + * @param request CreateLogicalViewRequest message or plain object + * @returns Promise + */ + public createLogicalView(request: google.bigtable.admin.v2.ICreateLogicalViewRequest): Promise; + + /** + * Calls GetLogicalView. + * @param request GetLogicalViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogicalView + */ + public getLogicalView(request: google.bigtable.admin.v2.IGetLogicalViewRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.GetLogicalViewCallback): void; + + /** + * Calls GetLogicalView. + * @param request GetLogicalViewRequest message or plain object + * @returns Promise + */ + public getLogicalView(request: google.bigtable.admin.v2.IGetLogicalViewRequest): Promise; + + /** + * Calls ListLogicalViews. + * @param request ListLogicalViewsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogicalViewsResponse + */ + public listLogicalViews(request: google.bigtable.admin.v2.IListLogicalViewsRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.ListLogicalViewsCallback): void; + + /** + * Calls ListLogicalViews. + * @param request ListLogicalViewsRequest message or plain object + * @returns Promise + */ + public listLogicalViews(request: google.bigtable.admin.v2.IListLogicalViewsRequest): Promise; + + /** + * Calls UpdateLogicalView. + * @param request UpdateLogicalViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateLogicalView(request: google.bigtable.admin.v2.IUpdateLogicalViewRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateLogicalViewCallback): void; + + /** + * Calls UpdateLogicalView. + * @param request UpdateLogicalViewRequest message or plain object + * @returns Promise + */ + public updateLogicalView(request: google.bigtable.admin.v2.IUpdateLogicalViewRequest): Promise; + + /** + * Calls DeleteLogicalView. + * @param request DeleteLogicalViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteLogicalView(request: google.bigtable.admin.v2.IDeleteLogicalViewRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteLogicalViewCallback): void; + + /** + * Calls DeleteLogicalView. + * @param request DeleteLogicalViewRequest message or plain object + * @returns Promise + */ + public deleteLogicalView(request: google.bigtable.admin.v2.IDeleteLogicalViewRequest): Promise; + + /** + * Calls CreateMaterializedView. + * @param request CreateMaterializedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createMaterializedView(request: google.bigtable.admin.v2.ICreateMaterializedViewRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateMaterializedViewCallback): void; + + /** + * Calls CreateMaterializedView. + * @param request CreateMaterializedViewRequest message or plain object + * @returns Promise + */ + public createMaterializedView(request: google.bigtable.admin.v2.ICreateMaterializedViewRequest): Promise; + + /** + * Calls GetMaterializedView. + * @param request GetMaterializedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MaterializedView + */ + public getMaterializedView(request: google.bigtable.admin.v2.IGetMaterializedViewRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.GetMaterializedViewCallback): void; + + /** + * Calls GetMaterializedView. + * @param request GetMaterializedViewRequest message or plain object + * @returns Promise + */ + public getMaterializedView(request: google.bigtable.admin.v2.IGetMaterializedViewRequest): Promise; + + /** + * Calls ListMaterializedViews. + * @param request ListMaterializedViewsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMaterializedViewsResponse + */ + public listMaterializedViews(request: google.bigtable.admin.v2.IListMaterializedViewsRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.ListMaterializedViewsCallback): void; + + /** + * Calls ListMaterializedViews. + * @param request ListMaterializedViewsRequest message or plain object + * @returns Promise + */ + public listMaterializedViews(request: google.bigtable.admin.v2.IListMaterializedViewsRequest): Promise; + + /** + * Calls UpdateMaterializedView. + * @param request UpdateMaterializedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateMaterializedView(request: google.bigtable.admin.v2.IUpdateMaterializedViewRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateMaterializedViewCallback): void; + + /** + * Calls UpdateMaterializedView. + * @param request UpdateMaterializedViewRequest message or plain object + * @returns Promise + */ + public updateMaterializedView(request: google.bigtable.admin.v2.IUpdateMaterializedViewRequest): Promise; + + /** + * Calls DeleteMaterializedView. + * @param request DeleteMaterializedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteMaterializedView(request: google.bigtable.admin.v2.IDeleteMaterializedViewRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteMaterializedViewCallback): void; + + /** + * Calls DeleteMaterializedView. + * @param request DeleteMaterializedViewRequest message or plain object + * @returns Promise + */ + public deleteMaterializedView(request: google.bigtable.admin.v2.IDeleteMaterializedViewRequest): Promise; + } + + namespace BigtableInstanceAdmin { + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createInstance}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateInstanceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getInstance}. + * @param error Error, if any + * @param [response] Instance + */ + type GetInstanceCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Instance) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listInstances}. + * @param error Error, if any + * @param [response] ListInstancesResponse + */ + type ListInstancesCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListInstancesResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateInstance}. + * @param error Error, if any + * @param [response] Instance + */ + type UpdateInstanceCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Instance) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|partialUpdateInstance}. + * @param error Error, if any + * @param [response] Operation + */ + type PartialUpdateInstanceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteInstance}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteInstanceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getCluster}. + * @param error Error, if any + * @param [response] Cluster + */ + type GetClusterCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Cluster) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listClusters}. + * @param error Error, if any + * @param [response] ListClustersResponse + */ + type ListClustersCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListClustersResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|partialUpdateCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type PartialUpdateClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteCluster}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteClusterCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createAppProfile}. + * @param error Error, if any + * @param [response] AppProfile + */ + type CreateAppProfileCallback = (error: (Error|null), response?: google.bigtable.admin.v2.AppProfile) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getAppProfile}. + * @param error Error, if any + * @param [response] AppProfile + */ + type GetAppProfileCallback = (error: (Error|null), response?: google.bigtable.admin.v2.AppProfile) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listAppProfiles}. + * @param error Error, if any + * @param [response] ListAppProfilesResponse + */ + type ListAppProfilesCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListAppProfilesResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateAppProfile}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAppProfileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteAppProfile}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAppProfileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listHotTablets}. + * @param error Error, if any + * @param [response] ListHotTabletsResponse + */ + type ListHotTabletsCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListHotTabletsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createLogicalView}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateLogicalViewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getLogicalView}. + * @param error Error, if any + * @param [response] LogicalView + */ + type GetLogicalViewCallback = (error: (Error|null), response?: google.bigtable.admin.v2.LogicalView) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listLogicalViews}. + * @param error Error, if any + * @param [response] ListLogicalViewsResponse + */ + type ListLogicalViewsCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListLogicalViewsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateLogicalView}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateLogicalViewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteLogicalView}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteLogicalViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createMaterializedView}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateMaterializedViewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getMaterializedView}. + * @param error Error, if any + * @param [response] MaterializedView + */ + type GetMaterializedViewCallback = (error: (Error|null), response?: google.bigtable.admin.v2.MaterializedView) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listMaterializedViews}. + * @param error Error, if any + * @param [response] ListMaterializedViewsResponse + */ + type ListMaterializedViewsCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListMaterializedViewsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateMaterializedView}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateMaterializedViewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteMaterializedView}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteMaterializedViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a CreateInstanceRequest. */ + interface ICreateInstanceRequest { + + /** CreateInstanceRequest parent */ + parent?: (string|null); + + /** CreateInstanceRequest instanceId */ + instanceId?: (string|null); + + /** CreateInstanceRequest instance */ + instance?: (google.bigtable.admin.v2.IInstance|null); + + /** CreateInstanceRequest clusters */ + clusters?: ({ [k: string]: google.bigtable.admin.v2.ICluster }|null); + } + + /** Represents a CreateInstanceRequest. */ + class CreateInstanceRequest implements ICreateInstanceRequest { + + /** + * Constructs a new CreateInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateInstanceRequest); + + /** CreateInstanceRequest parent. */ + public parent: string; + + /** CreateInstanceRequest instanceId. */ + public instanceId: string; + + /** CreateInstanceRequest instance. */ + public instance?: (google.bigtable.admin.v2.IInstance|null); + + /** CreateInstanceRequest clusters. */ + public clusters: { [k: string]: google.bigtable.admin.v2.ICluster }; + + /** + * Creates a new CreateInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateInstanceRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateInstanceRequest): google.bigtable.admin.v2.CreateInstanceRequest; + + /** + * Encodes the specified CreateInstanceRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateInstanceRequest.verify|verify} messages. + * @param message CreateInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateInstanceRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateInstanceRequest.verify|verify} messages. + * @param message CreateInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateInstanceRequest + * @throws {Error} If the payload is not 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.CreateInstanceRequest; + + /** + * Decodes a CreateInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateInstanceRequest + * @throws {Error} If the payload 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.CreateInstanceRequest; + + /** + * Verifies a CreateInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateInstanceRequest; + + /** + * Creates a plain object from a CreateInstanceRequest message. Also converts values to other types if specified. + * @param message CreateInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateInstanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetInstanceRequest. */ + interface IGetInstanceRequest { + + /** GetInstanceRequest name */ + name?: (string|null); + } + + /** Represents a GetInstanceRequest. */ + class GetInstanceRequest implements IGetInstanceRequest { + + /** + * Constructs a new GetInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetInstanceRequest); + + /** GetInstanceRequest name. */ + public name: string; + + /** + * Creates a new GetInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetInstanceRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetInstanceRequest): google.bigtable.admin.v2.GetInstanceRequest; + + /** + * Encodes the specified GetInstanceRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetInstanceRequest.verify|verify} messages. + * @param message GetInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetInstanceRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetInstanceRequest.verify|verify} messages. + * @param message GetInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetInstanceRequest + * @throws {Error} If the payload is not 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.GetInstanceRequest; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetInstanceRequest + * @throws {Error} If the payload 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.GetInstanceRequest; + + /** + * Verifies a GetInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetInstanceRequest; + + /** + * Creates a plain object from a GetInstanceRequest message. Also converts values to other types if specified. + * @param message GetInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetInstanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListInstancesRequest. */ + interface IListInstancesRequest { + + /** ListInstancesRequest parent */ + parent?: (string|null); + + /** ListInstancesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListInstancesRequest. */ + class ListInstancesRequest implements IListInstancesRequest { + + /** + * Constructs a new ListInstancesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListInstancesRequest); + + /** ListInstancesRequest parent. */ + public parent: string; + + /** ListInstancesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListInstancesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInstancesRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListInstancesRequest): google.bigtable.admin.v2.ListInstancesRequest; + + /** + * Encodes the specified ListInstancesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListInstancesRequest.verify|verify} messages. + * @param message ListInstancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListInstancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInstancesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListInstancesRequest.verify|verify} messages. + * @param message ListInstancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListInstancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInstancesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInstancesRequest + * @throws {Error} If the payload is not 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.ListInstancesRequest; + + /** + * Decodes a ListInstancesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInstancesRequest + * @throws {Error} If the payload 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.ListInstancesRequest; + + /** + * Verifies a ListInstancesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInstancesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInstancesRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListInstancesRequest; + + /** + * Creates a plain object from a ListInstancesRequest message. Also converts values to other types if specified. + * @param message ListInstancesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListInstancesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInstancesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInstancesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListInstancesResponse. */ + interface IListInstancesResponse { + + /** ListInstancesResponse instances */ + instances?: (google.bigtable.admin.v2.IInstance[]|null); + + /** ListInstancesResponse failedLocations */ + failedLocations?: (string[]|null); + + /** ListInstancesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListInstancesResponse. */ + class ListInstancesResponse implements IListInstancesResponse { + + /** + * Constructs a new ListInstancesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListInstancesResponse); + + /** ListInstancesResponse instances. */ + public instances: google.bigtable.admin.v2.IInstance[]; + + /** ListInstancesResponse failedLocations. */ + public failedLocations: string[]; + + /** ListInstancesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListInstancesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInstancesResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListInstancesResponse): google.bigtable.admin.v2.ListInstancesResponse; + + /** + * Encodes the specified ListInstancesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListInstancesResponse.verify|verify} messages. + * @param message ListInstancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListInstancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInstancesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListInstancesResponse.verify|verify} messages. + * @param message ListInstancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListInstancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInstancesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInstancesResponse + * @throws {Error} If the payload is not 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.ListInstancesResponse; + + /** + * Decodes a ListInstancesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInstancesResponse + * @throws {Error} If the payload 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.ListInstancesResponse; + + /** + * Verifies a ListInstancesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInstancesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInstancesResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListInstancesResponse; + + /** + * Creates a plain object from a ListInstancesResponse message. Also converts values to other types if specified. + * @param message ListInstancesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListInstancesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInstancesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInstancesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartialUpdateInstanceRequest. */ + interface IPartialUpdateInstanceRequest { + + /** PartialUpdateInstanceRequest instance */ + instance?: (google.bigtable.admin.v2.IInstance|null); + + /** PartialUpdateInstanceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a PartialUpdateInstanceRequest. */ + class PartialUpdateInstanceRequest implements IPartialUpdateInstanceRequest { + + /** + * Constructs a new PartialUpdateInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IPartialUpdateInstanceRequest); + + /** PartialUpdateInstanceRequest instance. */ + public instance?: (google.bigtable.admin.v2.IInstance|null); + + /** PartialUpdateInstanceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new PartialUpdateInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PartialUpdateInstanceRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IPartialUpdateInstanceRequest): google.bigtable.admin.v2.PartialUpdateInstanceRequest; + + /** + * Encodes the specified PartialUpdateInstanceRequest message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateInstanceRequest.verify|verify} messages. + * @param message PartialUpdateInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IPartialUpdateInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartialUpdateInstanceRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateInstanceRequest.verify|verify} messages. + * @param message PartialUpdateInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IPartialUpdateInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartialUpdateInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartialUpdateInstanceRequest + * @throws {Error} If the payload is not 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.PartialUpdateInstanceRequest; + + /** + * Decodes a PartialUpdateInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartialUpdateInstanceRequest + * @throws {Error} If the payload 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.PartialUpdateInstanceRequest; + + /** + * Verifies a PartialUpdateInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartialUpdateInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartialUpdateInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.PartialUpdateInstanceRequest; + + /** + * Creates a plain object from a PartialUpdateInstanceRequest message. Also converts values to other types if specified. + * @param message PartialUpdateInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.PartialUpdateInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartialUpdateInstanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartialUpdateInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteInstanceRequest. */ + interface IDeleteInstanceRequest { + + /** DeleteInstanceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteInstanceRequest. */ + class DeleteInstanceRequest implements IDeleteInstanceRequest { + + /** + * Constructs a new DeleteInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteInstanceRequest); + + /** DeleteInstanceRequest name. */ + public name: string; + + /** + * Creates a new DeleteInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteInstanceRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteInstanceRequest): google.bigtable.admin.v2.DeleteInstanceRequest; + + /** + * Encodes the specified DeleteInstanceRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteInstanceRequest.verify|verify} messages. + * @param message DeleteInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteInstanceRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteInstanceRequest.verify|verify} messages. + * @param message DeleteInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteInstanceRequest + * @throws {Error} If the payload is not 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.DeleteInstanceRequest; + + /** + * Decodes a DeleteInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteInstanceRequest + * @throws {Error} If the payload 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.DeleteInstanceRequest; + + /** + * Verifies a DeleteInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteInstanceRequest; + + /** + * Creates a plain object from a DeleteInstanceRequest message. Also converts values to other types if specified. + * @param message DeleteInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteInstanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateClusterRequest. */ + interface ICreateClusterRequest { + + /** CreateClusterRequest parent */ + parent?: (string|null); + + /** CreateClusterRequest clusterId */ + clusterId?: (string|null); + + /** CreateClusterRequest cluster */ + cluster?: (google.bigtable.admin.v2.ICluster|null); + } + + /** Represents a CreateClusterRequest. */ + class CreateClusterRequest implements ICreateClusterRequest { + + /** + * Constructs a new CreateClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateClusterRequest); + + /** CreateClusterRequest parent. */ + public parent: string; + + /** CreateClusterRequest clusterId. */ + public clusterId: string; + + /** CreateClusterRequest cluster. */ + public cluster?: (google.bigtable.admin.v2.ICluster|null); + + /** + * Creates a new CreateClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateClusterRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateClusterRequest): google.bigtable.admin.v2.CreateClusterRequest; + + /** + * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterRequest.verify|verify} messages. + * @param message CreateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterRequest.verify|verify} messages. + * @param message CreateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateClusterRequest + * @throws {Error} If the payload is not 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.CreateClusterRequest; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateClusterRequest + * @throws {Error} If the payload 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.CreateClusterRequest; + + /** + * Verifies a CreateClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateClusterRequest; + + /** + * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. + * @param message CreateClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetClusterRequest. */ + interface IGetClusterRequest { + + /** GetClusterRequest name */ + name?: (string|null); + } + + /** Represents a GetClusterRequest. */ + class GetClusterRequest implements IGetClusterRequest { + + /** + * Constructs a new GetClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetClusterRequest); + + /** GetClusterRequest name. */ + public name: string; + + /** + * Creates a new GetClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetClusterRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetClusterRequest): google.bigtable.admin.v2.GetClusterRequest; + + /** + * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetClusterRequest.verify|verify} messages. + * @param message GetClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetClusterRequest.verify|verify} messages. + * @param message GetClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetClusterRequest + * @throws {Error} If the payload is not 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.GetClusterRequest; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetClusterRequest + * @throws {Error} If the payload 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.GetClusterRequest; + + /** + * Verifies a GetClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetClusterRequest; + + /** + * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. + * @param message GetClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListClustersRequest. */ + interface IListClustersRequest { + + /** ListClustersRequest parent */ + parent?: (string|null); + + /** ListClustersRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListClustersRequest. */ + class ListClustersRequest implements IListClustersRequest { + + /** + * Constructs a new ListClustersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListClustersRequest); + + /** ListClustersRequest parent. */ + public parent: string; + + /** ListClustersRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListClustersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListClustersRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListClustersRequest): google.bigtable.admin.v2.ListClustersRequest; + + /** + * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListClustersRequest.verify|verify} messages. + * @param message ListClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListClustersRequest.verify|verify} messages. + * @param message ListClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListClustersRequest + * @throws {Error} If the payload is not 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.ListClustersRequest; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListClustersRequest + * @throws {Error} If the payload 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.ListClustersRequest; + + /** + * Verifies a ListClustersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListClustersRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListClustersRequest; + + /** + * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. + * @param message ListClustersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListClustersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListClustersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListClustersResponse. */ + interface IListClustersResponse { + + /** ListClustersResponse clusters */ + clusters?: (google.bigtable.admin.v2.ICluster[]|null); + + /** ListClustersResponse failedLocations */ + failedLocations?: (string[]|null); + + /** ListClustersResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListClustersResponse. */ + class ListClustersResponse implements IListClustersResponse { + + /** + * Constructs a new ListClustersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListClustersResponse); + + /** ListClustersResponse clusters. */ + public clusters: google.bigtable.admin.v2.ICluster[]; + + /** ListClustersResponse failedLocations. */ + public failedLocations: string[]; + + /** ListClustersResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListClustersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListClustersResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListClustersResponse): google.bigtable.admin.v2.ListClustersResponse; + + /** + * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListClustersResponse.verify|verify} messages. + * @param message ListClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListClustersResponse.verify|verify} messages. + * @param message ListClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListClustersResponse + * @throws {Error} If the payload is not 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.ListClustersResponse; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListClustersResponse + * @throws {Error} If the payload 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.ListClustersResponse; + + /** + * Verifies a ListClustersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListClustersResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListClustersResponse; + + /** + * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. + * @param message ListClustersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListClustersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListClustersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteClusterRequest. */ + interface IDeleteClusterRequest { + + /** DeleteClusterRequest name */ + name?: (string|null); + } + + /** Represents a DeleteClusterRequest. */ + class DeleteClusterRequest implements IDeleteClusterRequest { + + /** + * Constructs a new DeleteClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteClusterRequest); + + /** DeleteClusterRequest name. */ + public name: string; + + /** + * Creates a new DeleteClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteClusterRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteClusterRequest): google.bigtable.admin.v2.DeleteClusterRequest; + + /** + * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteClusterRequest.verify|verify} messages. + * @param message DeleteClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteClusterRequest.verify|verify} messages. + * @param message DeleteClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteClusterRequest + * @throws {Error} If the payload is not 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.DeleteClusterRequest; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteClusterRequest + * @throws {Error} If the payload 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.DeleteClusterRequest; + + /** + * Verifies a DeleteClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteClusterRequest; + + /** + * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. + * @param message DeleteClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateInstanceMetadata. */ + interface ICreateInstanceMetadata { + + /** CreateInstanceMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ICreateInstanceRequest|null); + + /** CreateInstanceMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateInstanceMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateInstanceMetadata. */ + class CreateInstanceMetadata implements ICreateInstanceMetadata { + + /** + * Constructs a new CreateInstanceMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateInstanceMetadata); + + /** CreateInstanceMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ICreateInstanceRequest|null); + + /** CreateInstanceMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateInstanceMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateInstanceMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateInstanceMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateInstanceMetadata): google.bigtable.admin.v2.CreateInstanceMetadata; + + /** + * Encodes the specified CreateInstanceMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateInstanceMetadata.verify|verify} messages. + * @param message CreateInstanceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateInstanceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateInstanceMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateInstanceMetadata.verify|verify} messages. + * @param message CreateInstanceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateInstanceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateInstanceMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateInstanceMetadata + * @throws {Error} If the payload is not 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.CreateInstanceMetadata; + + /** + * Decodes a CreateInstanceMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateInstanceMetadata + * @throws {Error} If the payload 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.CreateInstanceMetadata; + + /** + * Verifies a CreateInstanceMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateInstanceMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateInstanceMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateInstanceMetadata; + + /** + * Creates a plain object from a CreateInstanceMetadata message. Also converts values to other types if specified. + * @param message CreateInstanceMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateInstanceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateInstanceMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateInstanceMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateInstanceMetadata. */ + interface IUpdateInstanceMetadata { + + /** UpdateInstanceMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.IPartialUpdateInstanceRequest|null); + + /** UpdateInstanceMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** UpdateInstanceMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateInstanceMetadata. */ + class UpdateInstanceMetadata implements IUpdateInstanceMetadata { + + /** + * Constructs a new UpdateInstanceMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateInstanceMetadata); + + /** UpdateInstanceMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.IPartialUpdateInstanceRequest|null); + + /** UpdateInstanceMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** UpdateInstanceMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateInstanceMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateInstanceMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateInstanceMetadata): google.bigtable.admin.v2.UpdateInstanceMetadata; + + /** + * Encodes the specified UpdateInstanceMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateInstanceMetadata.verify|verify} messages. + * @param message UpdateInstanceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateInstanceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateInstanceMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateInstanceMetadata.verify|verify} messages. + * @param message UpdateInstanceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateInstanceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateInstanceMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateInstanceMetadata + * @throws {Error} If the payload is not 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.UpdateInstanceMetadata; + + /** + * Decodes an UpdateInstanceMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateInstanceMetadata + * @throws {Error} If the payload 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.UpdateInstanceMetadata; + + /** + * Verifies an UpdateInstanceMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateInstanceMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateInstanceMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateInstanceMetadata; + + /** + * Creates a plain object from an UpdateInstanceMetadata message. Also converts values to other types if specified. + * @param message UpdateInstanceMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateInstanceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateInstanceMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateInstanceMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateClusterMetadata. */ + interface ICreateClusterMetadata { + + /** CreateClusterMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ICreateClusterRequest|null); + + /** CreateClusterMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateClusterMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + + /** CreateClusterMetadata tables */ + tables?: ({ [k: string]: google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress }|null); + } + + /** Represents a CreateClusterMetadata. */ + class CreateClusterMetadata implements ICreateClusterMetadata { + + /** + * Constructs a new CreateClusterMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateClusterMetadata); + + /** CreateClusterMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ICreateClusterRequest|null); + + /** CreateClusterMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateClusterMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** CreateClusterMetadata tables. */ + public tables: { [k: string]: google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress }; + + /** + * Creates a new CreateClusterMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateClusterMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateClusterMetadata): google.bigtable.admin.v2.CreateClusterMetadata; + + /** + * Encodes the specified CreateClusterMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterMetadata.verify|verify} messages. + * @param message CreateClusterMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateClusterMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterMetadata.verify|verify} messages. + * @param message CreateClusterMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateClusterMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateClusterMetadata + * @throws {Error} If the payload is not 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.CreateClusterMetadata; + + /** + * Decodes a CreateClusterMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateClusterMetadata + * @throws {Error} If the payload 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.CreateClusterMetadata; + + /** + * Verifies a CreateClusterMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateClusterMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateClusterMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateClusterMetadata; + + /** + * Creates a plain object from a CreateClusterMetadata message. Also converts values to other types if specified. + * @param message CreateClusterMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateClusterMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateClusterMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateClusterMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CreateClusterMetadata { + + /** Properties of a TableProgress. */ + interface ITableProgress { + + /** TableProgress estimatedSizeBytes */ + estimatedSizeBytes?: (number|Long|string|null); + + /** TableProgress estimatedCopiedBytes */ + estimatedCopiedBytes?: (number|Long|string|null); + + /** TableProgress state */ + state?: (google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State|keyof typeof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State|null); + } + + /** Represents a TableProgress. */ + class TableProgress implements ITableProgress { + + /** + * Constructs a new TableProgress. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress); + + /** TableProgress estimatedSizeBytes. */ + public estimatedSizeBytes: (number|Long|string); + + /** TableProgress estimatedCopiedBytes. */ + public estimatedCopiedBytes: (number|Long|string); + + /** TableProgress state. */ + public state: (google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State|keyof typeof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State); + + /** + * Creates a new TableProgress instance using the specified properties. + * @param [properties] Properties to set + * @returns TableProgress instance + */ + public static create(properties?: google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress): google.bigtable.admin.v2.CreateClusterMetadata.TableProgress; + + /** + * Encodes the specified TableProgress message. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.verify|verify} messages. + * @param message TableProgress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableProgress message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.verify|verify} messages. + * @param message TableProgress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableProgress message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableProgress + * @throws {Error} If the payload is not 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.CreateClusterMetadata.TableProgress; + + /** + * Decodes a TableProgress message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableProgress + * @throws {Error} If the payload 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.CreateClusterMetadata.TableProgress; + + /** + * Verifies a TableProgress message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableProgress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableProgress + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateClusterMetadata.TableProgress; + + /** + * Creates a plain object from a TableProgress message. Also converts values to other types if specified. + * @param message TableProgress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateClusterMetadata.TableProgress, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableProgress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableProgress + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TableProgress { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + COPYING = 2, + COMPLETED = 3, + CANCELLED = 4 + } + } + } + + /** Properties of an UpdateClusterMetadata. */ + interface IUpdateClusterMetadata { + + /** UpdateClusterMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ICluster|null); + + /** UpdateClusterMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** UpdateClusterMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateClusterMetadata. */ + class UpdateClusterMetadata implements IUpdateClusterMetadata { + + /** + * Constructs a new UpdateClusterMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateClusterMetadata); + + /** UpdateClusterMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ICluster|null); + + /** UpdateClusterMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** UpdateClusterMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateClusterMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateClusterMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateClusterMetadata): google.bigtable.admin.v2.UpdateClusterMetadata; + + /** + * Encodes the specified UpdateClusterMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateClusterMetadata.verify|verify} messages. + * @param message UpdateClusterMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateClusterMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateClusterMetadata.verify|verify} messages. + * @param message UpdateClusterMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateClusterMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateClusterMetadata + * @throws {Error} If the payload is not 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.UpdateClusterMetadata; + + /** + * Decodes an UpdateClusterMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateClusterMetadata + * @throws {Error} If the payload 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.UpdateClusterMetadata; + + /** + * Verifies an UpdateClusterMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateClusterMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateClusterMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateClusterMetadata; + + /** + * Creates a plain object from an UpdateClusterMetadata message. Also converts values to other types if specified. + * @param message UpdateClusterMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateClusterMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateClusterMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateClusterMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartialUpdateClusterMetadata. */ + interface IPartialUpdateClusterMetadata { + + /** PartialUpdateClusterMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** PartialUpdateClusterMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + + /** PartialUpdateClusterMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.IPartialUpdateClusterRequest|null); + } + + /** Represents a PartialUpdateClusterMetadata. */ + class PartialUpdateClusterMetadata implements IPartialUpdateClusterMetadata { + + /** + * Constructs a new PartialUpdateClusterMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IPartialUpdateClusterMetadata); + + /** PartialUpdateClusterMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** PartialUpdateClusterMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** PartialUpdateClusterMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.IPartialUpdateClusterRequest|null); + + /** + * Creates a new PartialUpdateClusterMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns PartialUpdateClusterMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IPartialUpdateClusterMetadata): google.bigtable.admin.v2.PartialUpdateClusterMetadata; + + /** + * Encodes the specified PartialUpdateClusterMetadata message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterMetadata.verify|verify} messages. + * @param message PartialUpdateClusterMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IPartialUpdateClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartialUpdateClusterMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterMetadata.verify|verify} messages. + * @param message PartialUpdateClusterMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IPartialUpdateClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartialUpdateClusterMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartialUpdateClusterMetadata + * @throws {Error} If the payload is not 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.PartialUpdateClusterMetadata; + + /** + * Decodes a PartialUpdateClusterMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartialUpdateClusterMetadata + * @throws {Error} If the payload 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.PartialUpdateClusterMetadata; + + /** + * Verifies a PartialUpdateClusterMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartialUpdateClusterMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartialUpdateClusterMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.PartialUpdateClusterMetadata; + + /** + * Creates a plain object from a PartialUpdateClusterMetadata message. Also converts values to other types if specified. + * @param message PartialUpdateClusterMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.PartialUpdateClusterMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartialUpdateClusterMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartialUpdateClusterMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartialUpdateClusterRequest. */ + interface IPartialUpdateClusterRequest { + + /** PartialUpdateClusterRequest cluster */ + cluster?: (google.bigtable.admin.v2.ICluster|null); + + /** PartialUpdateClusterRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a PartialUpdateClusterRequest. */ + class PartialUpdateClusterRequest implements IPartialUpdateClusterRequest { + + /** + * Constructs a new PartialUpdateClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IPartialUpdateClusterRequest); + + /** PartialUpdateClusterRequest cluster. */ + public cluster?: (google.bigtable.admin.v2.ICluster|null); + + /** PartialUpdateClusterRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new PartialUpdateClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PartialUpdateClusterRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IPartialUpdateClusterRequest): google.bigtable.admin.v2.PartialUpdateClusterRequest; + + /** + * Encodes the specified PartialUpdateClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterRequest.verify|verify} messages. + * @param message PartialUpdateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IPartialUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartialUpdateClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterRequest.verify|verify} messages. + * @param message PartialUpdateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IPartialUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartialUpdateClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartialUpdateClusterRequest + * @throws {Error} If the payload is not 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.PartialUpdateClusterRequest; + + /** + * Decodes a PartialUpdateClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartialUpdateClusterRequest + * @throws {Error} If the payload 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.PartialUpdateClusterRequest; + + /** + * Verifies a PartialUpdateClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartialUpdateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartialUpdateClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.PartialUpdateClusterRequest; + + /** + * Creates a plain object from a PartialUpdateClusterRequest message. Also converts values to other types if specified. + * @param message PartialUpdateClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.PartialUpdateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartialUpdateClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartialUpdateClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAppProfileRequest. */ + interface ICreateAppProfileRequest { + + /** CreateAppProfileRequest parent */ + parent?: (string|null); + + /** CreateAppProfileRequest appProfileId */ + appProfileId?: (string|null); + + /** CreateAppProfileRequest appProfile */ + appProfile?: (google.bigtable.admin.v2.IAppProfile|null); + + /** CreateAppProfileRequest ignoreWarnings */ + ignoreWarnings?: (boolean|null); + } + + /** Represents a CreateAppProfileRequest. */ + class CreateAppProfileRequest implements ICreateAppProfileRequest { + + /** + * Constructs a new CreateAppProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateAppProfileRequest); + + /** CreateAppProfileRequest parent. */ + public parent: string; + + /** CreateAppProfileRequest appProfileId. */ + public appProfileId: string; + + /** CreateAppProfileRequest appProfile. */ + public appProfile?: (google.bigtable.admin.v2.IAppProfile|null); + + /** CreateAppProfileRequest ignoreWarnings. */ + public ignoreWarnings: boolean; + + /** + * Creates a new CreateAppProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAppProfileRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateAppProfileRequest): google.bigtable.admin.v2.CreateAppProfileRequest; + + /** + * Encodes the specified CreateAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateAppProfileRequest.verify|verify} messages. + * @param message CreateAppProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateAppProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAppProfileRequest.verify|verify} messages. + * @param message CreateAppProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateAppProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAppProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAppProfileRequest + * @throws {Error} If the payload is not 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.CreateAppProfileRequest; + + /** + * Decodes a CreateAppProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAppProfileRequest + * @throws {Error} If the payload 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.CreateAppProfileRequest; + + /** + * Verifies a CreateAppProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAppProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateAppProfileRequest; + + /** + * Creates a plain object from a CreateAppProfileRequest message. Also converts values to other types if specified. + * @param message CreateAppProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateAppProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAppProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAppProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAppProfileRequest. */ + interface IGetAppProfileRequest { + + /** GetAppProfileRequest name */ + name?: (string|null); + } + + /** Represents a GetAppProfileRequest. */ + class GetAppProfileRequest implements IGetAppProfileRequest { + + /** + * Constructs a new GetAppProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetAppProfileRequest); + + /** GetAppProfileRequest name. */ + public name: string; + + /** + * Creates a new GetAppProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAppProfileRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetAppProfileRequest): google.bigtable.admin.v2.GetAppProfileRequest; + + /** + * Encodes the specified GetAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetAppProfileRequest.verify|verify} messages. + * @param message GetAppProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetAppProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetAppProfileRequest.verify|verify} messages. + * @param message GetAppProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetAppProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAppProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAppProfileRequest + * @throws {Error} If the payload is not 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.GetAppProfileRequest; + + /** + * Decodes a GetAppProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAppProfileRequest + * @throws {Error} If the payload 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.GetAppProfileRequest; + + /** + * Verifies a GetAppProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAppProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetAppProfileRequest; + + /** + * Creates a plain object from a GetAppProfileRequest message. Also converts values to other types if specified. + * @param message GetAppProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetAppProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAppProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAppProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAppProfilesRequest. */ + interface IListAppProfilesRequest { + + /** ListAppProfilesRequest parent */ + parent?: (string|null); + + /** ListAppProfilesRequest pageSize */ + pageSize?: (number|null); + + /** ListAppProfilesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAppProfilesRequest. */ + class ListAppProfilesRequest implements IListAppProfilesRequest { + + /** + * Constructs a new ListAppProfilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListAppProfilesRequest); + + /** ListAppProfilesRequest parent. */ + public parent: string; + + /** ListAppProfilesRequest pageSize. */ + public pageSize: number; + + /** ListAppProfilesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAppProfilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAppProfilesRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListAppProfilesRequest): google.bigtable.admin.v2.ListAppProfilesRequest; + + /** + * Encodes the specified ListAppProfilesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesRequest.verify|verify} messages. + * @param message ListAppProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListAppProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAppProfilesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesRequest.verify|verify} messages. + * @param message ListAppProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListAppProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAppProfilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAppProfilesRequest + * @throws {Error} If the payload is not 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.ListAppProfilesRequest; + + /** + * Decodes a ListAppProfilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAppProfilesRequest + * @throws {Error} If the payload 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.ListAppProfilesRequest; + + /** + * Verifies a ListAppProfilesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAppProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAppProfilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListAppProfilesRequest; + + /** + * Creates a plain object from a ListAppProfilesRequest message. Also converts values to other types if specified. + * @param message ListAppProfilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListAppProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAppProfilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAppProfilesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAppProfilesResponse. */ + interface IListAppProfilesResponse { + + /** ListAppProfilesResponse appProfiles */ + appProfiles?: (google.bigtable.admin.v2.IAppProfile[]|null); + + /** ListAppProfilesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAppProfilesResponse failedLocations */ + failedLocations?: (string[]|null); + } + + /** Represents a ListAppProfilesResponse. */ + class ListAppProfilesResponse implements IListAppProfilesResponse { + + /** + * Constructs a new ListAppProfilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListAppProfilesResponse); + + /** ListAppProfilesResponse appProfiles. */ + public appProfiles: google.bigtable.admin.v2.IAppProfile[]; + + /** ListAppProfilesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAppProfilesResponse failedLocations. */ + public failedLocations: string[]; + + /** + * Creates a new ListAppProfilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAppProfilesResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListAppProfilesResponse): google.bigtable.admin.v2.ListAppProfilesResponse; + + /** + * Encodes the specified ListAppProfilesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesResponse.verify|verify} messages. + * @param message ListAppProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListAppProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAppProfilesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesResponse.verify|verify} messages. + * @param message ListAppProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListAppProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAppProfilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAppProfilesResponse + * @throws {Error} If the payload is not 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.ListAppProfilesResponse; + + /** + * Decodes a ListAppProfilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAppProfilesResponse + * @throws {Error} If the payload 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.ListAppProfilesResponse; + + /** + * Verifies a ListAppProfilesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAppProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAppProfilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListAppProfilesResponse; + + /** + * Creates a plain object from a ListAppProfilesResponse message. Also converts values to other types if specified. + * @param message ListAppProfilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListAppProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAppProfilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAppProfilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAppProfileRequest. */ + interface IUpdateAppProfileRequest { + + /** UpdateAppProfileRequest appProfile */ + appProfile?: (google.bigtable.admin.v2.IAppProfile|null); + + /** UpdateAppProfileRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAppProfileRequest ignoreWarnings */ + ignoreWarnings?: (boolean|null); + } + + /** Represents an UpdateAppProfileRequest. */ + class UpdateAppProfileRequest implements IUpdateAppProfileRequest { + + /** + * Constructs a new UpdateAppProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateAppProfileRequest); + + /** UpdateAppProfileRequest appProfile. */ + public appProfile?: (google.bigtable.admin.v2.IAppProfile|null); + + /** UpdateAppProfileRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAppProfileRequest ignoreWarnings. */ + public ignoreWarnings: boolean; + + /** + * Creates a new UpdateAppProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAppProfileRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateAppProfileRequest): google.bigtable.admin.v2.UpdateAppProfileRequest; + + /** + * Encodes the specified UpdateAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileRequest.verify|verify} messages. + * @param message UpdateAppProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateAppProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileRequest.verify|verify} messages. + * @param message UpdateAppProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateAppProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAppProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAppProfileRequest + * @throws {Error} If the payload is not 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.UpdateAppProfileRequest; + + /** + * Decodes an UpdateAppProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAppProfileRequest + * @throws {Error} If the payload 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.UpdateAppProfileRequest; + + /** + * Verifies an UpdateAppProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAppProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateAppProfileRequest; + + /** + * Creates a plain object from an UpdateAppProfileRequest message. Also converts values to other types if specified. + * @param message UpdateAppProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateAppProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAppProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAppProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAppProfileRequest. */ + interface IDeleteAppProfileRequest { + + /** DeleteAppProfileRequest name */ + name?: (string|null); + + /** DeleteAppProfileRequest ignoreWarnings */ + ignoreWarnings?: (boolean|null); + } + + /** Represents a DeleteAppProfileRequest. */ + class DeleteAppProfileRequest implements IDeleteAppProfileRequest { + + /** + * Constructs a new DeleteAppProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteAppProfileRequest); + + /** DeleteAppProfileRequest name. */ + public name: string; + + /** DeleteAppProfileRequest ignoreWarnings. */ + public ignoreWarnings: boolean; + + /** + * Creates a new DeleteAppProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAppProfileRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteAppProfileRequest): google.bigtable.admin.v2.DeleteAppProfileRequest; + + /** + * Encodes the specified DeleteAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteAppProfileRequest.verify|verify} messages. + * @param message DeleteAppProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteAppProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteAppProfileRequest.verify|verify} messages. + * @param message DeleteAppProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteAppProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAppProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAppProfileRequest + * @throws {Error} If the payload is not 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.DeleteAppProfileRequest; + + /** + * Decodes a DeleteAppProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAppProfileRequest + * @throws {Error} If the payload 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.DeleteAppProfileRequest; + + /** + * Verifies a DeleteAppProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAppProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteAppProfileRequest; + + /** + * Creates a plain object from a DeleteAppProfileRequest message. Also converts values to other types if specified. + * @param message DeleteAppProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteAppProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAppProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAppProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAppProfileMetadata. */ + interface IUpdateAppProfileMetadata { + } + + /** Represents an UpdateAppProfileMetadata. */ + class UpdateAppProfileMetadata implements IUpdateAppProfileMetadata { + + /** + * Constructs a new UpdateAppProfileMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateAppProfileMetadata); + + /** + * Creates a new UpdateAppProfileMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAppProfileMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateAppProfileMetadata): google.bigtable.admin.v2.UpdateAppProfileMetadata; + + /** + * Encodes the specified UpdateAppProfileMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileMetadata.verify|verify} messages. + * @param message UpdateAppProfileMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateAppProfileMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAppProfileMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileMetadata.verify|verify} messages. + * @param message UpdateAppProfileMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateAppProfileMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAppProfileMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAppProfileMetadata + * @throws {Error} If the payload is not 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.UpdateAppProfileMetadata; + + /** + * Decodes an UpdateAppProfileMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAppProfileMetadata + * @throws {Error} If the payload 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.UpdateAppProfileMetadata; + + /** + * Verifies an UpdateAppProfileMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAppProfileMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAppProfileMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateAppProfileMetadata; + + /** + * Creates a plain object from an UpdateAppProfileMetadata message. Also converts values to other types if specified. + * @param message UpdateAppProfileMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateAppProfileMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAppProfileMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAppProfileMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListHotTabletsRequest. */ + interface IListHotTabletsRequest { + + /** ListHotTabletsRequest parent */ + parent?: (string|null); + + /** ListHotTabletsRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** ListHotTabletsRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** ListHotTabletsRequest pageSize */ + pageSize?: (number|null); + + /** ListHotTabletsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListHotTabletsRequest. */ + class ListHotTabletsRequest implements IListHotTabletsRequest { + + /** + * Constructs a new ListHotTabletsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListHotTabletsRequest); + + /** ListHotTabletsRequest parent. */ + public parent: string; + + /** ListHotTabletsRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** ListHotTabletsRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** ListHotTabletsRequest pageSize. */ + public pageSize: number; + + /** ListHotTabletsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListHotTabletsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListHotTabletsRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListHotTabletsRequest): google.bigtable.admin.v2.ListHotTabletsRequest; + + /** + * Encodes the specified ListHotTabletsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListHotTabletsRequest.verify|verify} messages. + * @param message ListHotTabletsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListHotTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListHotTabletsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListHotTabletsRequest.verify|verify} messages. + * @param message ListHotTabletsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListHotTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListHotTabletsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListHotTabletsRequest + * @throws {Error} If the payload is not 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.ListHotTabletsRequest; + + /** + * Decodes a ListHotTabletsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListHotTabletsRequest + * @throws {Error} If the payload 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.ListHotTabletsRequest; + + /** + * Verifies a ListHotTabletsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListHotTabletsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListHotTabletsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListHotTabletsRequest; + + /** + * Creates a plain object from a ListHotTabletsRequest message. Also converts values to other types if specified. + * @param message ListHotTabletsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListHotTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListHotTabletsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListHotTabletsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListHotTabletsResponse. */ + interface IListHotTabletsResponse { + + /** ListHotTabletsResponse hotTablets */ + hotTablets?: (google.bigtable.admin.v2.IHotTablet[]|null); + + /** ListHotTabletsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListHotTabletsResponse. */ + class ListHotTabletsResponse implements IListHotTabletsResponse { + + /** + * Constructs a new ListHotTabletsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListHotTabletsResponse); + + /** ListHotTabletsResponse hotTablets. */ + public hotTablets: google.bigtable.admin.v2.IHotTablet[]; + + /** ListHotTabletsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListHotTabletsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListHotTabletsResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListHotTabletsResponse): google.bigtable.admin.v2.ListHotTabletsResponse; + + /** + * Encodes the specified ListHotTabletsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListHotTabletsResponse.verify|verify} messages. + * @param message ListHotTabletsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListHotTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListHotTabletsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListHotTabletsResponse.verify|verify} messages. + * @param message ListHotTabletsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListHotTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListHotTabletsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListHotTabletsResponse + * @throws {Error} If the payload is not 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.ListHotTabletsResponse; + + /** + * Decodes a ListHotTabletsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListHotTabletsResponse + * @throws {Error} If the payload 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.ListHotTabletsResponse; + + /** + * Verifies a ListHotTabletsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListHotTabletsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListHotTabletsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListHotTabletsResponse; + + /** + * Creates a plain object from a ListHotTabletsResponse message. Also converts values to other types if specified. + * @param message ListHotTabletsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListHotTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListHotTabletsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListHotTabletsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateLogicalViewRequest. */ + interface ICreateLogicalViewRequest { + + /** CreateLogicalViewRequest parent */ + parent?: (string|null); + + /** CreateLogicalViewRequest logicalViewId */ + logicalViewId?: (string|null); + + /** CreateLogicalViewRequest logicalView */ + logicalView?: (google.bigtable.admin.v2.ILogicalView|null); + } + + /** Represents a CreateLogicalViewRequest. */ + class CreateLogicalViewRequest implements ICreateLogicalViewRequest { + + /** + * Constructs a new CreateLogicalViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateLogicalViewRequest); + + /** CreateLogicalViewRequest parent. */ + public parent: string; + + /** CreateLogicalViewRequest logicalViewId. */ + public logicalViewId: string; + + /** CreateLogicalViewRequest logicalView. */ + public logicalView?: (google.bigtable.admin.v2.ILogicalView|null); + + /** + * Creates a new CreateLogicalViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLogicalViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateLogicalViewRequest): google.bigtable.admin.v2.CreateLogicalViewRequest; + + /** + * Encodes the specified CreateLogicalViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateLogicalViewRequest.verify|verify} messages. + * @param message CreateLogicalViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateLogicalViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateLogicalViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateLogicalViewRequest.verify|verify} messages. + * @param message CreateLogicalViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateLogicalViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateLogicalViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLogicalViewRequest + * @throws {Error} If the payload is not 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.CreateLogicalViewRequest; + + /** + * Decodes a CreateLogicalViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLogicalViewRequest + * @throws {Error} If the payload 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.CreateLogicalViewRequest; + + /** + * Verifies a CreateLogicalViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateLogicalViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLogicalViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateLogicalViewRequest; + + /** + * Creates a plain object from a CreateLogicalViewRequest message. Also converts values to other types if specified. + * @param message CreateLogicalViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateLogicalViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateLogicalViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateLogicalViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateLogicalViewMetadata. */ + interface ICreateLogicalViewMetadata { + + /** CreateLogicalViewMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ICreateLogicalViewRequest|null); + + /** CreateLogicalViewMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** CreateLogicalViewMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateLogicalViewMetadata. */ + class CreateLogicalViewMetadata implements ICreateLogicalViewMetadata { + + /** + * Constructs a new CreateLogicalViewMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateLogicalViewMetadata); + + /** CreateLogicalViewMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ICreateLogicalViewRequest|null); + + /** CreateLogicalViewMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** CreateLogicalViewMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateLogicalViewMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLogicalViewMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateLogicalViewMetadata): google.bigtable.admin.v2.CreateLogicalViewMetadata; + + /** + * Encodes the specified CreateLogicalViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateLogicalViewMetadata.verify|verify} messages. + * @param message CreateLogicalViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateLogicalViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateLogicalViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateLogicalViewMetadata.verify|verify} messages. + * @param message CreateLogicalViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateLogicalViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateLogicalViewMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLogicalViewMetadata + * @throws {Error} If the payload is not 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.CreateLogicalViewMetadata; + + /** + * Decodes a CreateLogicalViewMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLogicalViewMetadata + * @throws {Error} If the payload 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.CreateLogicalViewMetadata; + + /** + * Verifies a CreateLogicalViewMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateLogicalViewMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLogicalViewMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateLogicalViewMetadata; + + /** + * Creates a plain object from a CreateLogicalViewMetadata message. Also converts values to other types if specified. + * @param message CreateLogicalViewMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateLogicalViewMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateLogicalViewMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateLogicalViewMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetLogicalViewRequest. */ + interface IGetLogicalViewRequest { + + /** GetLogicalViewRequest name */ + name?: (string|null); + } + + /** Represents a GetLogicalViewRequest. */ + class GetLogicalViewRequest implements IGetLogicalViewRequest { + + /** + * Constructs a new GetLogicalViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetLogicalViewRequest); + + /** GetLogicalViewRequest name. */ + public name: string; + + /** + * Creates a new GetLogicalViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLogicalViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetLogicalViewRequest): google.bigtable.admin.v2.GetLogicalViewRequest; + + /** + * Encodes the specified GetLogicalViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetLogicalViewRequest.verify|verify} messages. + * @param message GetLogicalViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetLogicalViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetLogicalViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetLogicalViewRequest.verify|verify} messages. + * @param message GetLogicalViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetLogicalViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetLogicalViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLogicalViewRequest + * @throws {Error} If the payload is not 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.GetLogicalViewRequest; + + /** + * Decodes a GetLogicalViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLogicalViewRequest + * @throws {Error} If the payload 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.GetLogicalViewRequest; + + /** + * Verifies a GetLogicalViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetLogicalViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLogicalViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetLogicalViewRequest; + + /** + * Creates a plain object from a GetLogicalViewRequest message. Also converts values to other types if specified. + * @param message GetLogicalViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetLogicalViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetLogicalViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetLogicalViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLogicalViewsRequest. */ + interface IListLogicalViewsRequest { + + /** ListLogicalViewsRequest parent */ + parent?: (string|null); + + /** ListLogicalViewsRequest pageSize */ + pageSize?: (number|null); + + /** ListLogicalViewsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLogicalViewsRequest. */ + class ListLogicalViewsRequest implements IListLogicalViewsRequest { + + /** + * Constructs a new ListLogicalViewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListLogicalViewsRequest); + + /** ListLogicalViewsRequest parent. */ + public parent: string; + + /** ListLogicalViewsRequest pageSize. */ + public pageSize: number; + + /** ListLogicalViewsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLogicalViewsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogicalViewsRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListLogicalViewsRequest): google.bigtable.admin.v2.ListLogicalViewsRequest; + + /** + * Encodes the specified ListLogicalViewsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListLogicalViewsRequest.verify|verify} messages. + * @param message ListLogicalViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListLogicalViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogicalViewsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListLogicalViewsRequest.verify|verify} messages. + * @param message ListLogicalViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListLogicalViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogicalViewsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogicalViewsRequest + * @throws {Error} If the payload is not 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.ListLogicalViewsRequest; + + /** + * Decodes a ListLogicalViewsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogicalViewsRequest + * @throws {Error} If the payload 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.ListLogicalViewsRequest; + + /** + * Verifies a ListLogicalViewsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogicalViewsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogicalViewsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListLogicalViewsRequest; + + /** + * Creates a plain object from a ListLogicalViewsRequest message. Also converts values to other types if specified. + * @param message ListLogicalViewsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListLogicalViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogicalViewsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLogicalViewsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLogicalViewsResponse. */ + interface IListLogicalViewsResponse { + + /** ListLogicalViewsResponse logicalViews */ + logicalViews?: (google.bigtable.admin.v2.ILogicalView[]|null); + + /** ListLogicalViewsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLogicalViewsResponse. */ + class ListLogicalViewsResponse implements IListLogicalViewsResponse { + + /** + * Constructs a new ListLogicalViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListLogicalViewsResponse); + + /** ListLogicalViewsResponse logicalViews. */ + public logicalViews: google.bigtable.admin.v2.ILogicalView[]; + + /** ListLogicalViewsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLogicalViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogicalViewsResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListLogicalViewsResponse): google.bigtable.admin.v2.ListLogicalViewsResponse; + + /** + * Encodes the specified ListLogicalViewsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListLogicalViewsResponse.verify|verify} messages. + * @param message ListLogicalViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListLogicalViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogicalViewsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListLogicalViewsResponse.verify|verify} messages. + * @param message ListLogicalViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListLogicalViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogicalViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogicalViewsResponse + * @throws {Error} If the payload is not 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.ListLogicalViewsResponse; + + /** + * Decodes a ListLogicalViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogicalViewsResponse + * @throws {Error} If the payload 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.ListLogicalViewsResponse; + + /** + * Verifies a ListLogicalViewsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogicalViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogicalViewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListLogicalViewsResponse; + + /** + * Creates a plain object from a ListLogicalViewsResponse message. Also converts values to other types if specified. + * @param message ListLogicalViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListLogicalViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogicalViewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLogicalViewsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateLogicalViewRequest. */ + interface IUpdateLogicalViewRequest { + + /** UpdateLogicalViewRequest logicalView */ + logicalView?: (google.bigtable.admin.v2.ILogicalView|null); + + /** UpdateLogicalViewRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateLogicalViewRequest. */ + class UpdateLogicalViewRequest implements IUpdateLogicalViewRequest { + + /** + * Constructs a new UpdateLogicalViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateLogicalViewRequest); + + /** UpdateLogicalViewRequest logicalView. */ + public logicalView?: (google.bigtable.admin.v2.ILogicalView|null); + + /** UpdateLogicalViewRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateLogicalViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLogicalViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateLogicalViewRequest): google.bigtable.admin.v2.UpdateLogicalViewRequest; + + /** + * Encodes the specified UpdateLogicalViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateLogicalViewRequest.verify|verify} messages. + * @param message UpdateLogicalViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateLogicalViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateLogicalViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateLogicalViewRequest.verify|verify} messages. + * @param message UpdateLogicalViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateLogicalViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateLogicalViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLogicalViewRequest + * @throws {Error} If the payload is not 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.UpdateLogicalViewRequest; + + /** + * Decodes an UpdateLogicalViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLogicalViewRequest + * @throws {Error} If the payload 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.UpdateLogicalViewRequest; + + /** + * Verifies an UpdateLogicalViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateLogicalViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLogicalViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateLogicalViewRequest; + + /** + * Creates a plain object from an UpdateLogicalViewRequest message. Also converts values to other types if specified. + * @param message UpdateLogicalViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateLogicalViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateLogicalViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateLogicalViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateLogicalViewMetadata. */ + interface IUpdateLogicalViewMetadata { + + /** UpdateLogicalViewMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.IUpdateLogicalViewRequest|null); + + /** UpdateLogicalViewMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UpdateLogicalViewMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateLogicalViewMetadata. */ + class UpdateLogicalViewMetadata implements IUpdateLogicalViewMetadata { + + /** + * Constructs a new UpdateLogicalViewMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateLogicalViewMetadata); + + /** UpdateLogicalViewMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.IUpdateLogicalViewRequest|null); + + /** UpdateLogicalViewMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UpdateLogicalViewMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateLogicalViewMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLogicalViewMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateLogicalViewMetadata): google.bigtable.admin.v2.UpdateLogicalViewMetadata; + + /** + * Encodes the specified UpdateLogicalViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateLogicalViewMetadata.verify|verify} messages. + * @param message UpdateLogicalViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateLogicalViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateLogicalViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateLogicalViewMetadata.verify|verify} messages. + * @param message UpdateLogicalViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateLogicalViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateLogicalViewMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLogicalViewMetadata + * @throws {Error} If the payload is not 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.UpdateLogicalViewMetadata; + + /** + * Decodes an UpdateLogicalViewMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLogicalViewMetadata + * @throws {Error} If the payload 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.UpdateLogicalViewMetadata; + + /** + * Verifies an UpdateLogicalViewMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateLogicalViewMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLogicalViewMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateLogicalViewMetadata; + + /** + * Creates a plain object from an UpdateLogicalViewMetadata message. Also converts values to other types if specified. + * @param message UpdateLogicalViewMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateLogicalViewMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateLogicalViewMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateLogicalViewMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteLogicalViewRequest. */ + interface IDeleteLogicalViewRequest { + + /** DeleteLogicalViewRequest name */ + name?: (string|null); + + /** DeleteLogicalViewRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteLogicalViewRequest. */ + class DeleteLogicalViewRequest implements IDeleteLogicalViewRequest { + + /** + * Constructs a new DeleteLogicalViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteLogicalViewRequest); + + /** DeleteLogicalViewRequest name. */ + public name: string; + + /** DeleteLogicalViewRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteLogicalViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLogicalViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteLogicalViewRequest): google.bigtable.admin.v2.DeleteLogicalViewRequest; + + /** + * Encodes the specified DeleteLogicalViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteLogicalViewRequest.verify|verify} messages. + * @param message DeleteLogicalViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteLogicalViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLogicalViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteLogicalViewRequest.verify|verify} messages. + * @param message DeleteLogicalViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteLogicalViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLogicalViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLogicalViewRequest + * @throws {Error} If the payload is not 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.DeleteLogicalViewRequest; + + /** + * Decodes a DeleteLogicalViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLogicalViewRequest + * @throws {Error} If the payload 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.DeleteLogicalViewRequest; + + /** + * Verifies a DeleteLogicalViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLogicalViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLogicalViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteLogicalViewRequest; + + /** + * Creates a plain object from a DeleteLogicalViewRequest message. Also converts values to other types if specified. + * @param message DeleteLogicalViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteLogicalViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLogicalViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteLogicalViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMaterializedViewRequest. */ + interface ICreateMaterializedViewRequest { + + /** CreateMaterializedViewRequest parent */ + parent?: (string|null); + + /** CreateMaterializedViewRequest materializedViewId */ + materializedViewId?: (string|null); + + /** CreateMaterializedViewRequest materializedView */ + materializedView?: (google.bigtable.admin.v2.IMaterializedView|null); + } + + /** Represents a CreateMaterializedViewRequest. */ + class CreateMaterializedViewRequest implements ICreateMaterializedViewRequest { + + /** + * Constructs a new CreateMaterializedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateMaterializedViewRequest); + + /** CreateMaterializedViewRequest parent. */ + public parent: string; + + /** CreateMaterializedViewRequest materializedViewId. */ + public materializedViewId: string; + + /** CreateMaterializedViewRequest materializedView. */ + public materializedView?: (google.bigtable.admin.v2.IMaterializedView|null); + + /** + * Creates a new CreateMaterializedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMaterializedViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateMaterializedViewRequest): google.bigtable.admin.v2.CreateMaterializedViewRequest; + + /** + * Encodes the specified CreateMaterializedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateMaterializedViewRequest.verify|verify} messages. + * @param message CreateMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateMaterializedViewRequest.verify|verify} messages. + * @param message CreateMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMaterializedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMaterializedViewRequest + * @throws {Error} If the payload is not 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.CreateMaterializedViewRequest; + + /** + * Decodes a CreateMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMaterializedViewRequest + * @throws {Error} If the payload 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.CreateMaterializedViewRequest; + + /** + * Verifies a CreateMaterializedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMaterializedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateMaterializedViewRequest; + + /** + * Creates a plain object from a CreateMaterializedViewRequest message. Also converts values to other types if specified. + * @param message CreateMaterializedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateMaterializedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMaterializedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMaterializedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMaterializedViewMetadata. */ + interface ICreateMaterializedViewMetadata { + + /** CreateMaterializedViewMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ICreateMaterializedViewRequest|null); + + /** CreateMaterializedViewMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** CreateMaterializedViewMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateMaterializedViewMetadata. */ + class CreateMaterializedViewMetadata implements ICreateMaterializedViewMetadata { + + /** + * Constructs a new CreateMaterializedViewMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateMaterializedViewMetadata); + + /** CreateMaterializedViewMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ICreateMaterializedViewRequest|null); + + /** CreateMaterializedViewMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** CreateMaterializedViewMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateMaterializedViewMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMaterializedViewMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateMaterializedViewMetadata): google.bigtable.admin.v2.CreateMaterializedViewMetadata; + + /** + * Encodes the specified CreateMaterializedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateMaterializedViewMetadata.verify|verify} messages. + * @param message CreateMaterializedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateMaterializedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMaterializedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateMaterializedViewMetadata.verify|verify} messages. + * @param message CreateMaterializedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateMaterializedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMaterializedViewMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMaterializedViewMetadata + * @throws {Error} If the payload is not 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.CreateMaterializedViewMetadata; + + /** + * Decodes a CreateMaterializedViewMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMaterializedViewMetadata + * @throws {Error} If the payload 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.CreateMaterializedViewMetadata; + + /** + * Verifies a CreateMaterializedViewMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMaterializedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMaterializedViewMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateMaterializedViewMetadata; + + /** + * Creates a plain object from a CreateMaterializedViewMetadata message. Also converts values to other types if specified. + * @param message CreateMaterializedViewMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateMaterializedViewMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMaterializedViewMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMaterializedViewMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMaterializedViewRequest. */ + interface IGetMaterializedViewRequest { + + /** GetMaterializedViewRequest name */ + name?: (string|null); + } + + /** Represents a GetMaterializedViewRequest. */ + class GetMaterializedViewRequest implements IGetMaterializedViewRequest { + + /** + * Constructs a new GetMaterializedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetMaterializedViewRequest); + + /** GetMaterializedViewRequest name. */ + public name: string; + + /** + * Creates a new GetMaterializedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMaterializedViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetMaterializedViewRequest): google.bigtable.admin.v2.GetMaterializedViewRequest; + + /** + * Encodes the specified GetMaterializedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetMaterializedViewRequest.verify|verify} messages. + * @param message GetMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetMaterializedViewRequest.verify|verify} messages. + * @param message GetMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMaterializedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMaterializedViewRequest + * @throws {Error} If the payload is not 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.GetMaterializedViewRequest; + + /** + * Decodes a GetMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMaterializedViewRequest + * @throws {Error} If the payload 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.GetMaterializedViewRequest; + + /** + * Verifies a GetMaterializedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMaterializedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetMaterializedViewRequest; + + /** + * Creates a plain object from a GetMaterializedViewRequest message. Also converts values to other types if specified. + * @param message GetMaterializedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetMaterializedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMaterializedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMaterializedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMaterializedViewsRequest. */ + interface IListMaterializedViewsRequest { + + /** ListMaterializedViewsRequest parent */ + parent?: (string|null); + + /** ListMaterializedViewsRequest pageSize */ + pageSize?: (number|null); + + /** ListMaterializedViewsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMaterializedViewsRequest. */ + class ListMaterializedViewsRequest implements IListMaterializedViewsRequest { + + /** + * Constructs a new ListMaterializedViewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListMaterializedViewsRequest); + + /** ListMaterializedViewsRequest parent. */ + public parent: string; + + /** ListMaterializedViewsRequest pageSize. */ + public pageSize: number; + + /** ListMaterializedViewsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMaterializedViewsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMaterializedViewsRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListMaterializedViewsRequest): google.bigtable.admin.v2.ListMaterializedViewsRequest; + + /** + * Encodes the specified ListMaterializedViewsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListMaterializedViewsRequest.verify|verify} messages. + * @param message ListMaterializedViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListMaterializedViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMaterializedViewsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListMaterializedViewsRequest.verify|verify} messages. + * @param message ListMaterializedViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListMaterializedViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMaterializedViewsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMaterializedViewsRequest + * @throws {Error} If the payload is not 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.ListMaterializedViewsRequest; + + /** + * Decodes a ListMaterializedViewsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMaterializedViewsRequest + * @throws {Error} If the payload 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.ListMaterializedViewsRequest; + + /** + * Verifies a ListMaterializedViewsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMaterializedViewsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMaterializedViewsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListMaterializedViewsRequest; + + /** + * Creates a plain object from a ListMaterializedViewsRequest message. Also converts values to other types if specified. + * @param message ListMaterializedViewsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListMaterializedViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMaterializedViewsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMaterializedViewsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMaterializedViewsResponse. */ + interface IListMaterializedViewsResponse { + + /** ListMaterializedViewsResponse materializedViews */ + materializedViews?: (google.bigtable.admin.v2.IMaterializedView[]|null); + + /** ListMaterializedViewsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMaterializedViewsResponse. */ + class ListMaterializedViewsResponse implements IListMaterializedViewsResponse { + + /** + * Constructs a new ListMaterializedViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListMaterializedViewsResponse); + + /** ListMaterializedViewsResponse materializedViews. */ + public materializedViews: google.bigtable.admin.v2.IMaterializedView[]; + + /** ListMaterializedViewsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMaterializedViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMaterializedViewsResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListMaterializedViewsResponse): google.bigtable.admin.v2.ListMaterializedViewsResponse; + + /** + * Encodes the specified ListMaterializedViewsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListMaterializedViewsResponse.verify|verify} messages. + * @param message ListMaterializedViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListMaterializedViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMaterializedViewsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListMaterializedViewsResponse.verify|verify} messages. + * @param message ListMaterializedViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListMaterializedViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMaterializedViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMaterializedViewsResponse + * @throws {Error} If the payload is not 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.ListMaterializedViewsResponse; + + /** + * Decodes a ListMaterializedViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMaterializedViewsResponse + * @throws {Error} If the payload 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.ListMaterializedViewsResponse; + + /** + * Verifies a ListMaterializedViewsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMaterializedViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMaterializedViewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListMaterializedViewsResponse; + + /** + * Creates a plain object from a ListMaterializedViewsResponse message. Also converts values to other types if specified. + * @param message ListMaterializedViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListMaterializedViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMaterializedViewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMaterializedViewsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMaterializedViewRequest. */ + interface IUpdateMaterializedViewRequest { + + /** UpdateMaterializedViewRequest materializedView */ + materializedView?: (google.bigtable.admin.v2.IMaterializedView|null); + + /** UpdateMaterializedViewRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateMaterializedViewRequest. */ + class UpdateMaterializedViewRequest implements IUpdateMaterializedViewRequest { + + /** + * Constructs a new UpdateMaterializedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateMaterializedViewRequest); + + /** UpdateMaterializedViewRequest materializedView. */ + public materializedView?: (google.bigtable.admin.v2.IMaterializedView|null); + + /** UpdateMaterializedViewRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateMaterializedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMaterializedViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateMaterializedViewRequest): google.bigtable.admin.v2.UpdateMaterializedViewRequest; + + /** + * Encodes the specified UpdateMaterializedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateMaterializedViewRequest.verify|verify} messages. + * @param message UpdateMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateMaterializedViewRequest.verify|verify} messages. + * @param message UpdateMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMaterializedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMaterializedViewRequest + * @throws {Error} If the payload is not 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.UpdateMaterializedViewRequest; + + /** + * Decodes an UpdateMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMaterializedViewRequest + * @throws {Error} If the payload 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.UpdateMaterializedViewRequest; + + /** + * Verifies an UpdateMaterializedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMaterializedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateMaterializedViewRequest; + + /** + * Creates a plain object from an UpdateMaterializedViewRequest message. Also converts values to other types if specified. + * @param message UpdateMaterializedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateMaterializedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMaterializedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMaterializedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMaterializedViewMetadata. */ + interface IUpdateMaterializedViewMetadata { + + /** UpdateMaterializedViewMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.IUpdateMaterializedViewRequest|null); + + /** UpdateMaterializedViewMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UpdateMaterializedViewMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateMaterializedViewMetadata. */ + class UpdateMaterializedViewMetadata implements IUpdateMaterializedViewMetadata { + + /** + * Constructs a new UpdateMaterializedViewMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateMaterializedViewMetadata); + + /** UpdateMaterializedViewMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.IUpdateMaterializedViewRequest|null); + + /** UpdateMaterializedViewMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UpdateMaterializedViewMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateMaterializedViewMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMaterializedViewMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateMaterializedViewMetadata): google.bigtable.admin.v2.UpdateMaterializedViewMetadata; + + /** + * Encodes the specified UpdateMaterializedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateMaterializedViewMetadata.verify|verify} messages. + * @param message UpdateMaterializedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateMaterializedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMaterializedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateMaterializedViewMetadata.verify|verify} messages. + * @param message UpdateMaterializedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateMaterializedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMaterializedViewMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMaterializedViewMetadata + * @throws {Error} If the payload is not 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.UpdateMaterializedViewMetadata; + + /** + * Decodes an UpdateMaterializedViewMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMaterializedViewMetadata + * @throws {Error} If the payload 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.UpdateMaterializedViewMetadata; + + /** + * Verifies an UpdateMaterializedViewMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateMaterializedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMaterializedViewMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateMaterializedViewMetadata; + + /** + * Creates a plain object from an UpdateMaterializedViewMetadata message. Also converts values to other types if specified. + * @param message UpdateMaterializedViewMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateMaterializedViewMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMaterializedViewMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMaterializedViewMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteMaterializedViewRequest. */ + interface IDeleteMaterializedViewRequest { + + /** DeleteMaterializedViewRequest name */ + name?: (string|null); + + /** DeleteMaterializedViewRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteMaterializedViewRequest. */ + class DeleteMaterializedViewRequest implements IDeleteMaterializedViewRequest { + + /** + * Constructs a new DeleteMaterializedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteMaterializedViewRequest); + + /** DeleteMaterializedViewRequest name. */ + public name: string; + + /** DeleteMaterializedViewRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteMaterializedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMaterializedViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteMaterializedViewRequest): google.bigtable.admin.v2.DeleteMaterializedViewRequest; + + /** + * Encodes the specified DeleteMaterializedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteMaterializedViewRequest.verify|verify} messages. + * @param message DeleteMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteMaterializedViewRequest.verify|verify} messages. + * @param message DeleteMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMaterializedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMaterializedViewRequest + * @throws {Error} If the payload is not 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.DeleteMaterializedViewRequest; + + /** + * Decodes a DeleteMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMaterializedViewRequest + * @throws {Error} If the payload 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.DeleteMaterializedViewRequest; + + /** + * Verifies a DeleteMaterializedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMaterializedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteMaterializedViewRequest; + + /** + * Creates a plain object from a DeleteMaterializedViewRequest message. Also converts values to other types if specified. + * @param message DeleteMaterializedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteMaterializedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMaterializedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMaterializedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Instance. */ + interface IInstance { + + /** Instance name */ + name?: (string|null); + + /** Instance displayName */ + displayName?: (string|null); + + /** Instance state */ + state?: (google.bigtable.admin.v2.Instance.State|keyof typeof google.bigtable.admin.v2.Instance.State|null); + + /** Instance type */ + type?: (google.bigtable.admin.v2.Instance.Type|keyof typeof google.bigtable.admin.v2.Instance.Type|null); + + /** Instance edition */ + edition?: (google.bigtable.admin.v2.Instance.Edition|keyof typeof google.bigtable.admin.v2.Instance.Edition|null); + + /** Instance labels */ + labels?: ({ [k: string]: string }|null); + + /** Instance createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Instance satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Instance satisfiesPzi */ + satisfiesPzi?: (boolean|null); + + /** Instance tags */ + tags?: ({ [k: string]: string }|null); + } + + /** Represents an Instance. */ + class Instance implements IInstance { + + /** + * Constructs a new Instance. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IInstance); + + /** Instance name. */ + public name: string; + + /** Instance displayName. */ + public displayName: string; + + /** Instance state. */ + public state: (google.bigtable.admin.v2.Instance.State|keyof typeof google.bigtable.admin.v2.Instance.State); + + /** Instance type. */ + public type: (google.bigtable.admin.v2.Instance.Type|keyof typeof google.bigtable.admin.v2.Instance.Type); + + /** Instance edition. */ + public edition: (google.bigtable.admin.v2.Instance.Edition|keyof typeof google.bigtable.admin.v2.Instance.Edition); + + /** Instance labels. */ + public labels: { [k: string]: string }; + + /** Instance createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Instance satisfiesPzs. */ + public satisfiesPzs?: (boolean|null); + + /** Instance satisfiesPzi. */ + public satisfiesPzi?: (boolean|null); + + /** Instance tags. */ + public tags: { [k: string]: string }; + + /** + * Creates a new Instance instance using the specified properties. + * @param [properties] Properties to set + * @returns Instance instance + */ + public static create(properties?: google.bigtable.admin.v2.IInstance): google.bigtable.admin.v2.Instance; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.bigtable.admin.v2.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Instance + * @throws {Error} If the payload is not 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.Instance; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Instance + * @throws {Error} If the payload 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.Instance; + + /** + * Verifies an Instance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Instance + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Instance; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @param message Instance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Instance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Instance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Instance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Instance { + + /** State enum. */ + enum State { + STATE_NOT_KNOWN = 0, + READY = 1, + CREATING = 2 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + PRODUCTION = 1, + DEVELOPMENT = 2 + } + + /** Edition enum. */ + enum Edition { + EDITION_UNSPECIFIED = 0, + ENTERPRISE = 1, + ENTERPRISE_PLUS = 2 + } + } + + /** Properties of an AutoscalingTargets. */ + interface IAutoscalingTargets { + + /** AutoscalingTargets cpuUtilizationPercent */ + cpuUtilizationPercent?: (number|null); + + /** AutoscalingTargets storageUtilizationGibPerNode */ + storageUtilizationGibPerNode?: (number|null); + } + + /** Represents an AutoscalingTargets. */ + class AutoscalingTargets implements IAutoscalingTargets { + + /** + * Constructs a new AutoscalingTargets. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IAutoscalingTargets); + + /** AutoscalingTargets cpuUtilizationPercent. */ + public cpuUtilizationPercent: number; + + /** AutoscalingTargets storageUtilizationGibPerNode. */ + public storageUtilizationGibPerNode: number; + + /** + * Creates a new AutoscalingTargets instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoscalingTargets instance + */ + public static create(properties?: google.bigtable.admin.v2.IAutoscalingTargets): google.bigtable.admin.v2.AutoscalingTargets; + + /** + * Encodes the specified AutoscalingTargets message. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingTargets.verify|verify} messages. + * @param message AutoscalingTargets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IAutoscalingTargets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoscalingTargets message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingTargets.verify|verify} messages. + * @param message AutoscalingTargets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IAutoscalingTargets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoscalingTargets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoscalingTargets + * @throws {Error} If the payload is not 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.AutoscalingTargets; + + /** + * Decodes an AutoscalingTargets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoscalingTargets + * @throws {Error} If the payload 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.AutoscalingTargets; + + /** + * Verifies an AutoscalingTargets message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutoscalingTargets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoscalingTargets + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AutoscalingTargets; + + /** + * Creates a plain object from an AutoscalingTargets message. Also converts values to other types if specified. + * @param message AutoscalingTargets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AutoscalingTargets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoscalingTargets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoscalingTargets + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoscalingLimits. */ + interface IAutoscalingLimits { + + /** AutoscalingLimits minServeNodes */ + minServeNodes?: (number|null); + + /** AutoscalingLimits maxServeNodes */ + maxServeNodes?: (number|null); + } + + /** Represents an AutoscalingLimits. */ + class AutoscalingLimits implements IAutoscalingLimits { + + /** + * Constructs a new AutoscalingLimits. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IAutoscalingLimits); + + /** AutoscalingLimits minServeNodes. */ + public minServeNodes: number; + + /** AutoscalingLimits maxServeNodes. */ + public maxServeNodes: number; + + /** + * Creates a new AutoscalingLimits instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoscalingLimits instance + */ + public static create(properties?: google.bigtable.admin.v2.IAutoscalingLimits): google.bigtable.admin.v2.AutoscalingLimits; + + /** + * Encodes the specified AutoscalingLimits message. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingLimits.verify|verify} messages. + * @param message AutoscalingLimits message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IAutoscalingLimits, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoscalingLimits message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingLimits.verify|verify} messages. + * @param message AutoscalingLimits message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IAutoscalingLimits, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoscalingLimits message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoscalingLimits + * @throws {Error} If the payload is not 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.AutoscalingLimits; + + /** + * Decodes an AutoscalingLimits message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoscalingLimits + * @throws {Error} If the payload 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.AutoscalingLimits; + + /** + * Verifies an AutoscalingLimits message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutoscalingLimits message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoscalingLimits + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AutoscalingLimits; + + /** + * Creates a plain object from an AutoscalingLimits message. Also converts values to other types if specified. + * @param message AutoscalingLimits + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AutoscalingLimits, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoscalingLimits to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoscalingLimits + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cluster. */ + interface ICluster { + + /** Cluster name */ + name?: (string|null); + + /** Cluster location */ + location?: (string|null); + + /** Cluster state */ + state?: (google.bigtable.admin.v2.Cluster.State|keyof typeof google.bigtable.admin.v2.Cluster.State|null); + + /** Cluster serveNodes */ + serveNodes?: (number|null); + + /** Cluster nodeScalingFactor */ + nodeScalingFactor?: (google.bigtable.admin.v2.Cluster.NodeScalingFactor|keyof typeof google.bigtable.admin.v2.Cluster.NodeScalingFactor|null); + + /** Cluster clusterConfig */ + clusterConfig?: (google.bigtable.admin.v2.Cluster.IClusterConfig|null); + + /** Cluster defaultStorageType */ + defaultStorageType?: (google.bigtable.admin.v2.StorageType|keyof typeof google.bigtable.admin.v2.StorageType|null); + + /** Cluster encryptionConfig */ + encryptionConfig?: (google.bigtable.admin.v2.Cluster.IEncryptionConfig|null); + } + + /** Represents a Cluster. */ + class Cluster implements ICluster { + + /** + * Constructs a new Cluster. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICluster); + + /** Cluster name. */ + public name: string; + + /** Cluster location. */ + public location: string; + + /** Cluster state. */ + public state: (google.bigtable.admin.v2.Cluster.State|keyof typeof google.bigtable.admin.v2.Cluster.State); + + /** Cluster serveNodes. */ + public serveNodes: number; + + /** Cluster nodeScalingFactor. */ + public nodeScalingFactor: (google.bigtable.admin.v2.Cluster.NodeScalingFactor|keyof typeof google.bigtable.admin.v2.Cluster.NodeScalingFactor); + + /** Cluster clusterConfig. */ + public clusterConfig?: (google.bigtable.admin.v2.Cluster.IClusterConfig|null); + + /** Cluster defaultStorageType. */ + public defaultStorageType: (google.bigtable.admin.v2.StorageType|keyof typeof google.bigtable.admin.v2.StorageType); + + /** Cluster encryptionConfig. */ + public encryptionConfig?: (google.bigtable.admin.v2.Cluster.IEncryptionConfig|null); + + /** Cluster config. */ + public config?: "clusterConfig"; + + /** + * Creates a new Cluster instance using the specified properties. + * @param [properties] Properties to set + * @returns Cluster instance + */ + public static create(properties?: google.bigtable.admin.v2.ICluster): google.bigtable.admin.v2.Cluster; + + /** + * Encodes the specified Cluster message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.verify|verify} messages. + * @param message Cluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.verify|verify} messages. + * @param message Cluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cluster message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cluster + * @throws {Error} If the payload is not 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.Cluster; + + /** + * Decodes a Cluster message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cluster + * @throws {Error} If the payload 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.Cluster; + + /** + * Verifies a Cluster message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Cluster message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cluster + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Cluster; + + /** + * Creates a plain object from a Cluster message. Also converts values to other types if specified. + * @param message Cluster + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Cluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cluster to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cluster + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Cluster { + + /** State enum. */ + enum State { + STATE_NOT_KNOWN = 0, + READY = 1, + CREATING = 2, + RESIZING = 3, + DISABLED = 4 + } + + /** NodeScalingFactor enum. */ + enum NodeScalingFactor { + NODE_SCALING_FACTOR_UNSPECIFIED = 0, + NODE_SCALING_FACTOR_1X = 1, + NODE_SCALING_FACTOR_2X = 2 + } + + /** Properties of a ClusterAutoscalingConfig. */ + interface IClusterAutoscalingConfig { + + /** ClusterAutoscalingConfig autoscalingLimits */ + autoscalingLimits?: (google.bigtable.admin.v2.IAutoscalingLimits|null); + + /** ClusterAutoscalingConfig autoscalingTargets */ + autoscalingTargets?: (google.bigtable.admin.v2.IAutoscalingTargets|null); + } + + /** Represents a ClusterAutoscalingConfig. */ + class ClusterAutoscalingConfig implements IClusterAutoscalingConfig { + + /** + * Constructs a new ClusterAutoscalingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig); + + /** ClusterAutoscalingConfig autoscalingLimits. */ + public autoscalingLimits?: (google.bigtable.admin.v2.IAutoscalingLimits|null); + + /** ClusterAutoscalingConfig autoscalingTargets. */ + public autoscalingTargets?: (google.bigtable.admin.v2.IAutoscalingTargets|null); + + /** + * Creates a new ClusterAutoscalingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterAutoscalingConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig): google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig; + + /** + * Encodes the specified ClusterAutoscalingConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify|verify} messages. + * @param message ClusterAutoscalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterAutoscalingConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify|verify} messages. + * @param message ClusterAutoscalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterAutoscalingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterAutoscalingConfig + * @throws {Error} If the payload is not 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.Cluster.ClusterAutoscalingConfig; + + /** + * Decodes a ClusterAutoscalingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterAutoscalingConfig + * @throws {Error} If the payload 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.Cluster.ClusterAutoscalingConfig; + + /** + * Verifies a ClusterAutoscalingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterAutoscalingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterAutoscalingConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig; + + /** + * Creates a plain object from a ClusterAutoscalingConfig message. Also converts values to other types if specified. + * @param message ClusterAutoscalingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterAutoscalingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterAutoscalingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClusterConfig. */ + interface IClusterConfig { + + /** ClusterConfig clusterAutoscalingConfig */ + clusterAutoscalingConfig?: (google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig|null); + } + + /** Represents a ClusterConfig. */ + class ClusterConfig implements IClusterConfig { + + /** + * Constructs a new ClusterConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Cluster.IClusterConfig); + + /** ClusterConfig clusterAutoscalingConfig. */ + public clusterAutoscalingConfig?: (google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig|null); + + /** + * Creates a new ClusterConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.Cluster.IClusterConfig): google.bigtable.admin.v2.Cluster.ClusterConfig; + + /** + * Encodes the specified ClusterConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterConfig.verify|verify} messages. + * @param message ClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Cluster.IClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterConfig.verify|verify} messages. + * @param message ClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Cluster.IClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterConfig + * @throws {Error} If the payload is not 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.Cluster.ClusterConfig; + + /** + * Decodes a ClusterConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterConfig + * @throws {Error} If the payload 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.Cluster.ClusterConfig; + + /** + * Verifies a ClusterConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Cluster.ClusterConfig; + + /** + * Creates a plain object from a ClusterConfig message. Also converts values to other types if specified. + * @param message ClusterConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Cluster.ClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Cluster.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.Cluster.IEncryptionConfig): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Cluster.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Cluster.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Verifies an EncryptionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Cluster.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AppProfile. */ + interface IAppProfile { + + /** AppProfile name */ + name?: (string|null); + + /** AppProfile etag */ + etag?: (string|null); + + /** AppProfile description */ + description?: (string|null); + + /** AppProfile multiClusterRoutingUseAny */ + multiClusterRoutingUseAny?: (google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny|null); + + /** AppProfile singleClusterRouting */ + singleClusterRouting?: (google.bigtable.admin.v2.AppProfile.ISingleClusterRouting|null); + + /** AppProfile priority */ + priority?: (google.bigtable.admin.v2.AppProfile.Priority|keyof typeof google.bigtable.admin.v2.AppProfile.Priority|null); + + /** AppProfile standardIsolation */ + standardIsolation?: (google.bigtable.admin.v2.AppProfile.IStandardIsolation|null); + + /** AppProfile dataBoostIsolationReadOnly */ + dataBoostIsolationReadOnly?: (google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly|null); + } + + /** Represents an AppProfile. */ + class AppProfile implements IAppProfile { + + /** + * Constructs a new AppProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IAppProfile); + + /** AppProfile name. */ + public name: string; + + /** AppProfile etag. */ + public etag: string; + + /** AppProfile description. */ + public description: string; + + /** AppProfile multiClusterRoutingUseAny. */ + public multiClusterRoutingUseAny?: (google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny|null); + + /** AppProfile singleClusterRouting. */ + public singleClusterRouting?: (google.bigtable.admin.v2.AppProfile.ISingleClusterRouting|null); + + /** AppProfile priority. */ + public priority?: (google.bigtable.admin.v2.AppProfile.Priority|keyof typeof google.bigtable.admin.v2.AppProfile.Priority|null); + + /** AppProfile standardIsolation. */ + public standardIsolation?: (google.bigtable.admin.v2.AppProfile.IStandardIsolation|null); + + /** AppProfile dataBoostIsolationReadOnly. */ + public dataBoostIsolationReadOnly?: (google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly|null); + + /** AppProfile routingPolicy. */ + public routingPolicy?: ("multiClusterRoutingUseAny"|"singleClusterRouting"); + + /** AppProfile isolation. */ + public isolation?: ("priority"|"standardIsolation"|"dataBoostIsolationReadOnly"); + + /** + * Creates a new AppProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns AppProfile instance + */ + public static create(properties?: google.bigtable.admin.v2.IAppProfile): google.bigtable.admin.v2.AppProfile; + + /** + * Encodes the specified AppProfile message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.verify|verify} messages. + * @param message AppProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IAppProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppProfile message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.verify|verify} messages. + * @param message AppProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IAppProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppProfile + * @throws {Error} If the payload is not 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.AppProfile; + + /** + * Decodes an AppProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppProfile + * @throws {Error} If the payload 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.AppProfile; + + /** + * Verifies an AppProfile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppProfile + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AppProfile; + + /** + * Creates a plain object from an AppProfile message. Also converts values to other types if specified. + * @param message AppProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AppProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AppProfile { + + /** Properties of a MultiClusterRoutingUseAny. */ + interface IMultiClusterRoutingUseAny { + + /** MultiClusterRoutingUseAny clusterIds */ + clusterIds?: (string[]|null); + + /** MultiClusterRoutingUseAny rowAffinity */ + rowAffinity?: (google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity|null); + } + + /** Represents a MultiClusterRoutingUseAny. */ + class MultiClusterRoutingUseAny implements IMultiClusterRoutingUseAny { + + /** + * Constructs a new MultiClusterRoutingUseAny. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny); + + /** MultiClusterRoutingUseAny clusterIds. */ + public clusterIds: string[]; + + /** MultiClusterRoutingUseAny rowAffinity. */ + public rowAffinity?: (google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity|null); + + /** MultiClusterRoutingUseAny affinity. */ + public affinity?: "rowAffinity"; + + /** + * Creates a new MultiClusterRoutingUseAny instance using the specified properties. + * @param [properties] Properties to set + * @returns MultiClusterRoutingUseAny instance + */ + public static create(properties?: google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny): google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny; + + /** + * Encodes the specified MultiClusterRoutingUseAny message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.verify|verify} messages. + * @param message MultiClusterRoutingUseAny message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MultiClusterRoutingUseAny message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.verify|verify} messages. + * @param message MultiClusterRoutingUseAny message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultiClusterRoutingUseAny message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MultiClusterRoutingUseAny + * @throws {Error} If the payload is not 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.AppProfile.MultiClusterRoutingUseAny; + + /** + * Decodes a MultiClusterRoutingUseAny message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MultiClusterRoutingUseAny + * @throws {Error} If the payload 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.AppProfile.MultiClusterRoutingUseAny; + + /** + * Verifies a MultiClusterRoutingUseAny message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MultiClusterRoutingUseAny message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MultiClusterRoutingUseAny + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny; + + /** + * Creates a plain object from a MultiClusterRoutingUseAny message. Also converts values to other types if specified. + * @param message MultiClusterRoutingUseAny + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MultiClusterRoutingUseAny to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MultiClusterRoutingUseAny + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MultiClusterRoutingUseAny { + + /** Properties of a RowAffinity. */ + interface IRowAffinity { + } + + /** Represents a RowAffinity. */ + class RowAffinity implements IRowAffinity { + + /** + * Constructs a new RowAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity); + + /** + * Creates a new RowAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns RowAffinity instance + */ + public static create(properties?: google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity): google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity; + + /** + * Encodes the specified RowAffinity message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.verify|verify} messages. + * @param message RowAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RowAffinity message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.verify|verify} messages. + * @param message RowAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RowAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RowAffinity + * @throws {Error} If the payload is not 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.AppProfile.MultiClusterRoutingUseAny.RowAffinity; + + /** + * Decodes a RowAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RowAffinity + * @throws {Error} If the payload 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.AppProfile.MultiClusterRoutingUseAny.RowAffinity; + + /** + * Verifies a RowAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RowAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RowAffinity + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity; + + /** + * Creates a plain object from a RowAffinity message. Also converts values to other types if specified. + * @param message RowAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RowAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RowAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SingleClusterRouting. */ + interface ISingleClusterRouting { + + /** SingleClusterRouting clusterId */ + clusterId?: (string|null); + + /** SingleClusterRouting allowTransactionalWrites */ + allowTransactionalWrites?: (boolean|null); + } + + /** Represents a SingleClusterRouting. */ + class SingleClusterRouting implements ISingleClusterRouting { + + /** + * Constructs a new SingleClusterRouting. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AppProfile.ISingleClusterRouting); + + /** SingleClusterRouting clusterId. */ + public clusterId: string; + + /** SingleClusterRouting allowTransactionalWrites. */ + public allowTransactionalWrites: boolean; + + /** + * Creates a new SingleClusterRouting instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleClusterRouting instance + */ + public static create(properties?: google.bigtable.admin.v2.AppProfile.ISingleClusterRouting): google.bigtable.admin.v2.AppProfile.SingleClusterRouting; + + /** + * Encodes the specified SingleClusterRouting message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.SingleClusterRouting.verify|verify} messages. + * @param message SingleClusterRouting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AppProfile.ISingleClusterRouting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SingleClusterRouting message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.SingleClusterRouting.verify|verify} messages. + * @param message SingleClusterRouting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AppProfile.ISingleClusterRouting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SingleClusterRouting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleClusterRouting + * @throws {Error} If the payload is not 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.AppProfile.SingleClusterRouting; + + /** + * Decodes a SingleClusterRouting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleClusterRouting + * @throws {Error} If the payload 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.AppProfile.SingleClusterRouting; + + /** + * Verifies a SingleClusterRouting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SingleClusterRouting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleClusterRouting + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AppProfile.SingleClusterRouting; + + /** + * Creates a plain object from a SingleClusterRouting message. Also converts values to other types if specified. + * @param message SingleClusterRouting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AppProfile.SingleClusterRouting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SingleClusterRouting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleClusterRouting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Priority enum. */ + enum Priority { + PRIORITY_UNSPECIFIED = 0, + PRIORITY_LOW = 1, + PRIORITY_MEDIUM = 2, + PRIORITY_HIGH = 3 + } + + /** Properties of a StandardIsolation. */ + interface IStandardIsolation { + + /** StandardIsolation priority */ + priority?: (google.bigtable.admin.v2.AppProfile.Priority|keyof typeof google.bigtable.admin.v2.AppProfile.Priority|null); + } + + /** Represents a StandardIsolation. */ + class StandardIsolation implements IStandardIsolation { + + /** + * Constructs a new StandardIsolation. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AppProfile.IStandardIsolation); + + /** StandardIsolation priority. */ + public priority: (google.bigtable.admin.v2.AppProfile.Priority|keyof typeof google.bigtable.admin.v2.AppProfile.Priority); + + /** + * Creates a new StandardIsolation instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardIsolation instance + */ + public static create(properties?: google.bigtable.admin.v2.AppProfile.IStandardIsolation): google.bigtable.admin.v2.AppProfile.StandardIsolation; + + /** + * Encodes the specified StandardIsolation message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.StandardIsolation.verify|verify} messages. + * @param message StandardIsolation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AppProfile.IStandardIsolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardIsolation message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.StandardIsolation.verify|verify} messages. + * @param message StandardIsolation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AppProfile.IStandardIsolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardIsolation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardIsolation + * @throws {Error} If the payload is not 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.AppProfile.StandardIsolation; + + /** + * Decodes a StandardIsolation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardIsolation + * @throws {Error} If the payload 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.AppProfile.StandardIsolation; + + /** + * Verifies a StandardIsolation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardIsolation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardIsolation + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AppProfile.StandardIsolation; + + /** + * Creates a plain object from a StandardIsolation message. Also converts values to other types if specified. + * @param message StandardIsolation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AppProfile.StandardIsolation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardIsolation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardIsolation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataBoostIsolationReadOnly. */ + interface IDataBoostIsolationReadOnly { + + /** DataBoostIsolationReadOnly computeBillingOwner */ + computeBillingOwner?: (google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|keyof typeof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null); + } + + /** Represents a DataBoostIsolationReadOnly. */ + class DataBoostIsolationReadOnly implements IDataBoostIsolationReadOnly { + + /** + * Constructs a new DataBoostIsolationReadOnly. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly); + + /** DataBoostIsolationReadOnly computeBillingOwner. */ + public computeBillingOwner?: (google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|keyof typeof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null); + + /** + * Creates a new DataBoostIsolationReadOnly instance using the specified properties. + * @param [properties] Properties to set + * @returns DataBoostIsolationReadOnly instance + */ + public static create(properties?: google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly): google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly; + + /** + * Encodes the specified DataBoostIsolationReadOnly message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify|verify} messages. + * @param message DataBoostIsolationReadOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataBoostIsolationReadOnly message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify|verify} messages. + * @param message DataBoostIsolationReadOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataBoostIsolationReadOnly message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataBoostIsolationReadOnly + * @throws {Error} If the payload is not 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.AppProfile.DataBoostIsolationReadOnly; + + /** + * Decodes a DataBoostIsolationReadOnly message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataBoostIsolationReadOnly + * @throws {Error} If the payload 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.AppProfile.DataBoostIsolationReadOnly; + + /** + * Verifies a DataBoostIsolationReadOnly message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataBoostIsolationReadOnly message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataBoostIsolationReadOnly + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly; + + /** + * Creates a plain object from a DataBoostIsolationReadOnly message. Also converts values to other types if specified. + * @param message DataBoostIsolationReadOnly + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataBoostIsolationReadOnly to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataBoostIsolationReadOnly + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataBoostIsolationReadOnly { + + /** ComputeBillingOwner enum. */ + enum ComputeBillingOwner { + COMPUTE_BILLING_OWNER_UNSPECIFIED = 0, + HOST_PAYS = 1 + } + } + } + + /** Properties of a HotTablet. */ + interface IHotTablet { + + /** HotTablet name */ + name?: (string|null); + + /** HotTablet tableName */ + tableName?: (string|null); + + /** HotTablet startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** HotTablet endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** HotTablet startKey */ + startKey?: (string|null); + + /** HotTablet endKey */ + endKey?: (string|null); + + /** HotTablet nodeCpuUsagePercent */ + nodeCpuUsagePercent?: (number|null); + } + + /** Represents a HotTablet. */ + class HotTablet implements IHotTablet { + + /** + * Constructs a new HotTablet. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IHotTablet); + + /** HotTablet name. */ + public name: string; + + /** HotTablet tableName. */ + public tableName: string; + + /** HotTablet startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** HotTablet endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** HotTablet startKey. */ + public startKey: string; + + /** HotTablet endKey. */ + public endKey: string; + + /** HotTablet nodeCpuUsagePercent. */ + public nodeCpuUsagePercent: number; + + /** + * Creates a new HotTablet instance using the specified properties. + * @param [properties] Properties to set + * @returns HotTablet instance + */ + public static create(properties?: google.bigtable.admin.v2.IHotTablet): google.bigtable.admin.v2.HotTablet; + + /** + * Encodes the specified HotTablet message. Does not implicitly {@link google.bigtable.admin.v2.HotTablet.verify|verify} messages. + * @param message HotTablet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IHotTablet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HotTablet message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.HotTablet.verify|verify} messages. + * @param message HotTablet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IHotTablet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HotTablet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HotTablet + * @throws {Error} If the payload is not 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.HotTablet; + + /** + * Decodes a HotTablet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HotTablet + * @throws {Error} If the payload 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.HotTablet; + + /** + * Verifies a HotTablet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HotTablet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HotTablet + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.HotTablet; + + /** + * Creates a plain object from a HotTablet message. Also converts values to other types if specified. + * @param message HotTablet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.HotTablet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HotTablet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HotTablet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LogicalView. */ + interface ILogicalView { + + /** LogicalView name */ + name?: (string|null); + + /** LogicalView query */ + query?: (string|null); + + /** LogicalView etag */ + etag?: (string|null); + + /** LogicalView deletionProtection */ + deletionProtection?: (boolean|null); + } + + /** Represents a LogicalView. */ + class LogicalView implements ILogicalView { + + /** + * Constructs a new LogicalView. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ILogicalView); + + /** LogicalView name. */ + public name: string; + + /** LogicalView query. */ + public query: string; + + /** LogicalView etag. */ + public etag: string; + + /** LogicalView deletionProtection. */ + public deletionProtection: boolean; + + /** + * Creates a new LogicalView instance using the specified properties. + * @param [properties] Properties to set + * @returns LogicalView instance + */ + public static create(properties?: google.bigtable.admin.v2.ILogicalView): google.bigtable.admin.v2.LogicalView; + + /** + * Encodes the specified LogicalView message. Does not implicitly {@link google.bigtable.admin.v2.LogicalView.verify|verify} messages. + * @param message LogicalView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ILogicalView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogicalView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.LogicalView.verify|verify} messages. + * @param message LogicalView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ILogicalView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogicalView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogicalView + * @throws {Error} If the payload is not 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.LogicalView; + + /** + * Decodes a LogicalView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogicalView + * @throws {Error} If the payload 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.LogicalView; + + /** + * Verifies a LogicalView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogicalView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogicalView + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.LogicalView; + + /** + * Creates a plain object from a LogicalView message. Also converts values to other types if specified. + * @param message LogicalView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.LogicalView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogicalView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogicalView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaterializedView. */ + interface IMaterializedView { + + /** MaterializedView name */ + name?: (string|null); + + /** MaterializedView query */ + query?: (string|null); + + /** MaterializedView etag */ + etag?: (string|null); + + /** MaterializedView deletionProtection */ + deletionProtection?: (boolean|null); + } + + /** Represents a MaterializedView. */ + class MaterializedView implements IMaterializedView { + + /** + * Constructs a new MaterializedView. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IMaterializedView); + + /** MaterializedView name. */ + public name: string; + + /** MaterializedView query. */ + public query: string; + + /** MaterializedView etag. */ + public etag: string; + + /** MaterializedView deletionProtection. */ + public deletionProtection: boolean; + + /** + * Creates a new MaterializedView instance using the specified properties. + * @param [properties] Properties to set + * @returns MaterializedView instance + */ + public static create(properties?: google.bigtable.admin.v2.IMaterializedView): google.bigtable.admin.v2.MaterializedView; + + /** + * Encodes the specified MaterializedView message. Does not implicitly {@link google.bigtable.admin.v2.MaterializedView.verify|verify} messages. + * @param message MaterializedView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IMaterializedView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaterializedView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.MaterializedView.verify|verify} messages. + * @param message MaterializedView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IMaterializedView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaterializedView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaterializedView + * @throws {Error} If the payload is not 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.MaterializedView; + + /** + * Decodes a MaterializedView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaterializedView + * @throws {Error} If the payload 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.MaterializedView; + + /** + * Verifies a MaterializedView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaterializedView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaterializedView + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.MaterializedView; + + /** + * Creates a plain object from a MaterializedView message. Also converts values to other types if specified. + * @param message MaterializedView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.MaterializedView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaterializedView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaterializedView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** StorageType enum. */ + enum StorageType { + STORAGE_TYPE_UNSPECIFIED = 0, + SSD = 1, + HDD = 2 + } + + /** Properties of an OperationProgress. */ + interface IOperationProgress { + + /** OperationProgress progressPercent */ + progressPercent?: (number|null); + + /** OperationProgress startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** OperationProgress endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OperationProgress. */ + class OperationProgress implements IOperationProgress { + + /** + * Constructs a new OperationProgress. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IOperationProgress); + + /** OperationProgress progressPercent. */ + public progressPercent: number; + + /** OperationProgress startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** OperationProgress endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OperationProgress instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationProgress instance + */ + public static create(properties?: google.bigtable.admin.v2.IOperationProgress): google.bigtable.admin.v2.OperationProgress; + + /** + * Encodes the specified OperationProgress message. Does not implicitly {@link google.bigtable.admin.v2.OperationProgress.verify|verify} messages. + * @param message OperationProgress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.OperationProgress.verify|verify} messages. + * @param message OperationProgress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationProgress message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationProgress + * @throws {Error} If the payload is not 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.OperationProgress; + + /** + * Decodes an OperationProgress message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationProgress + * @throws {Error} If the payload 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.OperationProgress; + + /** + * Verifies an OperationProgress message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationProgress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationProgress + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.OperationProgress; + + /** + * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. + * @param message OperationProgress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.OperationProgress, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationProgress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationProgress + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a BigtableTableAdmin */ + class BigtableTableAdmin extends $protobuf.rpc.Service { + + /** + * Constructs a new BigtableTableAdmin service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new BigtableTableAdmin service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): BigtableTableAdmin; + + /** + * Calls CreateTable. + * @param request CreateTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Table + */ + public createTable(request: google.bigtable.admin.v2.ICreateTableRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.CreateTableCallback): void; + + /** + * Calls CreateTable. + * @param request CreateTableRequest message or plain object + * @returns Promise + */ + public createTable(request: google.bigtable.admin.v2.ICreateTableRequest): Promise; + + /** + * Calls CreateTableFromSnapshot. + * @param request CreateTableFromSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTableFromSnapshot(request: google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshotCallback): void; + + /** + * Calls CreateTableFromSnapshot. + * @param request CreateTableFromSnapshotRequest message or plain object + * @returns Promise + */ + public createTableFromSnapshot(request: google.bigtable.admin.v2.ICreateTableFromSnapshotRequest): Promise; + + /** + * Calls ListTables. + * @param request ListTablesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTablesResponse + */ + public listTables(request: google.bigtable.admin.v2.IListTablesRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.ListTablesCallback): void; + + /** + * Calls ListTables. + * @param request ListTablesRequest message or plain object + * @returns Promise + */ + public listTables(request: google.bigtable.admin.v2.IListTablesRequest): Promise; + + /** + * Calls GetTable. + * @param request GetTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Table + */ + public getTable(request: google.bigtable.admin.v2.IGetTableRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.GetTableCallback): void; + + /** + * Calls GetTable. + * @param request GetTableRequest message or plain object + * @returns Promise + */ + public getTable(request: google.bigtable.admin.v2.IGetTableRequest): Promise; + + /** + * Calls UpdateTable. + * @param request UpdateTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateTable(request: google.bigtable.admin.v2.IUpdateTableRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.UpdateTableCallback): void; + + /** + * Calls UpdateTable. + * @param request UpdateTableRequest message or plain object + * @returns Promise + */ + public updateTable(request: google.bigtable.admin.v2.IUpdateTableRequest): Promise; + + /** + * Calls DeleteTable. + * @param request DeleteTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTable(request: google.bigtable.admin.v2.IDeleteTableRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.DeleteTableCallback): void; + + /** + * Calls DeleteTable. + * @param request DeleteTableRequest message or plain object + * @returns Promise + */ + public deleteTable(request: google.bigtable.admin.v2.IDeleteTableRequest): Promise; + + /** + * Calls UndeleteTable. + * @param request UndeleteTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public undeleteTable(request: google.bigtable.admin.v2.IUndeleteTableRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTableCallback): void; + + /** + * Calls UndeleteTable. + * @param request UndeleteTableRequest message or plain object + * @returns Promise + */ + public undeleteTable(request: google.bigtable.admin.v2.IUndeleteTableRequest): Promise; + + /** + * Calls CreateAuthorizedView. + * @param request CreateAuthorizedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAuthorizedView(request: google.bigtable.admin.v2.ICreateAuthorizedViewRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedViewCallback): void; + + /** + * Calls CreateAuthorizedView. + * @param request CreateAuthorizedViewRequest message or plain object + * @returns Promise + */ + public createAuthorizedView(request: google.bigtable.admin.v2.ICreateAuthorizedViewRequest): Promise; + + /** + * Calls ListAuthorizedViews. + * @param request ListAuthorizedViewsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAuthorizedViewsResponse + */ + public listAuthorizedViews(request: google.bigtable.admin.v2.IListAuthorizedViewsRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViewsCallback): void; + + /** + * Calls ListAuthorizedViews. + * @param request ListAuthorizedViewsRequest message or plain object + * @returns Promise + */ + public listAuthorizedViews(request: google.bigtable.admin.v2.IListAuthorizedViewsRequest): Promise; + + /** + * Calls GetAuthorizedView. + * @param request GetAuthorizedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AuthorizedView + */ + public getAuthorizedView(request: google.bigtable.admin.v2.IGetAuthorizedViewRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedViewCallback): void; + + /** + * Calls GetAuthorizedView. + * @param request GetAuthorizedViewRequest message or plain object + * @returns Promise + */ + public getAuthorizedView(request: google.bigtable.admin.v2.IGetAuthorizedViewRequest): Promise; + + /** + * Calls UpdateAuthorizedView. + * @param request UpdateAuthorizedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAuthorizedView(request: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedViewCallback): void; + + /** + * Calls UpdateAuthorizedView. + * @param request UpdateAuthorizedViewRequest message or plain object + * @returns Promise + */ + public updateAuthorizedView(request: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest): Promise; + + /** + * Calls DeleteAuthorizedView. + * @param request DeleteAuthorizedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAuthorizedView(request: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedViewCallback): void; + + /** + * Calls DeleteAuthorizedView. + * @param request DeleteAuthorizedViewRequest message or plain object + * @returns Promise + */ + public deleteAuthorizedView(request: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest): Promise; + + /** + * Calls ModifyColumnFamilies. + * @param request ModifyColumnFamiliesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Table + */ + public modifyColumnFamilies(request: google.bigtable.admin.v2.IModifyColumnFamiliesRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamiliesCallback): void; + + /** + * Calls ModifyColumnFamilies. + * @param request ModifyColumnFamiliesRequest message or plain object + * @returns Promise + */ + public modifyColumnFamilies(request: google.bigtable.admin.v2.IModifyColumnFamiliesRequest): Promise; + + /** + * Calls DropRowRange. + * @param request DropRowRangeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public dropRowRange(request: google.bigtable.admin.v2.IDropRowRangeRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.DropRowRangeCallback): void; + + /** + * Calls DropRowRange. + * @param request DropRowRangeRequest message or plain object + * @returns Promise + */ + public dropRowRange(request: google.bigtable.admin.v2.IDropRowRangeRequest): Promise; + + /** + * Calls GenerateConsistencyToken. + * @param request GenerateConsistencyTokenRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateConsistencyTokenResponse + */ + public generateConsistencyToken(request: google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyTokenCallback): void; + + /** + * Calls GenerateConsistencyToken. + * @param request GenerateConsistencyTokenRequest message or plain object + * @returns Promise + */ + public generateConsistencyToken(request: google.bigtable.admin.v2.IGenerateConsistencyTokenRequest): Promise; + + /** + * Calls CheckConsistency. + * @param request CheckConsistencyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckConsistencyResponse + */ + public checkConsistency(request: google.bigtable.admin.v2.ICheckConsistencyRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistencyCallback): void; + + /** + * Calls CheckConsistency. + * @param request CheckConsistencyRequest message or plain object + * @returns Promise + */ + public checkConsistency(request: google.bigtable.admin.v2.ICheckConsistencyRequest): Promise; + + /** + * Calls SnapshotTable. + * @param request SnapshotTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public snapshotTable(request: google.bigtable.admin.v2.ISnapshotTableRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTableCallback): void; + + /** + * Calls SnapshotTable. + * @param request SnapshotTableRequest message or plain object + * @returns Promise + */ + public snapshotTable(request: google.bigtable.admin.v2.ISnapshotTableRequest): Promise; + + /** + * Calls GetSnapshot. + * @param request GetSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Snapshot + */ + public getSnapshot(request: google.bigtable.admin.v2.IGetSnapshotRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshotCallback): void; + + /** + * Calls GetSnapshot. + * @param request GetSnapshotRequest message or plain object + * @returns Promise + */ + public getSnapshot(request: google.bigtable.admin.v2.IGetSnapshotRequest): Promise; + + /** + * Calls ListSnapshots. + * @param request ListSnapshotsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSnapshotsResponse + */ + public listSnapshots(request: google.bigtable.admin.v2.IListSnapshotsRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshotsCallback): void; + + /** + * Calls ListSnapshots. + * @param request ListSnapshotsRequest message or plain object + * @returns Promise + */ + public listSnapshots(request: google.bigtable.admin.v2.IListSnapshotsRequest): Promise; + + /** + * Calls DeleteSnapshot. + * @param request DeleteSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSnapshot(request: google.bigtable.admin.v2.IDeleteSnapshotRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshotCallback): void; + + /** + * Calls DeleteSnapshot. + * @param request DeleteSnapshotRequest message or plain object + * @returns Promise + */ + public deleteSnapshot(request: google.bigtable.admin.v2.IDeleteSnapshotRequest): Promise; + + /** + * Calls CreateBackup. + * @param request CreateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackup(request: google.bigtable.admin.v2.ICreateBackupRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.CreateBackupCallback): void; + + /** + * Calls CreateBackup. + * @param request CreateBackupRequest message or plain object + * @returns Promise + */ + public createBackup(request: google.bigtable.admin.v2.ICreateBackupRequest): Promise; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup + */ + public getBackup(request: google.bigtable.admin.v2.IGetBackupRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.GetBackupCallback): void; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise + */ + public getBackup(request: google.bigtable.admin.v2.IGetBackupRequest): Promise; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup + */ + public updateBackup(request: google.bigtable.admin.v2.IUpdateBackupRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackupCallback): void; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @returns Promise + */ + public updateBackup(request: google.bigtable.admin.v2.IUpdateBackupRequest): Promise; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteBackup(request: google.bigtable.admin.v2.IDeleteBackupRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackupCallback): void; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise + */ + public deleteBackup(request: google.bigtable.admin.v2.IDeleteBackupRequest): Promise; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupsResponse + */ + public listBackups(request: google.bigtable.admin.v2.IListBackupsRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.ListBackupsCallback): void; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise + */ + public listBackups(request: google.bigtable.admin.v2.IListBackupsRequest): Promise; + + /** + * Calls RestoreTable. + * @param request RestoreTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restoreTable(request: google.bigtable.admin.v2.IRestoreTableRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.RestoreTableCallback): void; + + /** + * Calls RestoreTable. + * @param request RestoreTableRequest message or plain object + * @returns Promise + */ + public restoreTable(request: google.bigtable.admin.v2.IRestoreTableRequest): Promise; + + /** + * Calls CopyBackup. + * @param request CopyBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public copyBackup(request: google.bigtable.admin.v2.ICopyBackupRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.CopyBackupCallback): void; + + /** + * Calls CopyBackup. + * @param request CopyBackupRequest message or plain object + * @returns Promise + */ + public copyBackup(request: google.bigtable.admin.v2.ICopyBackupRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls CreateSchemaBundle. + * @param request CreateSchemaBundleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createSchemaBundle(request: google.bigtable.admin.v2.ICreateSchemaBundleRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundleCallback): void; + + /** + * Calls CreateSchemaBundle. + * @param request CreateSchemaBundleRequest message or plain object + * @returns Promise + */ + public createSchemaBundle(request: google.bigtable.admin.v2.ICreateSchemaBundleRequest): Promise; + + /** + * Calls UpdateSchemaBundle. + * @param request UpdateSchemaBundleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateSchemaBundle(request: google.bigtable.admin.v2.IUpdateSchemaBundleRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundleCallback): void; + + /** + * Calls UpdateSchemaBundle. + * @param request UpdateSchemaBundleRequest message or plain object + * @returns Promise + */ + public updateSchemaBundle(request: google.bigtable.admin.v2.IUpdateSchemaBundleRequest): Promise; + + /** + * Calls GetSchemaBundle. + * @param request GetSchemaBundleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaBundle + */ + public getSchemaBundle(request: google.bigtable.admin.v2.IGetSchemaBundleRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundleCallback): void; + + /** + * Calls GetSchemaBundle. + * @param request GetSchemaBundleRequest message or plain object + * @returns Promise + */ + public getSchemaBundle(request: google.bigtable.admin.v2.IGetSchemaBundleRequest): Promise; + + /** + * Calls ListSchemaBundles. + * @param request ListSchemaBundlesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSchemaBundlesResponse + */ + public listSchemaBundles(request: google.bigtable.admin.v2.IListSchemaBundlesRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundlesCallback): void; + + /** + * Calls ListSchemaBundles. + * @param request ListSchemaBundlesRequest message or plain object + * @returns Promise + */ + public listSchemaBundles(request: google.bigtable.admin.v2.IListSchemaBundlesRequest): Promise; + + /** + * Calls DeleteSchemaBundle. + * @param request DeleteSchemaBundleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSchemaBundle(request: google.bigtable.admin.v2.IDeleteSchemaBundleRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundleCallback): void; + + /** + * Calls DeleteSchemaBundle. + * @param request DeleteSchemaBundleRequest message or plain object + * @returns Promise + */ + public deleteSchemaBundle(request: google.bigtable.admin.v2.IDeleteSchemaBundleRequest): Promise; + } + + namespace BigtableTableAdmin { + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createTable}. + * @param error Error, if any + * @param [response] Table + */ + type CreateTableCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Table) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createTableFromSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTableFromSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listTables}. + * @param error Error, if any + * @param [response] ListTablesResponse + */ + type ListTablesCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListTablesResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getTable}. + * @param error Error, if any + * @param [response] Table + */ + type GetTableCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Table) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateTable}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateTableCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteTable}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTableCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|undeleteTable}. + * @param error Error, if any + * @param [response] Operation + */ + type UndeleteTableCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createAuthorizedView}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAuthorizedViewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listAuthorizedViews}. + * @param error Error, if any + * @param [response] ListAuthorizedViewsResponse + */ + type ListAuthorizedViewsCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListAuthorizedViewsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getAuthorizedView}. + * @param error Error, if any + * @param [response] AuthorizedView + */ + type GetAuthorizedViewCallback = (error: (Error|null), response?: google.bigtable.admin.v2.AuthorizedView) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateAuthorizedView}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAuthorizedViewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteAuthorizedView}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAuthorizedViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|modifyColumnFamilies}. + * @param error Error, if any + * @param [response] Table + */ + type ModifyColumnFamiliesCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Table) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|dropRowRange}. + * @param error Error, if any + * @param [response] Empty + */ + type DropRowRangeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|generateConsistencyToken}. + * @param error Error, if any + * @param [response] GenerateConsistencyTokenResponse + */ + type GenerateConsistencyTokenCallback = (error: (Error|null), response?: google.bigtable.admin.v2.GenerateConsistencyTokenResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|checkConsistency}. + * @param error Error, if any + * @param [response] CheckConsistencyResponse + */ + type CheckConsistencyCallback = (error: (Error|null), response?: google.bigtable.admin.v2.CheckConsistencyResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|snapshotTable}. + * @param error Error, if any + * @param [response] Operation + */ + type SnapshotTableCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getSnapshot}. + * @param error Error, if any + * @param [response] Snapshot + */ + type GetSnapshotCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Snapshot) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listSnapshots}. + * @param error Error, if any + * @param [response] ListSnapshotsResponse + */ + type ListSnapshotsCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListSnapshotsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteSnapshot}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSnapshotCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type GetBackupCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Backup) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type UpdateBackupCallback = (error: (Error|null), response?: google.bigtable.admin.v2.Backup) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteBackup}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteBackupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse + */ + type ListBackupsCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListBackupsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|restoreTable}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreTableCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|copyBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type CopyBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createSchemaBundle}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateSchemaBundleCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateSchemaBundle}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateSchemaBundleCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getSchemaBundle}. + * @param error Error, if any + * @param [response] SchemaBundle + */ + type GetSchemaBundleCallback = (error: (Error|null), response?: google.bigtable.admin.v2.SchemaBundle) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listSchemaBundles}. + * @param error Error, if any + * @param [response] ListSchemaBundlesResponse + */ + type ListSchemaBundlesCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListSchemaBundlesResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteSchemaBundle}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSchemaBundleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a RestoreTableRequest. */ + interface IRestoreTableRequest { + + /** RestoreTableRequest parent */ + parent?: (string|null); + + /** RestoreTableRequest tableId */ + tableId?: (string|null); + + /** RestoreTableRequest backup */ + backup?: (string|null); + } + + /** Represents a RestoreTableRequest. */ + class RestoreTableRequest implements IRestoreTableRequest { + + /** + * Constructs a new RestoreTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IRestoreTableRequest); + + /** RestoreTableRequest parent. */ + public parent: string; + + /** RestoreTableRequest tableId. */ + public tableId: string; + + /** RestoreTableRequest backup. */ + public backup?: (string|null); + + /** RestoreTableRequest source. */ + public source?: "backup"; + + /** + * Creates a new RestoreTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreTableRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IRestoreTableRequest): google.bigtable.admin.v2.RestoreTableRequest; + + /** + * Encodes the specified RestoreTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.RestoreTableRequest.verify|verify} messages. + * @param message RestoreTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IRestoreTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreTableRequest.verify|verify} messages. + * @param message RestoreTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IRestoreTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreTableRequest + * @throws {Error} If the payload is not 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.RestoreTableRequest; + + /** + * Decodes a RestoreTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreTableRequest + * @throws {Error} If the payload 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.RestoreTableRequest; + + /** + * Verifies a RestoreTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.RestoreTableRequest; + + /** + * Creates a plain object from a RestoreTableRequest message. Also converts values to other types if specified. + * @param message RestoreTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.RestoreTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreTableMetadata. */ + interface IRestoreTableMetadata { + + /** RestoreTableMetadata name */ + name?: (string|null); + + /** RestoreTableMetadata sourceType */ + sourceType?: (google.bigtable.admin.v2.RestoreSourceType|keyof typeof google.bigtable.admin.v2.RestoreSourceType|null); + + /** RestoreTableMetadata backupInfo */ + backupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); + + /** RestoreTableMetadata optimizeTableOperationName */ + optimizeTableOperationName?: (string|null); + + /** RestoreTableMetadata progress */ + progress?: (google.bigtable.admin.v2.IOperationProgress|null); + } + + /** Represents a RestoreTableMetadata. */ + class RestoreTableMetadata implements IRestoreTableMetadata { + + /** + * Constructs a new RestoreTableMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IRestoreTableMetadata); + + /** RestoreTableMetadata name. */ + public name: string; + + /** RestoreTableMetadata sourceType. */ + public sourceType: (google.bigtable.admin.v2.RestoreSourceType|keyof typeof google.bigtable.admin.v2.RestoreSourceType); + + /** RestoreTableMetadata backupInfo. */ + public backupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); + + /** RestoreTableMetadata optimizeTableOperationName. */ + public optimizeTableOperationName: string; + + /** RestoreTableMetadata progress. */ + public progress?: (google.bigtable.admin.v2.IOperationProgress|null); + + /** RestoreTableMetadata sourceInfo. */ + public sourceInfo?: "backupInfo"; + + /** + * Creates a new RestoreTableMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreTableMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IRestoreTableMetadata): google.bigtable.admin.v2.RestoreTableMetadata; + + /** + * Encodes the specified RestoreTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.RestoreTableMetadata.verify|verify} messages. + * @param message RestoreTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IRestoreTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreTableMetadata.verify|verify} messages. + * @param message RestoreTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IRestoreTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreTableMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreTableMetadata + * @throws {Error} If the payload is not 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.RestoreTableMetadata; + + /** + * Decodes a RestoreTableMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreTableMetadata + * @throws {Error} If the payload 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.RestoreTableMetadata; + + /** + * Verifies a RestoreTableMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreTableMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreTableMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.RestoreTableMetadata; + + /** + * Creates a plain object from a RestoreTableMetadata message. Also converts values to other types if specified. + * @param message RestoreTableMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.RestoreTableMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreTableMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreTableMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OptimizeRestoredTableMetadata. */ + interface IOptimizeRestoredTableMetadata { + + /** OptimizeRestoredTableMetadata name */ + name?: (string|null); + + /** OptimizeRestoredTableMetadata progress */ + progress?: (google.bigtable.admin.v2.IOperationProgress|null); + } + + /** Represents an OptimizeRestoredTableMetadata. */ + class OptimizeRestoredTableMetadata implements IOptimizeRestoredTableMetadata { + + /** + * Constructs a new OptimizeRestoredTableMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IOptimizeRestoredTableMetadata); + + /** OptimizeRestoredTableMetadata name. */ + public name: string; + + /** OptimizeRestoredTableMetadata progress. */ + public progress?: (google.bigtable.admin.v2.IOperationProgress|null); + + /** + * Creates a new OptimizeRestoredTableMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OptimizeRestoredTableMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IOptimizeRestoredTableMetadata): google.bigtable.admin.v2.OptimizeRestoredTableMetadata; + + /** + * Encodes the specified OptimizeRestoredTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.OptimizeRestoredTableMetadata.verify|verify} messages. + * @param message OptimizeRestoredTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IOptimizeRestoredTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OptimizeRestoredTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.OptimizeRestoredTableMetadata.verify|verify} messages. + * @param message OptimizeRestoredTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IOptimizeRestoredTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OptimizeRestoredTableMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OptimizeRestoredTableMetadata + * @throws {Error} If the payload is not 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.OptimizeRestoredTableMetadata; + + /** + * Decodes an OptimizeRestoredTableMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OptimizeRestoredTableMetadata + * @throws {Error} If the payload 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.OptimizeRestoredTableMetadata; + + /** + * Verifies an OptimizeRestoredTableMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OptimizeRestoredTableMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OptimizeRestoredTableMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.OptimizeRestoredTableMetadata; + + /** + * Creates a plain object from an OptimizeRestoredTableMetadata message. Also converts values to other types if specified. + * @param message OptimizeRestoredTableMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.OptimizeRestoredTableMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OptimizeRestoredTableMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OptimizeRestoredTableMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTableRequest. */ + interface ICreateTableRequest { + + /** CreateTableRequest parent */ + parent?: (string|null); + + /** CreateTableRequest tableId */ + tableId?: (string|null); + + /** CreateTableRequest table */ + table?: (google.bigtable.admin.v2.ITable|null); + + /** CreateTableRequest initialSplits */ + initialSplits?: (google.bigtable.admin.v2.CreateTableRequest.ISplit[]|null); + } + + /** Represents a CreateTableRequest. */ + class CreateTableRequest implements ICreateTableRequest { + + /** + * Constructs a new CreateTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateTableRequest); + + /** CreateTableRequest parent. */ + public parent: string; + + /** CreateTableRequest tableId. */ + public tableId: string; + + /** CreateTableRequest table. */ + public table?: (google.bigtable.admin.v2.ITable|null); + + /** CreateTableRequest initialSplits. */ + public initialSplits: google.bigtable.admin.v2.CreateTableRequest.ISplit[]; + + /** + * Creates a new CreateTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTableRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateTableRequest): google.bigtable.admin.v2.CreateTableRequest; + + /** + * Encodes the specified CreateTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateTableRequest.verify|verify} messages. + * @param message CreateTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateTableRequest.verify|verify} messages. + * @param message CreateTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTableRequest + * @throws {Error} If the payload is not 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.CreateTableRequest; + + /** + * Decodes a CreateTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTableRequest + * @throws {Error} If the payload 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.CreateTableRequest; + + /** + * Verifies a CreateTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateTableRequest; + + /** + * Creates a plain object from a CreateTableRequest message. Also converts values to other types if specified. + * @param message CreateTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CreateTableRequest { + + /** Properties of a Split. */ + interface ISplit { + + /** Split key */ + key?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Split. */ + class Split implements ISplit { + + /** + * Constructs a new Split. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.CreateTableRequest.ISplit); + + /** Split key. */ + public key: (Uint8Array|Buffer|string); + + /** + * Creates a new Split instance using the specified properties. + * @param [properties] Properties to set + * @returns Split instance + */ + public static create(properties?: google.bigtable.admin.v2.CreateTableRequest.ISplit): google.bigtable.admin.v2.CreateTableRequest.Split; + + /** + * Encodes the specified Split message. Does not implicitly {@link google.bigtable.admin.v2.CreateTableRequest.Split.verify|verify} messages. + * @param message Split message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.CreateTableRequest.ISplit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Split message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateTableRequest.Split.verify|verify} messages. + * @param message Split message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.CreateTableRequest.ISplit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Split message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Split + * @throws {Error} If the payload is not 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.CreateTableRequest.Split; + + /** + * Decodes a Split message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Split + * @throws {Error} If the payload 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.CreateTableRequest.Split; + + /** + * Verifies a Split message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Split message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Split + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateTableRequest.Split; + + /** + * Creates a plain object from a Split message. Also converts values to other types if specified. + * @param message Split + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateTableRequest.Split, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Split to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Split + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateTableFromSnapshotRequest. */ + interface ICreateTableFromSnapshotRequest { + + /** CreateTableFromSnapshotRequest parent */ + parent?: (string|null); + + /** CreateTableFromSnapshotRequest tableId */ + tableId?: (string|null); + + /** CreateTableFromSnapshotRequest sourceSnapshot */ + sourceSnapshot?: (string|null); + } + + /** Represents a CreateTableFromSnapshotRequest. */ + class CreateTableFromSnapshotRequest implements ICreateTableFromSnapshotRequest { + + /** + * Constructs a new CreateTableFromSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateTableFromSnapshotRequest); + + /** CreateTableFromSnapshotRequest parent. */ + public parent: string; + + /** CreateTableFromSnapshotRequest tableId. */ + public tableId: string; + + /** CreateTableFromSnapshotRequest sourceSnapshot. */ + public sourceSnapshot: string; + + /** + * Creates a new CreateTableFromSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTableFromSnapshotRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateTableFromSnapshotRequest): google.bigtable.admin.v2.CreateTableFromSnapshotRequest; + + /** + * Encodes the specified CreateTableFromSnapshotRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateTableFromSnapshotRequest.verify|verify} messages. + * @param message CreateTableFromSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTableFromSnapshotRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateTableFromSnapshotRequest.verify|verify} messages. + * @param message CreateTableFromSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTableFromSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTableFromSnapshotRequest + * @throws {Error} If the payload is not 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.CreateTableFromSnapshotRequest; + + /** + * Decodes a CreateTableFromSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTableFromSnapshotRequest + * @throws {Error} If the payload 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.CreateTableFromSnapshotRequest; + + /** + * Verifies a CreateTableFromSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTableFromSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTableFromSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateTableFromSnapshotRequest; + + /** + * Creates a plain object from a CreateTableFromSnapshotRequest message. Also converts values to other types if specified. + * @param message CreateTableFromSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateTableFromSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTableFromSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTableFromSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DropRowRangeRequest. */ + interface IDropRowRangeRequest { + + /** DropRowRangeRequest name */ + name?: (string|null); + + /** DropRowRangeRequest rowKeyPrefix */ + rowKeyPrefix?: (Uint8Array|Buffer|string|null); + + /** DropRowRangeRequest deleteAllDataFromTable */ + deleteAllDataFromTable?: (boolean|null); + } + + /** Represents a DropRowRangeRequest. */ + class DropRowRangeRequest implements IDropRowRangeRequest { + + /** + * Constructs a new DropRowRangeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDropRowRangeRequest); + + /** DropRowRangeRequest name. */ + public name: string; + + /** DropRowRangeRequest rowKeyPrefix. */ + public rowKeyPrefix?: (Uint8Array|Buffer|string|null); + + /** DropRowRangeRequest deleteAllDataFromTable. */ + public deleteAllDataFromTable?: (boolean|null); + + /** DropRowRangeRequest target. */ + public target?: ("rowKeyPrefix"|"deleteAllDataFromTable"); + + /** + * Creates a new DropRowRangeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DropRowRangeRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDropRowRangeRequest): google.bigtable.admin.v2.DropRowRangeRequest; + + /** + * Encodes the specified DropRowRangeRequest message. Does not implicitly {@link google.bigtable.admin.v2.DropRowRangeRequest.verify|verify} messages. + * @param message DropRowRangeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDropRowRangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DropRowRangeRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DropRowRangeRequest.verify|verify} messages. + * @param message DropRowRangeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDropRowRangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DropRowRangeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DropRowRangeRequest + * @throws {Error} If the payload is not 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.DropRowRangeRequest; + + /** + * Decodes a DropRowRangeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DropRowRangeRequest + * @throws {Error} If the payload 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.DropRowRangeRequest; + + /** + * Verifies a DropRowRangeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DropRowRangeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DropRowRangeRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DropRowRangeRequest; + + /** + * Creates a plain object from a DropRowRangeRequest message. Also converts values to other types if specified. + * @param message DropRowRangeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DropRowRangeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DropRowRangeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DropRowRangeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTablesRequest. */ + interface IListTablesRequest { + + /** ListTablesRequest parent */ + parent?: (string|null); + + /** ListTablesRequest view */ + view?: (google.bigtable.admin.v2.Table.View|keyof typeof google.bigtable.admin.v2.Table.View|null); + + /** ListTablesRequest pageSize */ + pageSize?: (number|null); + + /** ListTablesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListTablesRequest. */ + class ListTablesRequest implements IListTablesRequest { + + /** + * Constructs a new ListTablesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListTablesRequest); + + /** ListTablesRequest parent. */ + public parent: string; + + /** ListTablesRequest view. */ + public view: (google.bigtable.admin.v2.Table.View|keyof typeof google.bigtable.admin.v2.Table.View); + + /** ListTablesRequest pageSize. */ + public pageSize: number; + + /** ListTablesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListTablesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTablesRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListTablesRequest): google.bigtable.admin.v2.ListTablesRequest; + + /** + * Encodes the specified ListTablesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListTablesRequest.verify|verify} messages. + * @param message ListTablesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTablesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListTablesRequest.verify|verify} messages. + * @param message ListTablesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTablesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTablesRequest + * @throws {Error} If the payload is not 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.ListTablesRequest; + + /** + * Decodes a ListTablesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTablesRequest + * @throws {Error} If the payload 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.ListTablesRequest; + + /** + * Verifies a ListTablesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTablesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTablesRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListTablesRequest; + + /** + * Creates a plain object from a ListTablesRequest message. Also converts values to other types if specified. + * @param message ListTablesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListTablesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTablesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTablesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTablesResponse. */ + interface IListTablesResponse { + + /** ListTablesResponse tables */ + tables?: (google.bigtable.admin.v2.ITable[]|null); + + /** ListTablesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTablesResponse. */ + class ListTablesResponse implements IListTablesResponse { + + /** + * Constructs a new ListTablesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListTablesResponse); + + /** ListTablesResponse tables. */ + public tables: google.bigtable.admin.v2.ITable[]; + + /** ListTablesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTablesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTablesResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListTablesResponse): google.bigtable.admin.v2.ListTablesResponse; + + /** + * Encodes the specified ListTablesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListTablesResponse.verify|verify} messages. + * @param message ListTablesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTablesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListTablesResponse.verify|verify} messages. + * @param message ListTablesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTablesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTablesResponse + * @throws {Error} If the payload is not 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.ListTablesResponse; + + /** + * Decodes a ListTablesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTablesResponse + * @throws {Error} If the payload 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.ListTablesResponse; + + /** + * Verifies a ListTablesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTablesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTablesResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListTablesResponse; + + /** + * Creates a plain object from a ListTablesResponse message. Also converts values to other types if specified. + * @param message ListTablesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListTablesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTablesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTablesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetTableRequest. */ + interface IGetTableRequest { + + /** GetTableRequest name */ + name?: (string|null); + + /** GetTableRequest view */ + view?: (google.bigtable.admin.v2.Table.View|keyof typeof google.bigtable.admin.v2.Table.View|null); + } + + /** Represents a GetTableRequest. */ + class GetTableRequest implements IGetTableRequest { + + /** + * Constructs a new GetTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetTableRequest); + + /** GetTableRequest name. */ + public name: string; + + /** GetTableRequest view. */ + public view: (google.bigtable.admin.v2.Table.View|keyof typeof google.bigtable.admin.v2.Table.View); + + /** + * Creates a new GetTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTableRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetTableRequest): google.bigtable.admin.v2.GetTableRequest; + + /** + * Encodes the specified GetTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetTableRequest.verify|verify} messages. + * @param message GetTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetTableRequest.verify|verify} messages. + * @param message GetTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTableRequest + * @throws {Error} If the payload is not 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.GetTableRequest; + + /** + * Decodes a GetTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTableRequest + * @throws {Error} If the payload 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.GetTableRequest; + + /** + * Verifies a GetTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetTableRequest; + + /** + * Creates a plain object from a GetTableRequest message. Also converts values to other types if specified. + * @param message GetTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateTableRequest. */ + interface IUpdateTableRequest { + + /** UpdateTableRequest table */ + table?: (google.bigtable.admin.v2.ITable|null); + + /** UpdateTableRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTableRequest ignoreWarnings */ + ignoreWarnings?: (boolean|null); + } + + /** Represents an UpdateTableRequest. */ + class UpdateTableRequest implements IUpdateTableRequest { + + /** + * Constructs a new UpdateTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateTableRequest); + + /** UpdateTableRequest table. */ + public table?: (google.bigtable.admin.v2.ITable|null); + + /** UpdateTableRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTableRequest ignoreWarnings. */ + public ignoreWarnings: boolean; + + /** + * Creates a new UpdateTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTableRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateTableRequest): google.bigtable.admin.v2.UpdateTableRequest; + + /** + * Encodes the specified UpdateTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateTableRequest.verify|verify} messages. + * @param message UpdateTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateTableRequest.verify|verify} messages. + * @param message UpdateTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTableRequest + * @throws {Error} If the payload is not 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.UpdateTableRequest; + + /** + * Decodes an UpdateTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTableRequest + * @throws {Error} If the payload 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.UpdateTableRequest; + + /** + * Verifies an UpdateTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateTableRequest; + + /** + * Creates a plain object from an UpdateTableRequest message. Also converts values to other types if specified. + * @param message UpdateTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateTableMetadata. */ + interface IUpdateTableMetadata { + + /** UpdateTableMetadata name */ + name?: (string|null); + + /** UpdateTableMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UpdateTableMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateTableMetadata. */ + class UpdateTableMetadata implements IUpdateTableMetadata { + + /** + * Constructs a new UpdateTableMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateTableMetadata); + + /** UpdateTableMetadata name. */ + public name: string; + + /** UpdateTableMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UpdateTableMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateTableMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTableMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateTableMetadata): google.bigtable.admin.v2.UpdateTableMetadata; + + /** + * Encodes the specified UpdateTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateTableMetadata.verify|verify} messages. + * @param message UpdateTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateTableMetadata.verify|verify} messages. + * @param message UpdateTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTableMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTableMetadata + * @throws {Error} If the payload is not 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.UpdateTableMetadata; + + /** + * Decodes an UpdateTableMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTableMetadata + * @throws {Error} If the payload 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.UpdateTableMetadata; + + /** + * Verifies an UpdateTableMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTableMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTableMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateTableMetadata; + + /** + * Creates a plain object from an UpdateTableMetadata message. Also converts values to other types if specified. + * @param message UpdateTableMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateTableMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTableMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTableMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteTableRequest. */ + interface IDeleteTableRequest { + + /** DeleteTableRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTableRequest. */ + class DeleteTableRequest implements IDeleteTableRequest { + + /** + * Constructs a new DeleteTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteTableRequest); + + /** DeleteTableRequest name. */ + public name: string; + + /** + * Creates a new DeleteTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTableRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteTableRequest): google.bigtable.admin.v2.DeleteTableRequest; + + /** + * Encodes the specified DeleteTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteTableRequest.verify|verify} messages. + * @param message DeleteTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteTableRequest.verify|verify} messages. + * @param message DeleteTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTableRequest + * @throws {Error} If the payload is not 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.DeleteTableRequest; + + /** + * Decodes a DeleteTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTableRequest + * @throws {Error} If the payload 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.DeleteTableRequest; + + /** + * Verifies a DeleteTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteTableRequest; + + /** + * Creates a plain object from a DeleteTableRequest message. Also converts values to other types if specified. + * @param message DeleteTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UndeleteTableRequest. */ + interface IUndeleteTableRequest { + + /** UndeleteTableRequest name */ + name?: (string|null); + } + + /** Represents an UndeleteTableRequest. */ + class UndeleteTableRequest implements IUndeleteTableRequest { + + /** + * Constructs a new UndeleteTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUndeleteTableRequest); + + /** UndeleteTableRequest name. */ + public name: string; + + /** + * Creates a new UndeleteTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeleteTableRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IUndeleteTableRequest): google.bigtable.admin.v2.UndeleteTableRequest; + + /** + * Encodes the specified UndeleteTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.UndeleteTableRequest.verify|verify} messages. + * @param message UndeleteTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUndeleteTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeleteTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UndeleteTableRequest.verify|verify} messages. + * @param message UndeleteTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUndeleteTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeleteTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeleteTableRequest + * @throws {Error} If the payload is not 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.UndeleteTableRequest; + + /** + * Decodes an UndeleteTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeleteTableRequest + * @throws {Error} If the payload 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.UndeleteTableRequest; + + /** + * Verifies an UndeleteTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UndeleteTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeleteTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UndeleteTableRequest; + + /** + * Creates a plain object from an UndeleteTableRequest message. Also converts values to other types if specified. + * @param message UndeleteTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UndeleteTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeleteTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeleteTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UndeleteTableMetadata. */ + interface IUndeleteTableMetadata { + + /** UndeleteTableMetadata name */ + name?: (string|null); + + /** UndeleteTableMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UndeleteTableMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UndeleteTableMetadata. */ + class UndeleteTableMetadata implements IUndeleteTableMetadata { + + /** + * Constructs a new UndeleteTableMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUndeleteTableMetadata); + + /** UndeleteTableMetadata name. */ + public name: string; + + /** UndeleteTableMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UndeleteTableMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UndeleteTableMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeleteTableMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUndeleteTableMetadata): google.bigtable.admin.v2.UndeleteTableMetadata; + + /** + * Encodes the specified UndeleteTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UndeleteTableMetadata.verify|verify} messages. + * @param message UndeleteTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUndeleteTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeleteTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UndeleteTableMetadata.verify|verify} messages. + * @param message UndeleteTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUndeleteTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeleteTableMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeleteTableMetadata + * @throws {Error} If the payload is not 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.UndeleteTableMetadata; + + /** + * Decodes an UndeleteTableMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeleteTableMetadata + * @throws {Error} If the payload 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.UndeleteTableMetadata; + + /** + * Verifies an UndeleteTableMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UndeleteTableMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeleteTableMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UndeleteTableMetadata; + + /** + * Creates a plain object from an UndeleteTableMetadata message. Also converts values to other types if specified. + * @param message UndeleteTableMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UndeleteTableMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeleteTableMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeleteTableMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ModifyColumnFamiliesRequest. */ + interface IModifyColumnFamiliesRequest { + + /** ModifyColumnFamiliesRequest name */ + name?: (string|null); + + /** ModifyColumnFamiliesRequest modifications */ + modifications?: (google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification[]|null); + + /** ModifyColumnFamiliesRequest ignoreWarnings */ + ignoreWarnings?: (boolean|null); + } + + /** Represents a ModifyColumnFamiliesRequest. */ + class ModifyColumnFamiliesRequest implements IModifyColumnFamiliesRequest { + + /** + * Constructs a new ModifyColumnFamiliesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IModifyColumnFamiliesRequest); + + /** ModifyColumnFamiliesRequest name. */ + public name: string; + + /** ModifyColumnFamiliesRequest modifications. */ + public modifications: google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification[]; + + /** ModifyColumnFamiliesRequest ignoreWarnings. */ + public ignoreWarnings: boolean; + + /** + * Creates a new ModifyColumnFamiliesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ModifyColumnFamiliesRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IModifyColumnFamiliesRequest): google.bigtable.admin.v2.ModifyColumnFamiliesRequest; + + /** + * Encodes the specified ModifyColumnFamiliesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ModifyColumnFamiliesRequest.verify|verify} messages. + * @param message ModifyColumnFamiliesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IModifyColumnFamiliesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ModifyColumnFamiliesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ModifyColumnFamiliesRequest.verify|verify} messages. + * @param message ModifyColumnFamiliesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IModifyColumnFamiliesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModifyColumnFamiliesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModifyColumnFamiliesRequest + * @throws {Error} If the payload is not 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.ModifyColumnFamiliesRequest; + + /** + * Decodes a ModifyColumnFamiliesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModifyColumnFamiliesRequest + * @throws {Error} If the payload 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.ModifyColumnFamiliesRequest; + + /** + * Verifies a ModifyColumnFamiliesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ModifyColumnFamiliesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModifyColumnFamiliesRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ModifyColumnFamiliesRequest; + + /** + * Creates a plain object from a ModifyColumnFamiliesRequest message. Also converts values to other types if specified. + * @param message ModifyColumnFamiliesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ModifyColumnFamiliesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ModifyColumnFamiliesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ModifyColumnFamiliesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ModifyColumnFamiliesRequest { + + /** Properties of a Modification. */ + interface IModification { + + /** Modification id */ + id?: (string|null); + + /** Modification create */ + create?: (google.bigtable.admin.v2.IColumnFamily|null); + + /** Modification update */ + update?: (google.bigtable.admin.v2.IColumnFamily|null); + + /** Modification drop */ + drop?: (boolean|null); + + /** Modification updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a Modification. */ + class Modification implements IModification { + + /** + * Constructs a new Modification. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification); + + /** Modification id. */ + public id: string; + + /** Modification create. */ + public create?: (google.bigtable.admin.v2.IColumnFamily|null); + + /** Modification update. */ + public update?: (google.bigtable.admin.v2.IColumnFamily|null); + + /** Modification drop. */ + public drop?: (boolean|null); + + /** Modification updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** Modification mod. */ + public mod?: ("create"|"update"|"drop"); + + /** + * Creates a new Modification instance using the specified properties. + * @param [properties] Properties to set + * @returns Modification instance + */ + public static create(properties?: google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification): google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification; + + /** + * Encodes the specified Modification message. Does not implicitly {@link google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.verify|verify} messages. + * @param message Modification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Modification message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.verify|verify} messages. + * @param message Modification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Modification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Modification + * @throws {Error} If the payload is not 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.ModifyColumnFamiliesRequest.Modification; + + /** + * Decodes a Modification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Modification + * @throws {Error} If the payload 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.ModifyColumnFamiliesRequest.Modification; + + /** + * Verifies a Modification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Modification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Modification + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification; + + /** + * Creates a plain object from a Modification message. Also converts values to other types if specified. + * @param message Modification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Modification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Modification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GenerateConsistencyTokenRequest. */ + interface IGenerateConsistencyTokenRequest { + + /** GenerateConsistencyTokenRequest name */ + name?: (string|null); + } + + /** Represents a GenerateConsistencyTokenRequest. */ + class GenerateConsistencyTokenRequest implements IGenerateConsistencyTokenRequest { + + /** + * Constructs a new GenerateConsistencyTokenRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGenerateConsistencyTokenRequest); + + /** GenerateConsistencyTokenRequest name. */ + public name: string; + + /** + * Creates a new GenerateConsistencyTokenRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateConsistencyTokenRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGenerateConsistencyTokenRequest): google.bigtable.admin.v2.GenerateConsistencyTokenRequest; + + /** + * Encodes the specified GenerateConsistencyTokenRequest message. Does not implicitly {@link google.bigtable.admin.v2.GenerateConsistencyTokenRequest.verify|verify} messages. + * @param message GenerateConsistencyTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateConsistencyTokenRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GenerateConsistencyTokenRequest.verify|verify} messages. + * @param message GenerateConsistencyTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateConsistencyTokenRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateConsistencyTokenRequest + * @throws {Error} If the payload is not 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.GenerateConsistencyTokenRequest; + + /** + * Decodes a GenerateConsistencyTokenRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateConsistencyTokenRequest + * @throws {Error} If the payload 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.GenerateConsistencyTokenRequest; + + /** + * Verifies a GenerateConsistencyTokenRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateConsistencyTokenRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateConsistencyTokenRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GenerateConsistencyTokenRequest; + + /** + * Creates a plain object from a GenerateConsistencyTokenRequest message. Also converts values to other types if specified. + * @param message GenerateConsistencyTokenRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GenerateConsistencyTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateConsistencyTokenRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateConsistencyTokenRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateConsistencyTokenResponse. */ + interface IGenerateConsistencyTokenResponse { + + /** GenerateConsistencyTokenResponse consistencyToken */ + consistencyToken?: (string|null); + } + + /** Represents a GenerateConsistencyTokenResponse. */ + class GenerateConsistencyTokenResponse implements IGenerateConsistencyTokenResponse { + + /** + * Constructs a new GenerateConsistencyTokenResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGenerateConsistencyTokenResponse); + + /** GenerateConsistencyTokenResponse consistencyToken. */ + public consistencyToken: string; + + /** + * Creates a new GenerateConsistencyTokenResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateConsistencyTokenResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IGenerateConsistencyTokenResponse): google.bigtable.admin.v2.GenerateConsistencyTokenResponse; + + /** + * Encodes the specified GenerateConsistencyTokenResponse message. Does not implicitly {@link google.bigtable.admin.v2.GenerateConsistencyTokenResponse.verify|verify} messages. + * @param message GenerateConsistencyTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateConsistencyTokenResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GenerateConsistencyTokenResponse.verify|verify} messages. + * @param message GenerateConsistencyTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateConsistencyTokenResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateConsistencyTokenResponse + * @throws {Error} If the payload is not 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.GenerateConsistencyTokenResponse; + + /** + * Decodes a GenerateConsistencyTokenResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateConsistencyTokenResponse + * @throws {Error} If the payload 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.GenerateConsistencyTokenResponse; + + /** + * Verifies a GenerateConsistencyTokenResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateConsistencyTokenResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateConsistencyTokenResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GenerateConsistencyTokenResponse; + + /** + * Creates a plain object from a GenerateConsistencyTokenResponse message. Also converts values to other types if specified. + * @param message GenerateConsistencyTokenResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GenerateConsistencyTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateConsistencyTokenResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateConsistencyTokenResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckConsistencyRequest. */ + interface ICheckConsistencyRequest { + + /** CheckConsistencyRequest name */ + name?: (string|null); + + /** CheckConsistencyRequest consistencyToken */ + consistencyToken?: (string|null); + + /** CheckConsistencyRequest standardReadRemoteWrites */ + standardReadRemoteWrites?: (google.bigtable.admin.v2.IStandardReadRemoteWrites|null); + + /** CheckConsistencyRequest dataBoostReadLocalWrites */ + dataBoostReadLocalWrites?: (google.bigtable.admin.v2.IDataBoostReadLocalWrites|null); + } + + /** Represents a CheckConsistencyRequest. */ + class CheckConsistencyRequest implements ICheckConsistencyRequest { + + /** + * Constructs a new CheckConsistencyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICheckConsistencyRequest); + + /** CheckConsistencyRequest name. */ + public name: string; + + /** CheckConsistencyRequest consistencyToken. */ + public consistencyToken: string; + + /** CheckConsistencyRequest standardReadRemoteWrites. */ + public standardReadRemoteWrites?: (google.bigtable.admin.v2.IStandardReadRemoteWrites|null); + + /** CheckConsistencyRequest dataBoostReadLocalWrites. */ + public dataBoostReadLocalWrites?: (google.bigtable.admin.v2.IDataBoostReadLocalWrites|null); + + /** CheckConsistencyRequest mode. */ + public mode?: ("standardReadRemoteWrites"|"dataBoostReadLocalWrites"); + + /** + * Creates a new CheckConsistencyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckConsistencyRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICheckConsistencyRequest): google.bigtable.admin.v2.CheckConsistencyRequest; + + /** + * Encodes the specified CheckConsistencyRequest message. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyRequest.verify|verify} messages. + * @param message CheckConsistencyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICheckConsistencyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckConsistencyRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyRequest.verify|verify} messages. + * @param message CheckConsistencyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICheckConsistencyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckConsistencyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckConsistencyRequest + * @throws {Error} If the payload is not 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.CheckConsistencyRequest; + + /** + * Decodes a CheckConsistencyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckConsistencyRequest + * @throws {Error} If the payload 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.CheckConsistencyRequest; + + /** + * Verifies a CheckConsistencyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckConsistencyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckConsistencyRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CheckConsistencyRequest; + + /** + * Creates a plain object from a CheckConsistencyRequest message. Also converts values to other types if specified. + * @param message CheckConsistencyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CheckConsistencyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckConsistencyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckConsistencyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StandardReadRemoteWrites. */ + interface IStandardReadRemoteWrites { + } + + /** Represents a StandardReadRemoteWrites. */ + class StandardReadRemoteWrites implements IStandardReadRemoteWrites { + + /** + * Constructs a new StandardReadRemoteWrites. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IStandardReadRemoteWrites); + + /** + * Creates a new StandardReadRemoteWrites instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardReadRemoteWrites instance + */ + public static create(properties?: google.bigtable.admin.v2.IStandardReadRemoteWrites): google.bigtable.admin.v2.StandardReadRemoteWrites; + + /** + * Encodes the specified StandardReadRemoteWrites message. Does not implicitly {@link google.bigtable.admin.v2.StandardReadRemoteWrites.verify|verify} messages. + * @param message StandardReadRemoteWrites message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IStandardReadRemoteWrites, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardReadRemoteWrites message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.StandardReadRemoteWrites.verify|verify} messages. + * @param message StandardReadRemoteWrites message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IStandardReadRemoteWrites, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardReadRemoteWrites message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardReadRemoteWrites + * @throws {Error} If the payload is not 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.StandardReadRemoteWrites; + + /** + * Decodes a StandardReadRemoteWrites message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardReadRemoteWrites + * @throws {Error} If the payload 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.StandardReadRemoteWrites; + + /** + * Verifies a StandardReadRemoteWrites message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardReadRemoteWrites message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardReadRemoteWrites + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.StandardReadRemoteWrites; + + /** + * Creates a plain object from a StandardReadRemoteWrites message. Also converts values to other types if specified. + * @param message StandardReadRemoteWrites + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.StandardReadRemoteWrites, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardReadRemoteWrites to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardReadRemoteWrites + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataBoostReadLocalWrites. */ + interface IDataBoostReadLocalWrites { + } + + /** Represents a DataBoostReadLocalWrites. */ + class DataBoostReadLocalWrites implements IDataBoostReadLocalWrites { + + /** + * Constructs a new DataBoostReadLocalWrites. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDataBoostReadLocalWrites); + + /** + * Creates a new DataBoostReadLocalWrites instance using the specified properties. + * @param [properties] Properties to set + * @returns DataBoostReadLocalWrites instance + */ + public static create(properties?: google.bigtable.admin.v2.IDataBoostReadLocalWrites): google.bigtable.admin.v2.DataBoostReadLocalWrites; + + /** + * Encodes the specified DataBoostReadLocalWrites message. Does not implicitly {@link google.bigtable.admin.v2.DataBoostReadLocalWrites.verify|verify} messages. + * @param message DataBoostReadLocalWrites message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDataBoostReadLocalWrites, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataBoostReadLocalWrites message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DataBoostReadLocalWrites.verify|verify} messages. + * @param message DataBoostReadLocalWrites message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDataBoostReadLocalWrites, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataBoostReadLocalWrites message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataBoostReadLocalWrites + * @throws {Error} If the payload is not 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.DataBoostReadLocalWrites; + + /** + * Decodes a DataBoostReadLocalWrites message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataBoostReadLocalWrites + * @throws {Error} If the payload 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.DataBoostReadLocalWrites; + + /** + * Verifies a DataBoostReadLocalWrites message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataBoostReadLocalWrites message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataBoostReadLocalWrites + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DataBoostReadLocalWrites; + + /** + * Creates a plain object from a DataBoostReadLocalWrites message. Also converts values to other types if specified. + * @param message DataBoostReadLocalWrites + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DataBoostReadLocalWrites, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataBoostReadLocalWrites to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataBoostReadLocalWrites + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckConsistencyResponse. */ + interface ICheckConsistencyResponse { + + /** CheckConsistencyResponse consistent */ + consistent?: (boolean|null); + } + + /** Represents a CheckConsistencyResponse. */ + class CheckConsistencyResponse implements ICheckConsistencyResponse { + + /** + * Constructs a new CheckConsistencyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICheckConsistencyResponse); + + /** CheckConsistencyResponse consistent. */ + public consistent: boolean; + + /** + * Creates a new CheckConsistencyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckConsistencyResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.ICheckConsistencyResponse): google.bigtable.admin.v2.CheckConsistencyResponse; + + /** + * Encodes the specified CheckConsistencyResponse message. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyResponse.verify|verify} messages. + * @param message CheckConsistencyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICheckConsistencyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckConsistencyResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyResponse.verify|verify} messages. + * @param message CheckConsistencyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICheckConsistencyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckConsistencyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckConsistencyResponse + * @throws {Error} If the payload is not 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.CheckConsistencyResponse; + + /** + * Decodes a CheckConsistencyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckConsistencyResponse + * @throws {Error} If the payload 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.CheckConsistencyResponse; + + /** + * Verifies a CheckConsistencyResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckConsistencyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckConsistencyResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CheckConsistencyResponse; + + /** + * Creates a plain object from a CheckConsistencyResponse message. Also converts values to other types if specified. + * @param message CheckConsistencyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CheckConsistencyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckConsistencyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckConsistencyResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SnapshotTableRequest. */ + interface ISnapshotTableRequest { + + /** SnapshotTableRequest name */ + name?: (string|null); + + /** SnapshotTableRequest cluster */ + cluster?: (string|null); + + /** SnapshotTableRequest snapshotId */ + snapshotId?: (string|null); + + /** SnapshotTableRequest ttl */ + ttl?: (google.protobuf.IDuration|null); + + /** SnapshotTableRequest description */ + description?: (string|null); + } + + /** Represents a SnapshotTableRequest. */ + class SnapshotTableRequest implements ISnapshotTableRequest { + + /** + * Constructs a new SnapshotTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ISnapshotTableRequest); + + /** SnapshotTableRequest name. */ + public name: string; + + /** SnapshotTableRequest cluster. */ + public cluster: string; + + /** SnapshotTableRequest snapshotId. */ + public snapshotId: string; + + /** SnapshotTableRequest ttl. */ + public ttl?: (google.protobuf.IDuration|null); + + /** SnapshotTableRequest description. */ + public description: string; + + /** + * Creates a new SnapshotTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SnapshotTableRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ISnapshotTableRequest): google.bigtable.admin.v2.SnapshotTableRequest; + + /** + * Encodes the specified SnapshotTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableRequest.verify|verify} messages. + * @param message SnapshotTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ISnapshotTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SnapshotTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableRequest.verify|verify} messages. + * @param message SnapshotTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ISnapshotTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SnapshotTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SnapshotTableRequest + * @throws {Error} If the payload is not 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.SnapshotTableRequest; + + /** + * Decodes a SnapshotTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SnapshotTableRequest + * @throws {Error} If the payload 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.SnapshotTableRequest; + + /** + * Verifies a SnapshotTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SnapshotTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SnapshotTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.SnapshotTableRequest; + + /** + * Creates a plain object from a SnapshotTableRequest message. Also converts values to other types if specified. + * @param message SnapshotTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.SnapshotTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SnapshotTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SnapshotTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSnapshotRequest. */ + interface IGetSnapshotRequest { + + /** GetSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a GetSnapshotRequest. */ + class GetSnapshotRequest implements IGetSnapshotRequest { + + /** + * Constructs a new GetSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetSnapshotRequest); + + /** GetSnapshotRequest name. */ + public name: string; + + /** + * Creates a new GetSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSnapshotRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetSnapshotRequest): google.bigtable.admin.v2.GetSnapshotRequest; + + /** + * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetSnapshotRequest.verify|verify} messages. + * @param message GetSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetSnapshotRequest.verify|verify} messages. + * @param message GetSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSnapshotRequest + * @throws {Error} If the payload is not 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.GetSnapshotRequest; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSnapshotRequest + * @throws {Error} If the payload 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.GetSnapshotRequest; + + /** + * Verifies a GetSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetSnapshotRequest; + + /** + * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. + * @param message GetSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSnapshotsRequest. */ + interface IListSnapshotsRequest { + + /** ListSnapshotsRequest parent */ + parent?: (string|null); + + /** ListSnapshotsRequest pageSize */ + pageSize?: (number|null); + + /** ListSnapshotsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListSnapshotsRequest. */ + class ListSnapshotsRequest implements IListSnapshotsRequest { + + /** + * Constructs a new ListSnapshotsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListSnapshotsRequest); + + /** ListSnapshotsRequest parent. */ + public parent: string; + + /** ListSnapshotsRequest pageSize. */ + public pageSize: number; + + /** ListSnapshotsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListSnapshotsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSnapshotsRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListSnapshotsRequest): google.bigtable.admin.v2.ListSnapshotsRequest; + + /** + * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListSnapshotsRequest.verify|verify} messages. + * @param message ListSnapshotsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListSnapshotsRequest.verify|verify} messages. + * @param message ListSnapshotsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSnapshotsRequest + * @throws {Error} If the payload is not 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.ListSnapshotsRequest; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSnapshotsRequest + * @throws {Error} If the payload 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.ListSnapshotsRequest; + + /** + * Verifies a ListSnapshotsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSnapshotsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListSnapshotsRequest; + + /** + * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. + * @param message ListSnapshotsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListSnapshotsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSnapshotsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSnapshotsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSnapshotsResponse. */ + interface IListSnapshotsResponse { + + /** ListSnapshotsResponse snapshots */ + snapshots?: (google.bigtable.admin.v2.ISnapshot[]|null); + + /** ListSnapshotsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSnapshotsResponse. */ + class ListSnapshotsResponse implements IListSnapshotsResponse { + + /** + * Constructs a new ListSnapshotsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListSnapshotsResponse); + + /** ListSnapshotsResponse snapshots. */ + public snapshots: google.bigtable.admin.v2.ISnapshot[]; + + /** ListSnapshotsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSnapshotsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSnapshotsResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListSnapshotsResponse): google.bigtable.admin.v2.ListSnapshotsResponse; + + /** + * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListSnapshotsResponse.verify|verify} messages. + * @param message ListSnapshotsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListSnapshotsResponse.verify|verify} messages. + * @param message ListSnapshotsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSnapshotsResponse + * @throws {Error} If the payload is not 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.ListSnapshotsResponse; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSnapshotsResponse + * @throws {Error} If the payload 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.ListSnapshotsResponse; + + /** + * Verifies a ListSnapshotsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSnapshotsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListSnapshotsResponse; + + /** + * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. + * @param message ListSnapshotsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListSnapshotsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSnapshotsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSnapshotsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSnapshotRequest. */ + interface IDeleteSnapshotRequest { + + /** DeleteSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSnapshotRequest. */ + class DeleteSnapshotRequest implements IDeleteSnapshotRequest { + + /** + * Constructs a new DeleteSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteSnapshotRequest); + + /** DeleteSnapshotRequest name. */ + public name: string; + + /** + * Creates a new DeleteSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSnapshotRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteSnapshotRequest): google.bigtable.admin.v2.DeleteSnapshotRequest; + + /** + * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteSnapshotRequest.verify|verify} messages. + * @param message DeleteSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteSnapshotRequest.verify|verify} messages. + * @param message DeleteSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSnapshotRequest + * @throws {Error} If the payload is not 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.DeleteSnapshotRequest; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSnapshotRequest + * @throws {Error} If the payload 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.DeleteSnapshotRequest; + + /** + * Verifies a DeleteSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteSnapshotRequest; + + /** + * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. + * @param message DeleteSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SnapshotTableMetadata. */ + interface ISnapshotTableMetadata { + + /** SnapshotTableMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ISnapshotTableRequest|null); + + /** SnapshotTableMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** SnapshotTableMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SnapshotTableMetadata. */ + class SnapshotTableMetadata implements ISnapshotTableMetadata { + + /** + * Constructs a new SnapshotTableMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ISnapshotTableMetadata); + + /** SnapshotTableMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ISnapshotTableRequest|null); + + /** SnapshotTableMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** SnapshotTableMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new SnapshotTableMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns SnapshotTableMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ISnapshotTableMetadata): google.bigtable.admin.v2.SnapshotTableMetadata; + + /** + * Encodes the specified SnapshotTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableMetadata.verify|verify} messages. + * @param message SnapshotTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ISnapshotTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SnapshotTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableMetadata.verify|verify} messages. + * @param message SnapshotTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ISnapshotTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SnapshotTableMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SnapshotTableMetadata + * @throws {Error} If the payload is not 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.SnapshotTableMetadata; + + /** + * Decodes a SnapshotTableMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SnapshotTableMetadata + * @throws {Error} If the payload 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.SnapshotTableMetadata; + + /** + * Verifies a SnapshotTableMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SnapshotTableMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SnapshotTableMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.SnapshotTableMetadata; + + /** + * Creates a plain object from a SnapshotTableMetadata message. Also converts values to other types if specified. + * @param message SnapshotTableMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.SnapshotTableMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SnapshotTableMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SnapshotTableMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTableFromSnapshotMetadata. */ + interface ICreateTableFromSnapshotMetadata { + + /** CreateTableFromSnapshotMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ICreateTableFromSnapshotRequest|null); + + /** CreateTableFromSnapshotMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateTableFromSnapshotMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateTableFromSnapshotMetadata. */ + class CreateTableFromSnapshotMetadata implements ICreateTableFromSnapshotMetadata { + + /** + * Constructs a new CreateTableFromSnapshotMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata); + + /** CreateTableFromSnapshotMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ICreateTableFromSnapshotRequest|null); + + /** CreateTableFromSnapshotMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateTableFromSnapshotMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateTableFromSnapshotMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTableFromSnapshotMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata): google.bigtable.admin.v2.CreateTableFromSnapshotMetadata; + + /** + * Encodes the specified CreateTableFromSnapshotMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.verify|verify} messages. + * @param message CreateTableFromSnapshotMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTableFromSnapshotMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.verify|verify} messages. + * @param message CreateTableFromSnapshotMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTableFromSnapshotMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTableFromSnapshotMetadata + * @throws {Error} If the payload is not 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.CreateTableFromSnapshotMetadata; + + /** + * Decodes a CreateTableFromSnapshotMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTableFromSnapshotMetadata + * @throws {Error} If the payload 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.CreateTableFromSnapshotMetadata; + + /** + * Verifies a CreateTableFromSnapshotMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTableFromSnapshotMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTableFromSnapshotMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateTableFromSnapshotMetadata; + + /** + * Creates a plain object from a CreateTableFromSnapshotMetadata message. Also converts values to other types if specified. + * @param message CreateTableFromSnapshotMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateTableFromSnapshotMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTableFromSnapshotMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTableFromSnapshotMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateBackupRequest. */ + interface ICreateBackupRequest { + + /** CreateBackupRequest parent */ + parent?: (string|null); + + /** CreateBackupRequest backupId */ + backupId?: (string|null); + + /** CreateBackupRequest backup */ + backup?: (google.bigtable.admin.v2.IBackup|null); + } + + /** Represents a CreateBackupRequest. */ + class CreateBackupRequest implements ICreateBackupRequest { + + /** + * Constructs a new CreateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateBackupRequest); + + /** CreateBackupRequest parent. */ + public parent: string; + + /** CreateBackupRequest backupId. */ + public backupId: string; + + /** CreateBackupRequest backup. */ + public backup?: (google.bigtable.admin.v2.IBackup|null); + + /** + * Creates a new CreateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateBackupRequest): google.bigtable.admin.v2.CreateBackupRequest; + + /** + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupRequest + * @throws {Error} If the payload is not 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.CreateBackupRequest; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupRequest + * @throws {Error} If the payload 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.CreateBackupRequest; + + /** + * Verifies a CreateBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateBackupRequest; + + /** + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * @param message CreateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateBackupMetadata. */ + interface ICreateBackupMetadata { + + /** CreateBackupMetadata name */ + name?: (string|null); + + /** CreateBackupMetadata sourceTable */ + sourceTable?: (string|null); + + /** CreateBackupMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** CreateBackupMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateBackupMetadata. */ + class CreateBackupMetadata implements ICreateBackupMetadata { + + /** + * Constructs a new CreateBackupMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateBackupMetadata); + + /** CreateBackupMetadata name. */ + public name: string; + + /** CreateBackupMetadata sourceTable. */ + public sourceTable: string; + + /** CreateBackupMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** CreateBackupMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateBackupMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateBackupMetadata): google.bigtable.admin.v2.CreateBackupMetadata; + + /** + * Encodes the specified CreateBackupMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateBackupMetadata.verify|verify} messages. + * @param message CreateBackupMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateBackupMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateBackupMetadata.verify|verify} messages. + * @param message CreateBackupMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateBackupMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupMetadata + * @throws {Error} If the payload is not 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.CreateBackupMetadata; + + /** + * Decodes a CreateBackupMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupMetadata + * @throws {Error} If the payload 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.CreateBackupMetadata; + + /** + * Verifies a CreateBackupMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateBackupMetadata; + + /** + * Creates a plain object from a CreateBackupMetadata message. Also converts values to other types if specified. + * @param message CreateBackupMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateBackupMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupRequest. */ + interface IUpdateBackupRequest { + + /** UpdateBackupRequest backup */ + backup?: (google.bigtable.admin.v2.IBackup|null); + + /** UpdateBackupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateBackupRequest. */ + class UpdateBackupRequest implements IUpdateBackupRequest { + + /** + * Constructs a new UpdateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateBackupRequest); + + /** UpdateBackupRequest backup. */ + public backup?: (google.bigtable.admin.v2.IBackup|null); + + /** UpdateBackupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateBackupRequest): google.bigtable.admin.v2.UpdateBackupRequest; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not 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.UpdateBackupRequest; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupRequest + * @throws {Error} If the payload 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.UpdateBackupRequest; + + /** + * Verifies an UpdateBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateBackupRequest; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @param message UpdateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { + + /** GetBackupRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { + + /** + * Constructs a new GetBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetBackupRequest); + + /** GetBackupRequest name. */ + public name: string; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetBackupRequest): google.bigtable.admin.v2.GetBackupRequest; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupRequest + * @throws {Error} If the payload is not 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.GetBackupRequest; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupRequest + * @throws {Error} If the payload 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.GetBackupRequest; + + /** + * Verifies a GetBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetBackupRequest; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { + + /** DeleteBackupRequest name */ + name?: (string|null); + } + + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { + + /** + * Constructs a new DeleteBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteBackupRequest); + + /** DeleteBackupRequest name. */ + public name: string; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteBackupRequest): google.bigtable.admin.v2.DeleteBackupRequest; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not 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.DeleteBackupRequest; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupRequest + * @throws {Error} If the payload 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.DeleteBackupRequest; + + /** + * Verifies a DeleteBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteBackupRequest; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { + + /** ListBackupsRequest parent */ + parent?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { + + /** + * Constructs a new ListBackupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListBackupsRequest); + + /** ListBackupsRequest parent. */ + public parent: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; + + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListBackupsRequest): google.bigtable.admin.v2.ListBackupsRequest; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsRequest + * @throws {Error} If the payload is not 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.ListBackupsRequest; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsRequest + * @throws {Error} If the payload 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.ListBackupsRequest; + + /** + * Verifies a ListBackupsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListBackupsRequest; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { + + /** ListBackupsResponse backups */ + backups?: (google.bigtable.admin.v2.IBackup[]|null); + + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { + + /** + * Constructs a new ListBackupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListBackupsResponse); + + /** ListBackupsResponse backups. */ + public backups: google.bigtable.admin.v2.IBackup[]; + + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListBackupsResponse): google.bigtable.admin.v2.ListBackupsResponse; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsResponse + * @throws {Error} If the payload is not 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.ListBackupsResponse; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsResponse + * @throws {Error} If the payload 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.ListBackupsResponse; + + /** + * Verifies a ListBackupsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListBackupsResponse; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CopyBackupRequest. */ + interface ICopyBackupRequest { + + /** CopyBackupRequest parent */ + parent?: (string|null); + + /** CopyBackupRequest backupId */ + backupId?: (string|null); + + /** CopyBackupRequest sourceBackup */ + sourceBackup?: (string|null); + + /** CopyBackupRequest expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CopyBackupRequest. */ + class CopyBackupRequest implements ICopyBackupRequest { + + /** + * Constructs a new CopyBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICopyBackupRequest); + + /** CopyBackupRequest parent. */ + public parent: string; + + /** CopyBackupRequest backupId. */ + public backupId: string; + + /** CopyBackupRequest sourceBackup. */ + public sourceBackup: string; + + /** CopyBackupRequest expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CopyBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CopyBackupRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICopyBackupRequest): google.bigtable.admin.v2.CopyBackupRequest; + + /** + * Encodes the specified CopyBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.CopyBackupRequest.verify|verify} messages. + * @param message CopyBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICopyBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CopyBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CopyBackupRequest.verify|verify} messages. + * @param message CopyBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICopyBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CopyBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CopyBackupRequest + * @throws {Error} If the payload is not 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.CopyBackupRequest; + + /** + * Decodes a CopyBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CopyBackupRequest + * @throws {Error} If the payload 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.CopyBackupRequest; + + /** + * Verifies a CopyBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CopyBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CopyBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CopyBackupRequest; + + /** + * Creates a plain object from a CopyBackupRequest message. Also converts values to other types if specified. + * @param message CopyBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CopyBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CopyBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopyBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CopyBackupMetadata. */ + interface ICopyBackupMetadata { + + /** CopyBackupMetadata name */ + name?: (string|null); + + /** CopyBackupMetadata sourceBackupInfo */ + sourceBackupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); + + /** CopyBackupMetadata progress */ + progress?: (google.bigtable.admin.v2.IOperationProgress|null); + } + + /** Represents a CopyBackupMetadata. */ + class CopyBackupMetadata implements ICopyBackupMetadata { + + /** + * Constructs a new CopyBackupMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICopyBackupMetadata); + + /** CopyBackupMetadata name. */ + public name: string; + + /** CopyBackupMetadata sourceBackupInfo. */ + public sourceBackupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); + + /** CopyBackupMetadata progress. */ + public progress?: (google.bigtable.admin.v2.IOperationProgress|null); + + /** + * Creates a new CopyBackupMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CopyBackupMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICopyBackupMetadata): google.bigtable.admin.v2.CopyBackupMetadata; + + /** + * Encodes the specified CopyBackupMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CopyBackupMetadata.verify|verify} messages. + * @param message CopyBackupMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICopyBackupMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CopyBackupMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CopyBackupMetadata.verify|verify} messages. + * @param message CopyBackupMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICopyBackupMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CopyBackupMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CopyBackupMetadata + * @throws {Error} If the payload is not 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.CopyBackupMetadata; + + /** + * Decodes a CopyBackupMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CopyBackupMetadata + * @throws {Error} If the payload 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.CopyBackupMetadata; + + /** + * Verifies a CopyBackupMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CopyBackupMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CopyBackupMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CopyBackupMetadata; + + /** + * Creates a plain object from a CopyBackupMetadata message. Also converts values to other types if specified. + * @param message CopyBackupMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CopyBackupMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CopyBackupMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopyBackupMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAuthorizedViewRequest. */ + interface ICreateAuthorizedViewRequest { + + /** CreateAuthorizedViewRequest parent */ + parent?: (string|null); + + /** CreateAuthorizedViewRequest authorizedViewId */ + authorizedViewId?: (string|null); + + /** CreateAuthorizedViewRequest authorizedView */ + authorizedView?: (google.bigtable.admin.v2.IAuthorizedView|null); + } + + /** Represents a CreateAuthorizedViewRequest. */ + class CreateAuthorizedViewRequest implements ICreateAuthorizedViewRequest { + + /** + * Constructs a new CreateAuthorizedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateAuthorizedViewRequest); + + /** CreateAuthorizedViewRequest parent. */ + public parent: string; + + /** CreateAuthorizedViewRequest authorizedViewId. */ + public authorizedViewId: string; + + /** CreateAuthorizedViewRequest authorizedView. */ + public authorizedView?: (google.bigtable.admin.v2.IAuthorizedView|null); + + /** + * Creates a new CreateAuthorizedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAuthorizedViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateAuthorizedViewRequest): google.bigtable.admin.v2.CreateAuthorizedViewRequest; + + /** + * Encodes the specified CreateAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify|verify} messages. + * @param message CreateAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify|verify} messages. + * @param message CreateAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAuthorizedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAuthorizedViewRequest + * @throws {Error} If the payload is not 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.CreateAuthorizedViewRequest; + + /** + * Decodes a CreateAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAuthorizedViewRequest + * @throws {Error} If the payload 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.CreateAuthorizedViewRequest; + + /** + * Verifies a CreateAuthorizedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAuthorizedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateAuthorizedViewRequest; + + /** + * Creates a plain object from a CreateAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message CreateAuthorizedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAuthorizedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAuthorizedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAuthorizedViewMetadata. */ + interface ICreateAuthorizedViewMetadata { + + /** CreateAuthorizedViewMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ICreateAuthorizedViewRequest|null); + + /** CreateAuthorizedViewMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateAuthorizedViewMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateAuthorizedViewMetadata. */ + class CreateAuthorizedViewMetadata implements ICreateAuthorizedViewMetadata { + + /** + * Constructs a new CreateAuthorizedViewMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateAuthorizedViewMetadata); + + /** CreateAuthorizedViewMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ICreateAuthorizedViewRequest|null); + + /** CreateAuthorizedViewMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateAuthorizedViewMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateAuthorizedViewMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAuthorizedViewMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateAuthorizedViewMetadata): google.bigtable.admin.v2.CreateAuthorizedViewMetadata; + + /** + * Encodes the specified CreateAuthorizedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewMetadata.verify|verify} messages. + * @param message CreateAuthorizedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateAuthorizedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAuthorizedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewMetadata.verify|verify} messages. + * @param message CreateAuthorizedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateAuthorizedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAuthorizedViewMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAuthorizedViewMetadata + * @throws {Error} If the payload is not 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.CreateAuthorizedViewMetadata; + + /** + * Decodes a CreateAuthorizedViewMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAuthorizedViewMetadata + * @throws {Error} If the payload 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.CreateAuthorizedViewMetadata; + + /** + * Verifies a CreateAuthorizedViewMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAuthorizedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAuthorizedViewMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateAuthorizedViewMetadata; + + /** + * Creates a plain object from a CreateAuthorizedViewMetadata message. Also converts values to other types if specified. + * @param message CreateAuthorizedViewMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateAuthorizedViewMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAuthorizedViewMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAuthorizedViewMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAuthorizedViewsRequest. */ + interface IListAuthorizedViewsRequest { + + /** ListAuthorizedViewsRequest parent */ + parent?: (string|null); + + /** ListAuthorizedViewsRequest pageSize */ + pageSize?: (number|null); + + /** ListAuthorizedViewsRequest pageToken */ + pageToken?: (string|null); + + /** ListAuthorizedViewsRequest view */ + view?: (google.bigtable.admin.v2.AuthorizedView.ResponseView|keyof typeof google.bigtable.admin.v2.AuthorizedView.ResponseView|null); + } + + /** Represents a ListAuthorizedViewsRequest. */ + class ListAuthorizedViewsRequest implements IListAuthorizedViewsRequest { + + /** + * Constructs a new ListAuthorizedViewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListAuthorizedViewsRequest); + + /** ListAuthorizedViewsRequest parent. */ + public parent: string; + + /** ListAuthorizedViewsRequest pageSize. */ + public pageSize: number; + + /** ListAuthorizedViewsRequest pageToken. */ + public pageToken: string; + + /** ListAuthorizedViewsRequest view. */ + public view: (google.bigtable.admin.v2.AuthorizedView.ResponseView|keyof typeof google.bigtable.admin.v2.AuthorizedView.ResponseView); + + /** + * Creates a new ListAuthorizedViewsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAuthorizedViewsRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListAuthorizedViewsRequest): google.bigtable.admin.v2.ListAuthorizedViewsRequest; + + /** + * Encodes the specified ListAuthorizedViewsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsRequest.verify|verify} messages. + * @param message ListAuthorizedViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListAuthorizedViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAuthorizedViewsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsRequest.verify|verify} messages. + * @param message ListAuthorizedViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListAuthorizedViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAuthorizedViewsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAuthorizedViewsRequest + * @throws {Error} If the payload is not 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.ListAuthorizedViewsRequest; + + /** + * Decodes a ListAuthorizedViewsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAuthorizedViewsRequest + * @throws {Error} If the payload 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.ListAuthorizedViewsRequest; + + /** + * Verifies a ListAuthorizedViewsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAuthorizedViewsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAuthorizedViewsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListAuthorizedViewsRequest; + + /** + * Creates a plain object from a ListAuthorizedViewsRequest message. Also converts values to other types if specified. + * @param message ListAuthorizedViewsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListAuthorizedViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAuthorizedViewsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAuthorizedViewsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAuthorizedViewsResponse. */ + interface IListAuthorizedViewsResponse { + + /** ListAuthorizedViewsResponse authorizedViews */ + authorizedViews?: (google.bigtable.admin.v2.IAuthorizedView[]|null); + + /** ListAuthorizedViewsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAuthorizedViewsResponse. */ + class ListAuthorizedViewsResponse implements IListAuthorizedViewsResponse { + + /** + * Constructs a new ListAuthorizedViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListAuthorizedViewsResponse); + + /** ListAuthorizedViewsResponse authorizedViews. */ + public authorizedViews: google.bigtable.admin.v2.IAuthorizedView[]; + + /** ListAuthorizedViewsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAuthorizedViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAuthorizedViewsResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListAuthorizedViewsResponse): google.bigtable.admin.v2.ListAuthorizedViewsResponse; + + /** + * Encodes the specified ListAuthorizedViewsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsResponse.verify|verify} messages. + * @param message ListAuthorizedViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListAuthorizedViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAuthorizedViewsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsResponse.verify|verify} messages. + * @param message ListAuthorizedViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListAuthorizedViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAuthorizedViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAuthorizedViewsResponse + * @throws {Error} If the payload is not 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.ListAuthorizedViewsResponse; + + /** + * Decodes a ListAuthorizedViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAuthorizedViewsResponse + * @throws {Error} If the payload 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.ListAuthorizedViewsResponse; + + /** + * Verifies a ListAuthorizedViewsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAuthorizedViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAuthorizedViewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListAuthorizedViewsResponse; + + /** + * Creates a plain object from a ListAuthorizedViewsResponse message. Also converts values to other types if specified. + * @param message ListAuthorizedViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListAuthorizedViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAuthorizedViewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAuthorizedViewsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAuthorizedViewRequest. */ + interface IGetAuthorizedViewRequest { + + /** GetAuthorizedViewRequest name */ + name?: (string|null); + + /** GetAuthorizedViewRequest view */ + view?: (google.bigtable.admin.v2.AuthorizedView.ResponseView|keyof typeof google.bigtable.admin.v2.AuthorizedView.ResponseView|null); + } + + /** Represents a GetAuthorizedViewRequest. */ + class GetAuthorizedViewRequest implements IGetAuthorizedViewRequest { + + /** + * Constructs a new GetAuthorizedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetAuthorizedViewRequest); + + /** GetAuthorizedViewRequest name. */ + public name: string; + + /** GetAuthorizedViewRequest view. */ + public view: (google.bigtable.admin.v2.AuthorizedView.ResponseView|keyof typeof google.bigtable.admin.v2.AuthorizedView.ResponseView); + + /** + * Creates a new GetAuthorizedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAuthorizedViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetAuthorizedViewRequest): google.bigtable.admin.v2.GetAuthorizedViewRequest; + + /** + * Encodes the specified GetAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetAuthorizedViewRequest.verify|verify} messages. + * @param message GetAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetAuthorizedViewRequest.verify|verify} messages. + * @param message GetAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAuthorizedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAuthorizedViewRequest + * @throws {Error} If the payload is not 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.GetAuthorizedViewRequest; + + /** + * Decodes a GetAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAuthorizedViewRequest + * @throws {Error} If the payload 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.GetAuthorizedViewRequest; + + /** + * Verifies a GetAuthorizedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAuthorizedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetAuthorizedViewRequest; + + /** + * Creates a plain object from a GetAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message GetAuthorizedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAuthorizedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAuthorizedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAuthorizedViewRequest. */ + interface IUpdateAuthorizedViewRequest { + + /** UpdateAuthorizedViewRequest authorizedView */ + authorizedView?: (google.bigtable.admin.v2.IAuthorizedView|null); + + /** UpdateAuthorizedViewRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAuthorizedViewRequest ignoreWarnings */ + ignoreWarnings?: (boolean|null); + } + + /** Represents an UpdateAuthorizedViewRequest. */ + class UpdateAuthorizedViewRequest implements IUpdateAuthorizedViewRequest { + + /** + * Constructs a new UpdateAuthorizedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest); + + /** UpdateAuthorizedViewRequest authorizedView. */ + public authorizedView?: (google.bigtable.admin.v2.IAuthorizedView|null); + + /** UpdateAuthorizedViewRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAuthorizedViewRequest ignoreWarnings. */ + public ignoreWarnings: boolean; + + /** + * Creates a new UpdateAuthorizedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAuthorizedViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest): google.bigtable.admin.v2.UpdateAuthorizedViewRequest; + + /** + * Encodes the specified UpdateAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify|verify} messages. + * @param message UpdateAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify|verify} messages. + * @param message UpdateAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAuthorizedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAuthorizedViewRequest + * @throws {Error} If the payload is not 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.UpdateAuthorizedViewRequest; + + /** + * Decodes an UpdateAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAuthorizedViewRequest + * @throws {Error} If the payload 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.UpdateAuthorizedViewRequest; + + /** + * Verifies an UpdateAuthorizedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAuthorizedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateAuthorizedViewRequest; + + /** + * Creates a plain object from an UpdateAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message UpdateAuthorizedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAuthorizedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAuthorizedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAuthorizedViewMetadata. */ + interface IUpdateAuthorizedViewMetadata { + + /** UpdateAuthorizedViewMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.IUpdateAuthorizedViewRequest|null); + + /** UpdateAuthorizedViewMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** UpdateAuthorizedViewMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateAuthorizedViewMetadata. */ + class UpdateAuthorizedViewMetadata implements IUpdateAuthorizedViewMetadata { + + /** + * Constructs a new UpdateAuthorizedViewMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata); + + /** UpdateAuthorizedViewMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.IUpdateAuthorizedViewRequest|null); + + /** UpdateAuthorizedViewMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** UpdateAuthorizedViewMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateAuthorizedViewMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAuthorizedViewMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata): google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; + + /** + * Encodes the specified UpdateAuthorizedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.verify|verify} messages. + * @param message UpdateAuthorizedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAuthorizedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.verify|verify} messages. + * @param message UpdateAuthorizedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAuthorizedViewMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAuthorizedViewMetadata + * @throws {Error} If the payload is not 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.UpdateAuthorizedViewMetadata; + + /** + * Decodes an UpdateAuthorizedViewMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAuthorizedViewMetadata + * @throws {Error} If the payload 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.UpdateAuthorizedViewMetadata; + + /** + * Verifies an UpdateAuthorizedViewMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAuthorizedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAuthorizedViewMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; + + /** + * Creates a plain object from an UpdateAuthorizedViewMetadata message. Also converts values to other types if specified. + * @param message UpdateAuthorizedViewMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateAuthorizedViewMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAuthorizedViewMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAuthorizedViewMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAuthorizedViewRequest. */ + interface IDeleteAuthorizedViewRequest { + + /** DeleteAuthorizedViewRequest name */ + name?: (string|null); + + /** DeleteAuthorizedViewRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteAuthorizedViewRequest. */ + class DeleteAuthorizedViewRequest implements IDeleteAuthorizedViewRequest { + + /** + * Constructs a new DeleteAuthorizedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest); + + /** DeleteAuthorizedViewRequest name. */ + public name: string; + + /** DeleteAuthorizedViewRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteAuthorizedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAuthorizedViewRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest): google.bigtable.admin.v2.DeleteAuthorizedViewRequest; + + /** + * Encodes the specified DeleteAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteAuthorizedViewRequest.verify|verify} messages. + * @param message DeleteAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteAuthorizedViewRequest.verify|verify} messages. + * @param message DeleteAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAuthorizedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAuthorizedViewRequest + * @throws {Error} If the payload is not 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.DeleteAuthorizedViewRequest; + + /** + * Decodes a DeleteAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAuthorizedViewRequest + * @throws {Error} If the payload 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.DeleteAuthorizedViewRequest; + + /** + * Verifies a DeleteAuthorizedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAuthorizedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteAuthorizedViewRequest; + + /** + * Creates a plain object from a DeleteAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message DeleteAuthorizedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAuthorizedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAuthorizedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSchemaBundleRequest. */ + interface ICreateSchemaBundleRequest { + + /** CreateSchemaBundleRequest parent */ + parent?: (string|null); + + /** CreateSchemaBundleRequest schemaBundleId */ + schemaBundleId?: (string|null); + + /** CreateSchemaBundleRequest schemaBundle */ + schemaBundle?: (google.bigtable.admin.v2.ISchemaBundle|null); + } + + /** Represents a CreateSchemaBundleRequest. */ + class CreateSchemaBundleRequest implements ICreateSchemaBundleRequest { + + /** + * Constructs a new CreateSchemaBundleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateSchemaBundleRequest); + + /** CreateSchemaBundleRequest parent. */ + public parent: string; + + /** CreateSchemaBundleRequest schemaBundleId. */ + public schemaBundleId: string; + + /** CreateSchemaBundleRequest schemaBundle. */ + public schemaBundle?: (google.bigtable.admin.v2.ISchemaBundle|null); + + /** + * Creates a new CreateSchemaBundleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSchemaBundleRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateSchemaBundleRequest): google.bigtable.admin.v2.CreateSchemaBundleRequest; + + /** + * Encodes the specified CreateSchemaBundleRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateSchemaBundleRequest.verify|verify} messages. + * @param message CreateSchemaBundleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateSchemaBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSchemaBundleRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateSchemaBundleRequest.verify|verify} messages. + * @param message CreateSchemaBundleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateSchemaBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSchemaBundleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSchemaBundleRequest + * @throws {Error} If the payload is not 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.CreateSchemaBundleRequest; + + /** + * Decodes a CreateSchemaBundleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSchemaBundleRequest + * @throws {Error} If the payload 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.CreateSchemaBundleRequest; + + /** + * Verifies a CreateSchemaBundleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateSchemaBundleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSchemaBundleRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateSchemaBundleRequest; + + /** + * Creates a plain object from a CreateSchemaBundleRequest message. Also converts values to other types if specified. + * @param message CreateSchemaBundleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateSchemaBundleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSchemaBundleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSchemaBundleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSchemaBundleMetadata. */ + interface ICreateSchemaBundleMetadata { + + /** CreateSchemaBundleMetadata name */ + name?: (string|null); + + /** CreateSchemaBundleMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** CreateSchemaBundleMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateSchemaBundleMetadata. */ + class CreateSchemaBundleMetadata implements ICreateSchemaBundleMetadata { + + /** + * Constructs a new CreateSchemaBundleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ICreateSchemaBundleMetadata); + + /** CreateSchemaBundleMetadata name. */ + public name: string; + + /** CreateSchemaBundleMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** CreateSchemaBundleMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateSchemaBundleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSchemaBundleMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.ICreateSchemaBundleMetadata): google.bigtable.admin.v2.CreateSchemaBundleMetadata; + + /** + * Encodes the specified CreateSchemaBundleMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateSchemaBundleMetadata.verify|verify} messages. + * @param message CreateSchemaBundleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICreateSchemaBundleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSchemaBundleMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateSchemaBundleMetadata.verify|verify} messages. + * @param message CreateSchemaBundleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateSchemaBundleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSchemaBundleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSchemaBundleMetadata + * @throws {Error} If the payload is not 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.CreateSchemaBundleMetadata; + + /** + * Decodes a CreateSchemaBundleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSchemaBundleMetadata + * @throws {Error} If the payload 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.CreateSchemaBundleMetadata; + + /** + * Verifies a CreateSchemaBundleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateSchemaBundleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSchemaBundleMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateSchemaBundleMetadata; + + /** + * Creates a plain object from a CreateSchemaBundleMetadata message. Also converts values to other types if specified. + * @param message CreateSchemaBundleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CreateSchemaBundleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSchemaBundleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSchemaBundleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSchemaBundleRequest. */ + interface IUpdateSchemaBundleRequest { + + /** UpdateSchemaBundleRequest schemaBundle */ + schemaBundle?: (google.bigtable.admin.v2.ISchemaBundle|null); + + /** UpdateSchemaBundleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSchemaBundleRequest ignoreWarnings */ + ignoreWarnings?: (boolean|null); + } + + /** Represents an UpdateSchemaBundleRequest. */ + class UpdateSchemaBundleRequest implements IUpdateSchemaBundleRequest { + + /** + * Constructs a new UpdateSchemaBundleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateSchemaBundleRequest); + + /** UpdateSchemaBundleRequest schemaBundle. */ + public schemaBundle?: (google.bigtable.admin.v2.ISchemaBundle|null); + + /** UpdateSchemaBundleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSchemaBundleRequest ignoreWarnings. */ + public ignoreWarnings: boolean; + + /** + * Creates a new UpdateSchemaBundleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSchemaBundleRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateSchemaBundleRequest): google.bigtable.admin.v2.UpdateSchemaBundleRequest; + + /** + * Encodes the specified UpdateSchemaBundleRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateSchemaBundleRequest.verify|verify} messages. + * @param message UpdateSchemaBundleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateSchemaBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSchemaBundleRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateSchemaBundleRequest.verify|verify} messages. + * @param message UpdateSchemaBundleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateSchemaBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSchemaBundleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSchemaBundleRequest + * @throws {Error} If the payload is not 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.UpdateSchemaBundleRequest; + + /** + * Decodes an UpdateSchemaBundleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSchemaBundleRequest + * @throws {Error} If the payload 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.UpdateSchemaBundleRequest; + + /** + * Verifies an UpdateSchemaBundleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSchemaBundleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSchemaBundleRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateSchemaBundleRequest; + + /** + * Creates a plain object from an UpdateSchemaBundleRequest message. Also converts values to other types if specified. + * @param message UpdateSchemaBundleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateSchemaBundleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSchemaBundleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSchemaBundleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSchemaBundleMetadata. */ + interface IUpdateSchemaBundleMetadata { + + /** UpdateSchemaBundleMetadata name */ + name?: (string|null); + + /** UpdateSchemaBundleMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UpdateSchemaBundleMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateSchemaBundleMetadata. */ + class UpdateSchemaBundleMetadata implements IUpdateSchemaBundleMetadata { + + /** + * Constructs a new UpdateSchemaBundleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateSchemaBundleMetadata); + + /** UpdateSchemaBundleMetadata name. */ + public name: string; + + /** UpdateSchemaBundleMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UpdateSchemaBundleMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateSchemaBundleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSchemaBundleMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateSchemaBundleMetadata): google.bigtable.admin.v2.UpdateSchemaBundleMetadata; + + /** + * Encodes the specified UpdateSchemaBundleMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateSchemaBundleMetadata.verify|verify} messages. + * @param message UpdateSchemaBundleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateSchemaBundleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSchemaBundleMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateSchemaBundleMetadata.verify|verify} messages. + * @param message UpdateSchemaBundleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateSchemaBundleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSchemaBundleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSchemaBundleMetadata + * @throws {Error} If the payload is not 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.UpdateSchemaBundleMetadata; + + /** + * Decodes an UpdateSchemaBundleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSchemaBundleMetadata + * @throws {Error} If the payload 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.UpdateSchemaBundleMetadata; + + /** + * Verifies an UpdateSchemaBundleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSchemaBundleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSchemaBundleMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateSchemaBundleMetadata; + + /** + * Creates a plain object from an UpdateSchemaBundleMetadata message. Also converts values to other types if specified. + * @param message UpdateSchemaBundleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateSchemaBundleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSchemaBundleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSchemaBundleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSchemaBundleRequest. */ + interface IGetSchemaBundleRequest { + + /** GetSchemaBundleRequest name */ + name?: (string|null); + } + + /** Represents a GetSchemaBundleRequest. */ + class GetSchemaBundleRequest implements IGetSchemaBundleRequest { + + /** + * Constructs a new GetSchemaBundleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetSchemaBundleRequest); + + /** GetSchemaBundleRequest name. */ + public name: string; + + /** + * Creates a new GetSchemaBundleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSchemaBundleRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IGetSchemaBundleRequest): google.bigtable.admin.v2.GetSchemaBundleRequest; + + /** + * Encodes the specified GetSchemaBundleRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetSchemaBundleRequest.verify|verify} messages. + * @param message GetSchemaBundleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGetSchemaBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSchemaBundleRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetSchemaBundleRequest.verify|verify} messages. + * @param message GetSchemaBundleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGetSchemaBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSchemaBundleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSchemaBundleRequest + * @throws {Error} If the payload is not 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.GetSchemaBundleRequest; + + /** + * Decodes a GetSchemaBundleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSchemaBundleRequest + * @throws {Error} If the payload 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.GetSchemaBundleRequest; + + /** + * Verifies a GetSchemaBundleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSchemaBundleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSchemaBundleRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetSchemaBundleRequest; + + /** + * Creates a plain object from a GetSchemaBundleRequest message. Also converts values to other types if specified. + * @param message GetSchemaBundleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GetSchemaBundleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSchemaBundleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSchemaBundleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSchemaBundlesRequest. */ + interface IListSchemaBundlesRequest { + + /** ListSchemaBundlesRequest parent */ + parent?: (string|null); + + /** ListSchemaBundlesRequest pageSize */ + pageSize?: (number|null); + + /** ListSchemaBundlesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListSchemaBundlesRequest. */ + class ListSchemaBundlesRequest implements IListSchemaBundlesRequest { + + /** + * Constructs a new ListSchemaBundlesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListSchemaBundlesRequest); + + /** ListSchemaBundlesRequest parent. */ + public parent: string; + + /** ListSchemaBundlesRequest pageSize. */ + public pageSize: number; + + /** ListSchemaBundlesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListSchemaBundlesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSchemaBundlesRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IListSchemaBundlesRequest): google.bigtable.admin.v2.ListSchemaBundlesRequest; + + /** + * Encodes the specified ListSchemaBundlesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListSchemaBundlesRequest.verify|verify} messages. + * @param message ListSchemaBundlesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListSchemaBundlesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSchemaBundlesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListSchemaBundlesRequest.verify|verify} messages. + * @param message ListSchemaBundlesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListSchemaBundlesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSchemaBundlesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSchemaBundlesRequest + * @throws {Error} If the payload is not 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.ListSchemaBundlesRequest; + + /** + * Decodes a ListSchemaBundlesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSchemaBundlesRequest + * @throws {Error} If the payload 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.ListSchemaBundlesRequest; + + /** + * Verifies a ListSchemaBundlesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSchemaBundlesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSchemaBundlesRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListSchemaBundlesRequest; + + /** + * Creates a plain object from a ListSchemaBundlesRequest message. Also converts values to other types if specified. + * @param message ListSchemaBundlesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListSchemaBundlesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSchemaBundlesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSchemaBundlesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSchemaBundlesResponse. */ + interface IListSchemaBundlesResponse { + + /** ListSchemaBundlesResponse schemaBundles */ + schemaBundles?: (google.bigtable.admin.v2.ISchemaBundle[]|null); + + /** ListSchemaBundlesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSchemaBundlesResponse. */ + class ListSchemaBundlesResponse implements IListSchemaBundlesResponse { + + /** + * Constructs a new ListSchemaBundlesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListSchemaBundlesResponse); + + /** ListSchemaBundlesResponse schemaBundles. */ + public schemaBundles: google.bigtable.admin.v2.ISchemaBundle[]; + + /** ListSchemaBundlesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSchemaBundlesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSchemaBundlesResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListSchemaBundlesResponse): google.bigtable.admin.v2.ListSchemaBundlesResponse; + + /** + * Encodes the specified ListSchemaBundlesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListSchemaBundlesResponse.verify|verify} messages. + * @param message ListSchemaBundlesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListSchemaBundlesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSchemaBundlesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListSchemaBundlesResponse.verify|verify} messages. + * @param message ListSchemaBundlesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListSchemaBundlesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSchemaBundlesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSchemaBundlesResponse + * @throws {Error} If the payload is not 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.ListSchemaBundlesResponse; + + /** + * Decodes a ListSchemaBundlesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSchemaBundlesResponse + * @throws {Error} If the payload 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.ListSchemaBundlesResponse; + + /** + * Verifies a ListSchemaBundlesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSchemaBundlesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSchemaBundlesResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListSchemaBundlesResponse; + + /** + * Creates a plain object from a ListSchemaBundlesResponse message. Also converts values to other types if specified. + * @param message ListSchemaBundlesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListSchemaBundlesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSchemaBundlesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSchemaBundlesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSchemaBundleRequest. */ + interface IDeleteSchemaBundleRequest { + + /** DeleteSchemaBundleRequest name */ + name?: (string|null); + + /** DeleteSchemaBundleRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteSchemaBundleRequest. */ + class DeleteSchemaBundleRequest implements IDeleteSchemaBundleRequest { + + /** + * Constructs a new DeleteSchemaBundleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IDeleteSchemaBundleRequest); + + /** DeleteSchemaBundleRequest name. */ + public name: string; + + /** DeleteSchemaBundleRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteSchemaBundleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSchemaBundleRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IDeleteSchemaBundleRequest): google.bigtable.admin.v2.DeleteSchemaBundleRequest; + + /** + * Encodes the specified DeleteSchemaBundleRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteSchemaBundleRequest.verify|verify} messages. + * @param message DeleteSchemaBundleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IDeleteSchemaBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSchemaBundleRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteSchemaBundleRequest.verify|verify} messages. + * @param message DeleteSchemaBundleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteSchemaBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSchemaBundleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSchemaBundleRequest + * @throws {Error} If the payload is not 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.DeleteSchemaBundleRequest; + + /** + * Decodes a DeleteSchemaBundleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSchemaBundleRequest + * @throws {Error} If the payload 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.DeleteSchemaBundleRequest; + + /** + * Verifies a DeleteSchemaBundleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSchemaBundleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSchemaBundleRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteSchemaBundleRequest; + + /** + * Creates a plain object from a DeleteSchemaBundleRequest message. Also converts values to other types if specified. + * @param message DeleteSchemaBundleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.DeleteSchemaBundleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSchemaBundleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSchemaBundleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreInfo. */ + interface IRestoreInfo { + + /** RestoreInfo sourceType */ + sourceType?: (google.bigtable.admin.v2.RestoreSourceType|keyof typeof google.bigtable.admin.v2.RestoreSourceType|null); + + /** RestoreInfo backupInfo */ + backupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); + } + + /** Represents a RestoreInfo. */ + class RestoreInfo implements IRestoreInfo { + + /** + * Constructs a new RestoreInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IRestoreInfo); + + /** RestoreInfo sourceType. */ + public sourceType: (google.bigtable.admin.v2.RestoreSourceType|keyof typeof google.bigtable.admin.v2.RestoreSourceType); + + /** RestoreInfo backupInfo. */ + public backupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); + + /** RestoreInfo sourceInfo. */ + public sourceInfo?: "backupInfo"; + + /** + * Creates a new RestoreInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreInfo instance + */ + public static create(properties?: google.bigtable.admin.v2.IRestoreInfo): google.bigtable.admin.v2.RestoreInfo; + + /** + * Encodes the specified RestoreInfo message. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * @param message RestoreInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IRestoreInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * @param message RestoreInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IRestoreInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreInfo + * @throws {Error} If the payload is not 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.RestoreInfo; + + /** + * Decodes a RestoreInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreInfo + * @throws {Error} If the payload 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.RestoreInfo; + + /** + * Verifies a RestoreInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.RestoreInfo; + + /** + * Creates a plain object from a RestoreInfo message. Also converts values to other types if specified. + * @param message RestoreInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.RestoreInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + 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 { + + /** Table name */ + name?: (string|null); + + /** Table clusterStates */ + clusterStates?: ({ [k: string]: google.bigtable.admin.v2.Table.IClusterState }|null); + + /** Table columnFamilies */ + columnFamilies?: ({ [k: string]: google.bigtable.admin.v2.IColumnFamily }|null); + + /** Table granularity */ + granularity?: (google.bigtable.admin.v2.Table.TimestampGranularity|keyof typeof google.bigtable.admin.v2.Table.TimestampGranularity|null); + + /** Table restoreInfo */ + restoreInfo?: (google.bigtable.admin.v2.IRestoreInfo|null); + + /** Table changeStreamConfig */ + changeStreamConfig?: (google.bigtable.admin.v2.IChangeStreamConfig|null); + + /** Table deletionProtection */ + deletionProtection?: (boolean|null); + + /** Table automatedBackupPolicy */ + automatedBackupPolicy?: (google.bigtable.admin.v2.Table.IAutomatedBackupPolicy|null); + + /** Table tieredStorageConfig */ + tieredStorageConfig?: (google.bigtable.admin.v2.ITieredStorageConfig|null); + + /** Table rowKeySchema */ + rowKeySchema?: (google.bigtable.admin.v2.Type.IStruct|null); + } + + /** Represents a Table. */ + class Table implements ITable { + + /** + * Constructs a new Table. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ITable); + + /** Table name. */ + public name: string; + + /** Table clusterStates. */ + public clusterStates: { [k: string]: google.bigtable.admin.v2.Table.IClusterState }; + + /** Table columnFamilies. */ + public columnFamilies: { [k: string]: google.bigtable.admin.v2.IColumnFamily }; + + /** Table granularity. */ + public granularity: (google.bigtable.admin.v2.Table.TimestampGranularity|keyof typeof google.bigtable.admin.v2.Table.TimestampGranularity); + + /** 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; + + /** Table automatedBackupPolicy. */ + public automatedBackupPolicy?: (google.bigtable.admin.v2.Table.IAutomatedBackupPolicy|null); + + /** Table tieredStorageConfig. */ + public tieredStorageConfig?: (google.bigtable.admin.v2.ITieredStorageConfig|null); + + /** Table rowKeySchema. */ + public rowKeySchema?: (google.bigtable.admin.v2.Type.IStruct|null); + + /** Table automatedBackupConfig. */ + public automatedBackupConfig?: "automatedBackupPolicy"; + + /** + * Creates a new Table instance using the specified properties. + * @param [properties] Properties to set + * @returns Table instance + */ + public static create(properties?: google.bigtable.admin.v2.ITable): google.bigtable.admin.v2.Table; + + /** + * Encodes the specified Table message. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. + * @param message Table message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Table message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. + * @param message Table message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Table message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Table + * @throws {Error} If the payload is not 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.Table; + + /** + * Decodes a Table message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Table + * @throws {Error} If the payload 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.Table; + + /** + * Verifies a Table message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Table message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Table + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Table; + + /** + * Creates a plain object from a Table message. Also converts values to other types if specified. + * @param message Table + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Table, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Table to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Table + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Table { + + /** Properties of a ClusterState. */ + interface IClusterState { + + /** ClusterState replicationState */ + replicationState?: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null); + + /** ClusterState encryptionInfo */ + encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo[]|null); + } + + /** Represents a ClusterState. */ + class ClusterState implements IClusterState { + + /** + * Constructs a new ClusterState. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Table.IClusterState); + + /** ClusterState replicationState. */ + public replicationState: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState); + + /** ClusterState encryptionInfo. */ + public encryptionInfo: google.bigtable.admin.v2.IEncryptionInfo[]; + + /** + * Creates a new ClusterState instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterState instance + */ + public static create(properties?: google.bigtable.admin.v2.Table.IClusterState): google.bigtable.admin.v2.Table.ClusterState; + + /** + * Encodes the specified ClusterState message. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. + * @param message ClusterState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Table.IClusterState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterState message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. + * @param message ClusterState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Table.IClusterState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterState + * @throws {Error} If the payload is not 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.Table.ClusterState; + + /** + * Decodes a ClusterState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterState + * @throws {Error} If the payload 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.Table.ClusterState; + + /** + * Verifies a ClusterState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterState + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Table.ClusterState; + + /** + * Creates a plain object from a ClusterState message. Also converts values to other types if specified. + * @param message ClusterState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Table.ClusterState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClusterState { + + /** ReplicationState enum. */ + enum ReplicationState { + STATE_NOT_KNOWN = 0, + INITIALIZING = 1, + PLANNED_MAINTENANCE = 2, + UNPLANNED_MAINTENANCE = 3, + READY = 4, + READY_OPTIMIZING = 5 + } + } + + /** TimestampGranularity enum. */ + enum TimestampGranularity { + TIMESTAMP_GRANULARITY_UNSPECIFIED = 0, + MILLIS = 1 + } + + /** View enum. */ + enum View { + VIEW_UNSPECIFIED = 0, + NAME_ONLY = 1, + SCHEMA_VIEW = 2, + REPLICATION_VIEW = 3, + ENCRYPTION_VIEW = 5, + FULL = 4 + } + + /** Properties of an AutomatedBackupPolicy. */ + interface IAutomatedBackupPolicy { + + /** AutomatedBackupPolicy retentionPeriod */ + retentionPeriod?: (google.protobuf.IDuration|null); + + /** AutomatedBackupPolicy frequency */ + frequency?: (google.protobuf.IDuration|null); + + /** AutomatedBackupPolicy locations */ + locations?: (string[]|null); + } + + /** Represents an AutomatedBackupPolicy. */ + class AutomatedBackupPolicy implements IAutomatedBackupPolicy { + + /** + * Constructs a new AutomatedBackupPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Table.IAutomatedBackupPolicy); + + /** AutomatedBackupPolicy retentionPeriod. */ + public retentionPeriod?: (google.protobuf.IDuration|null); + + /** AutomatedBackupPolicy frequency. */ + public frequency?: (google.protobuf.IDuration|null); + + /** AutomatedBackupPolicy locations. */ + public locations: string[]; + + /** + * Creates a new AutomatedBackupPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomatedBackupPolicy instance + */ + public static create(properties?: google.bigtable.admin.v2.Table.IAutomatedBackupPolicy): google.bigtable.admin.v2.Table.AutomatedBackupPolicy; + + /** + * Encodes the specified AutomatedBackupPolicy message. Does not implicitly {@link google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify|verify} messages. + * @param message AutomatedBackupPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Table.IAutomatedBackupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomatedBackupPolicy message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify|verify} messages. + * @param message AutomatedBackupPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Table.IAutomatedBackupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomatedBackupPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomatedBackupPolicy + * @throws {Error} If the payload is not 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.Table.AutomatedBackupPolicy; + + /** + * Decodes an AutomatedBackupPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomatedBackupPolicy + * @throws {Error} If the payload 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.Table.AutomatedBackupPolicy; + + /** + * Verifies an AutomatedBackupPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomatedBackupPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomatedBackupPolicy + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Table.AutomatedBackupPolicy; + + /** + * Creates a plain object from an AutomatedBackupPolicy message. Also converts values to other types if specified. + * @param message AutomatedBackupPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Table.AutomatedBackupPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomatedBackupPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomatedBackupPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AuthorizedView. */ + interface IAuthorizedView { + + /** AuthorizedView name */ + name?: (string|null); + + /** AuthorizedView subsetView */ + subsetView?: (google.bigtable.admin.v2.AuthorizedView.ISubsetView|null); + + /** AuthorizedView etag */ + etag?: (string|null); + + /** AuthorizedView deletionProtection */ + deletionProtection?: (boolean|null); + } + + /** Represents an AuthorizedView. */ + class AuthorizedView implements IAuthorizedView { + + /** + * Constructs a new AuthorizedView. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IAuthorizedView); + + /** AuthorizedView name. */ + public name: string; + + /** AuthorizedView subsetView. */ + public subsetView?: (google.bigtable.admin.v2.AuthorizedView.ISubsetView|null); + + /** AuthorizedView etag. */ + public etag: string; + + /** AuthorizedView deletionProtection. */ + public deletionProtection: boolean; + + /** AuthorizedView authorizedView. */ + public authorizedView?: "subsetView"; + + /** + * Creates a new AuthorizedView instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorizedView instance + */ + public static create(properties?: google.bigtable.admin.v2.IAuthorizedView): google.bigtable.admin.v2.AuthorizedView; + + /** + * Encodes the specified AuthorizedView message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.verify|verify} messages. + * @param message AuthorizedView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IAuthorizedView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthorizedView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.verify|verify} messages. + * @param message AuthorizedView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IAuthorizedView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthorizedView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorizedView + * @throws {Error} If the payload is not 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.AuthorizedView; + + /** + * Decodes an AuthorizedView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorizedView + * @throws {Error} If the payload 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.AuthorizedView; + + /** + * Verifies an AuthorizedView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuthorizedView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorizedView + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AuthorizedView; + + /** + * Creates a plain object from an AuthorizedView message. Also converts values to other types if specified. + * @param message AuthorizedView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AuthorizedView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthorizedView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthorizedView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuthorizedView { + + /** Properties of a FamilySubsets. */ + interface IFamilySubsets { + + /** FamilySubsets qualifiers */ + qualifiers?: (Uint8Array[]|null); + + /** FamilySubsets qualifierPrefixes */ + qualifierPrefixes?: (Uint8Array[]|null); + } + + /** Represents a FamilySubsets. */ + class FamilySubsets implements IFamilySubsets { + + /** + * Constructs a new FamilySubsets. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets); + + /** FamilySubsets qualifiers. */ + public qualifiers: Uint8Array[]; + + /** FamilySubsets qualifierPrefixes. */ + public qualifierPrefixes: Uint8Array[]; + + /** + * Creates a new FamilySubsets instance using the specified properties. + * @param [properties] Properties to set + * @returns FamilySubsets instance + */ + public static create(properties?: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets): google.bigtable.admin.v2.AuthorizedView.FamilySubsets; + + /** + * Encodes the specified FamilySubsets message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify|verify} messages. + * @param message FamilySubsets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FamilySubsets message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify|verify} messages. + * @param message FamilySubsets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FamilySubsets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FamilySubsets + * @throws {Error} If the payload is not 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.AuthorizedView.FamilySubsets; + + /** + * Decodes a FamilySubsets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FamilySubsets + * @throws {Error} If the payload 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.AuthorizedView.FamilySubsets; + + /** + * Verifies a FamilySubsets message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FamilySubsets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FamilySubsets + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AuthorizedView.FamilySubsets; + + /** + * Creates a plain object from a FamilySubsets message. Also converts values to other types if specified. + * @param message FamilySubsets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AuthorizedView.FamilySubsets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FamilySubsets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FamilySubsets + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubsetView. */ + interface ISubsetView { + + /** SubsetView rowPrefixes */ + rowPrefixes?: (Uint8Array[]|null); + + /** SubsetView familySubsets */ + familySubsets?: ({ [k: string]: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets }|null); + } + + /** Represents a SubsetView. */ + class SubsetView implements ISubsetView { + + /** + * Constructs a new SubsetView. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AuthorizedView.ISubsetView); + + /** SubsetView rowPrefixes. */ + public rowPrefixes: Uint8Array[]; + + /** SubsetView familySubsets. */ + public familySubsets: { [k: string]: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets }; + + /** + * Creates a new SubsetView instance using the specified properties. + * @param [properties] Properties to set + * @returns SubsetView instance + */ + public static create(properties?: google.bigtable.admin.v2.AuthorizedView.ISubsetView): google.bigtable.admin.v2.AuthorizedView.SubsetView; + + /** + * Encodes the specified SubsetView message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.SubsetView.verify|verify} messages. + * @param message SubsetView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AuthorizedView.ISubsetView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubsetView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.SubsetView.verify|verify} messages. + * @param message SubsetView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AuthorizedView.ISubsetView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubsetView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubsetView + * @throws {Error} If the payload is not 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.AuthorizedView.SubsetView; + + /** + * Decodes a SubsetView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubsetView + * @throws {Error} If the payload 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.AuthorizedView.SubsetView; + + /** + * Verifies a SubsetView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubsetView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubsetView + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AuthorizedView.SubsetView; + + /** + * Creates a plain object from a SubsetView message. Also converts values to other types if specified. + * @param message SubsetView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AuthorizedView.SubsetView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubsetView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubsetView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ResponseView enum. */ + enum ResponseView { + RESPONSE_VIEW_UNSPECIFIED = 0, + NAME_ONLY = 1, + BASIC = 2, + FULL = 3 + } + } + + /** Properties of a ColumnFamily. */ + interface IColumnFamily { + + /** ColumnFamily gcRule */ + gcRule?: (google.bigtable.admin.v2.IGcRule|null); + + /** ColumnFamily valueType */ + valueType?: (google.bigtable.admin.v2.IType|null); + } + + /** Represents a ColumnFamily. */ + class ColumnFamily implements IColumnFamily { + + /** + * Constructs a new ColumnFamily. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IColumnFamily); + + /** ColumnFamily gcRule. */ + public gcRule?: (google.bigtable.admin.v2.IGcRule|null); + + /** ColumnFamily valueType. */ + public valueType?: (google.bigtable.admin.v2.IType|null); + + /** + * Creates a new ColumnFamily instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnFamily instance + */ + public static create(properties?: google.bigtable.admin.v2.IColumnFamily): google.bigtable.admin.v2.ColumnFamily; + + /** + * Encodes the specified ColumnFamily message. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * @param message ColumnFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IColumnFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnFamily message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * @param message ColumnFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IColumnFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnFamily message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnFamily + * @throws {Error} If the payload is not 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.ColumnFamily; + + /** + * Decodes a ColumnFamily message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnFamily + * @throws {Error} If the payload 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.ColumnFamily; + + /** + * Verifies a ColumnFamily message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnFamily message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnFamily + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ColumnFamily; + + /** + * Creates a plain object from a ColumnFamily message. Also converts values to other types if specified. + * @param message ColumnFamily + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ColumnFamily, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnFamily to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnFamily + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcRule. */ + interface IGcRule { + + /** GcRule maxNumVersions */ + maxNumVersions?: (number|null); + + /** GcRule maxAge */ + maxAge?: (google.protobuf.IDuration|null); + + /** GcRule intersection */ + intersection?: (google.bigtable.admin.v2.GcRule.IIntersection|null); + + /** GcRule union */ + union?: (google.bigtable.admin.v2.GcRule.IUnion|null); + } + + /** Represents a GcRule. */ + class GcRule implements IGcRule { + + /** + * Constructs a new GcRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGcRule); + + /** GcRule maxNumVersions. */ + public maxNumVersions?: (number|null); + + /** GcRule maxAge. */ + public maxAge?: (google.protobuf.IDuration|null); + + /** GcRule intersection. */ + public intersection?: (google.bigtable.admin.v2.GcRule.IIntersection|null); + + /** GcRule union. */ + public union?: (google.bigtable.admin.v2.GcRule.IUnion|null); + + /** GcRule rule. */ + public rule?: ("maxNumVersions"|"maxAge"|"intersection"|"union"); + + /** + * Creates a new GcRule instance using the specified properties. + * @param [properties] Properties to set + * @returns GcRule instance + */ + public static create(properties?: google.bigtable.admin.v2.IGcRule): google.bigtable.admin.v2.GcRule; + + /** + * Encodes the specified GcRule message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * @param message GcRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGcRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcRule message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * @param message GcRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGcRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcRule + * @throws {Error} If the payload is not 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.GcRule; + + /** + * Decodes a GcRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcRule + * @throws {Error} If the payload 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.GcRule; + + /** + * Verifies a GcRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcRule + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule; + + /** + * Creates a plain object from a GcRule message. Also converts values to other types if specified. + * @param message GcRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GcRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GcRule { + + /** Properties of an Intersection. */ + interface IIntersection { + + /** Intersection rules */ + rules?: (google.bigtable.admin.v2.IGcRule[]|null); + } + + /** Represents an Intersection. */ + class Intersection implements IIntersection { + + /** + * Constructs a new Intersection. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.GcRule.IIntersection); + + /** Intersection rules. */ + public rules: google.bigtable.admin.v2.IGcRule[]; + + /** + * Creates a new Intersection instance using the specified properties. + * @param [properties] Properties to set + * @returns Intersection instance + */ + public static create(properties?: google.bigtable.admin.v2.GcRule.IIntersection): google.bigtable.admin.v2.GcRule.Intersection; + + /** + * Encodes the specified Intersection message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. + * @param message Intersection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.GcRule.IIntersection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Intersection message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. + * @param message Intersection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.GcRule.IIntersection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Intersection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Intersection + * @throws {Error} If the payload is not 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.GcRule.Intersection; + + /** + * Decodes an Intersection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Intersection + * @throws {Error} If the payload 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.GcRule.Intersection; + + /** + * Verifies an Intersection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Intersection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Intersection + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule.Intersection; + + /** + * Creates a plain object from an Intersection message. Also converts values to other types if specified. + * @param message Intersection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GcRule.Intersection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Intersection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Intersection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Union. */ + interface IUnion { + + /** Union rules */ + rules?: (google.bigtable.admin.v2.IGcRule[]|null); + } + + /** Represents an Union. */ + class Union implements IUnion { + + /** + * Constructs a new Union. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.GcRule.IUnion); + + /** Union rules. */ + public rules: google.bigtable.admin.v2.IGcRule[]; + + /** + * Creates a new Union instance using the specified properties. + * @param [properties] Properties to set + * @returns Union instance + */ + public static create(properties?: google.bigtable.admin.v2.GcRule.IUnion): google.bigtable.admin.v2.GcRule.Union; + + /** + * Encodes the specified Union message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. + * @param message Union message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.GcRule.IUnion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Union message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. + * @param message Union message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.GcRule.IUnion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Union message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Union + * @throws {Error} If the payload is not 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.GcRule.Union; + + /** + * Decodes an Union message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Union + * @throws {Error} If the payload 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.GcRule.Union; + + /** + * Verifies an Union message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Union message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Union + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule.Union; + + /** + * Creates a plain object from an Union message. Also converts values to other types if specified. + * @param message Union + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GcRule.Union, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Union to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Union + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EncryptionInfo. */ + interface IEncryptionInfo { + + /** EncryptionInfo encryptionType */ + encryptionType?: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null); + + /** EncryptionInfo encryptionStatus */ + encryptionStatus?: (google.rpc.IStatus|null); + + /** EncryptionInfo kmsKeyVersion */ + kmsKeyVersion?: (string|null); + } + + /** Represents an EncryptionInfo. */ + class EncryptionInfo implements IEncryptionInfo { + + /** + * Constructs a new EncryptionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IEncryptionInfo); + + /** EncryptionInfo encryptionType. */ + public encryptionType: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType); + + /** EncryptionInfo encryptionStatus. */ + public encryptionStatus?: (google.rpc.IStatus|null); + + /** EncryptionInfo kmsKeyVersion. */ + public kmsKeyVersion: string; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionInfo instance + */ + public static create(properties?: google.bigtable.admin.v2.IEncryptionInfo): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionInfo + * @throws {Error} If the payload is not 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.EncryptionInfo; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionInfo + * @throws {Error} If the payload 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.EncryptionInfo; + + /** + * Verifies an EncryptionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @param message EncryptionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.EncryptionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EncryptionInfo { + + /** EncryptionType enum. */ + enum EncryptionType { + ENCRYPTION_TYPE_UNSPECIFIED = 0, + GOOGLE_DEFAULT_ENCRYPTION = 1, + CUSTOMER_MANAGED_ENCRYPTION = 2 + } + } + + /** Properties of a Snapshot. */ + interface ISnapshot { + + /** Snapshot name */ + name?: (string|null); + + /** Snapshot sourceTable */ + sourceTable?: (google.bigtable.admin.v2.ITable|null); + + /** Snapshot dataSizeBytes */ + dataSizeBytes?: (number|Long|string|null); + + /** Snapshot createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot state */ + state?: (google.bigtable.admin.v2.Snapshot.State|keyof typeof google.bigtable.admin.v2.Snapshot.State|null); + + /** Snapshot description */ + description?: (string|null); + } + + /** Represents a Snapshot. */ + class Snapshot implements ISnapshot { + + /** + * Constructs a new Snapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ISnapshot); + + /** Snapshot name. */ + public name: string; + + /** Snapshot sourceTable. */ + public sourceTable?: (google.bigtable.admin.v2.ITable|null); + + /** Snapshot dataSizeBytes. */ + public dataSizeBytes: (number|Long|string); + + /** Snapshot createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot state. */ + public state: (google.bigtable.admin.v2.Snapshot.State|keyof typeof google.bigtable.admin.v2.Snapshot.State); + + /** Snapshot description. */ + public description: string; + + /** + * Creates a new Snapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns Snapshot instance + */ + public static create(properties?: google.bigtable.admin.v2.ISnapshot): google.bigtable.admin.v2.Snapshot; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * @param message Snapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * @param message Snapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Snapshot + * @throws {Error} If the payload is not 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.Snapshot; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Snapshot + * @throws {Error} If the payload 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.Snapshot; + + /** + * Verifies a Snapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Snapshot + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Snapshot; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @param message Snapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Snapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Snapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Snapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Snapshot { + + /** State enum. */ + enum State { + STATE_NOT_KNOWN = 0, + READY = 1, + CREATING = 2 + } + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup name */ + name?: (string|null); + + /** Backup sourceTable */ + sourceTable?: (string|null); + + /** Backup sourceBackup */ + sourceBackup?: (string|null); + + /** Backup expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Backup endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Backup sizeBytes */ + sizeBytes?: (number|Long|string|null); + + /** Backup state */ + state?: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State|null); + + /** Backup encryptionInfo */ + encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); + + /** Backup backupType */ + backupType?: (google.bigtable.admin.v2.Backup.BackupType|keyof typeof google.bigtable.admin.v2.Backup.BackupType|null); + + /** Backup hotToStandardTime */ + hotToStandardTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IBackup); + + /** Backup name. */ + public name: string; + + /** Backup sourceTable. */ + public sourceTable: string; + + /** Backup sourceBackup. */ + public sourceBackup: string; + + /** Backup expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Backup endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Backup sizeBytes. */ + public sizeBytes: (number|Long|string); + + /** Backup state. */ + public state: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State); + + /** Backup encryptionInfo. */ + public encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); + + /** Backup backupType. */ + public backupType: (google.bigtable.admin.v2.Backup.BackupType|keyof typeof google.bigtable.admin.v2.Backup.BackupType); + + /** Backup hotToStandardTime. */ + public hotToStandardTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.bigtable.admin.v2.IBackup): google.bigtable.admin.v2.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backup + * @throws {Error} If the payload is not 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.Backup; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backup + * @throws {Error} If the payload 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.Backup; + + /** + * Verifies a Backup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backup + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Backup; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Backup { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2 + } + + /** BackupType enum. */ + enum BackupType { + BACKUP_TYPE_UNSPECIFIED = 0, + STANDARD = 1, + HOT = 2 + } + } + + /** Properties of a BackupInfo. */ + interface IBackupInfo { + + /** BackupInfo backup */ + backup?: (string|null); + + /** BackupInfo startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** BackupInfo endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** BackupInfo sourceTable */ + sourceTable?: (string|null); + + /** BackupInfo sourceBackup */ + sourceBackup?: (string|null); + } + + /** Represents a BackupInfo. */ + class BackupInfo implements IBackupInfo { + + /** + * Constructs a new BackupInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IBackupInfo); + + /** BackupInfo backup. */ + public backup: string; + + /** BackupInfo startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** BackupInfo endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** BackupInfo sourceTable. */ + public sourceTable: string; + + /** BackupInfo sourceBackup. */ + public sourceBackup: string; + + /** + * Creates a new BackupInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupInfo instance + */ + public static create(properties?: google.bigtable.admin.v2.IBackupInfo): google.bigtable.admin.v2.BackupInfo; + + /** + * Encodes the specified BackupInfo message. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. + * @param message BackupInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IBackupInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. + * @param message BackupInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IBackupInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupInfo + * @throws {Error} If the payload is not 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.BackupInfo; + + /** + * Decodes a BackupInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupInfo + * @throws {Error} If the payload 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.BackupInfo; + + /** + * Verifies a BackupInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.BackupInfo; + + /** + * Creates a plain object from a BackupInfo message. Also converts values to other types if specified. + * @param message BackupInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.BackupInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RestoreSourceType enum. */ + enum RestoreSourceType { + RESTORE_SOURCE_TYPE_UNSPECIFIED = 0, + BACKUP = 1 + } + + /** Properties of a TieredStorageConfig. */ + interface ITieredStorageConfig { + + /** TieredStorageConfig infrequentAccess */ + infrequentAccess?: (google.bigtable.admin.v2.ITieredStorageRule|null); + } + + /** Represents a TieredStorageConfig. */ + class TieredStorageConfig implements ITieredStorageConfig { + + /** + * Constructs a new TieredStorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ITieredStorageConfig); + + /** TieredStorageConfig infrequentAccess. */ + public infrequentAccess?: (google.bigtable.admin.v2.ITieredStorageRule|null); + + /** + * Creates a new TieredStorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TieredStorageConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.ITieredStorageConfig): google.bigtable.admin.v2.TieredStorageConfig; + + /** + * Encodes the specified TieredStorageConfig message. Does not implicitly {@link google.bigtable.admin.v2.TieredStorageConfig.verify|verify} messages. + * @param message TieredStorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ITieredStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TieredStorageConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.TieredStorageConfig.verify|verify} messages. + * @param message TieredStorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ITieredStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TieredStorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TieredStorageConfig + * @throws {Error} If the payload is not 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.TieredStorageConfig; + + /** + * Decodes a TieredStorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TieredStorageConfig + * @throws {Error} If the payload 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.TieredStorageConfig; + + /** + * Verifies a TieredStorageConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TieredStorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TieredStorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.TieredStorageConfig; + + /** + * Creates a plain object from a TieredStorageConfig message. Also converts values to other types if specified. + * @param message TieredStorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.TieredStorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TieredStorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TieredStorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TieredStorageRule. */ + interface ITieredStorageRule { + + /** TieredStorageRule includeIfOlderThan */ + includeIfOlderThan?: (google.protobuf.IDuration|null); + } + + /** Represents a TieredStorageRule. */ + class TieredStorageRule implements ITieredStorageRule { + + /** + * Constructs a new TieredStorageRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ITieredStorageRule); + + /** TieredStorageRule includeIfOlderThan. */ + public includeIfOlderThan?: (google.protobuf.IDuration|null); + + /** TieredStorageRule rule. */ + public rule?: "includeIfOlderThan"; + + /** + * Creates a new TieredStorageRule instance using the specified properties. + * @param [properties] Properties to set + * @returns TieredStorageRule instance + */ + public static create(properties?: google.bigtable.admin.v2.ITieredStorageRule): google.bigtable.admin.v2.TieredStorageRule; + + /** + * Encodes the specified TieredStorageRule message. Does not implicitly {@link google.bigtable.admin.v2.TieredStorageRule.verify|verify} messages. + * @param message TieredStorageRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ITieredStorageRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TieredStorageRule message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.TieredStorageRule.verify|verify} messages. + * @param message TieredStorageRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ITieredStorageRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TieredStorageRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TieredStorageRule + * @throws {Error} If the payload is not 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.TieredStorageRule; + + /** + * Decodes a TieredStorageRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TieredStorageRule + * @throws {Error} If the payload 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.TieredStorageRule; + + /** + * Verifies a TieredStorageRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TieredStorageRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TieredStorageRule + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.TieredStorageRule; + + /** + * Creates a plain object from a TieredStorageRule message. Also converts values to other types if specified. + * @param message TieredStorageRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.TieredStorageRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TieredStorageRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TieredStorageRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtoSchema. */ + interface IProtoSchema { + + /** ProtoSchema protoDescriptors */ + protoDescriptors?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ProtoSchema. */ + class ProtoSchema implements IProtoSchema { + + /** + * Constructs a new ProtoSchema. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IProtoSchema); + + /** ProtoSchema protoDescriptors. */ + public protoDescriptors: (Uint8Array|Buffer|string); + + /** + * Creates a new ProtoSchema instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtoSchema instance + */ + public static create(properties?: google.bigtable.admin.v2.IProtoSchema): google.bigtable.admin.v2.ProtoSchema; + + /** + * Encodes the specified ProtoSchema message. Does not implicitly {@link google.bigtable.admin.v2.ProtoSchema.verify|verify} messages. + * @param message ProtoSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IProtoSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtoSchema message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ProtoSchema.verify|verify} messages. + * @param message ProtoSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IProtoSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtoSchema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtoSchema + * @throws {Error} If the payload is not 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.ProtoSchema; + + /** + * Decodes a ProtoSchema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtoSchema + * @throws {Error} If the payload 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.ProtoSchema; + + /** + * Verifies a ProtoSchema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtoSchema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtoSchema + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ProtoSchema; + + /** + * Creates a plain object from a ProtoSchema message. Also converts values to other types if specified. + * @param message ProtoSchema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ProtoSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtoSchema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtoSchema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaBundle. */ + interface ISchemaBundle { + + /** SchemaBundle name */ + name?: (string|null); + + /** SchemaBundle protoSchema */ + protoSchema?: (google.bigtable.admin.v2.IProtoSchema|null); + + /** SchemaBundle etag */ + etag?: (string|null); + } + + /** Represents a SchemaBundle. */ + class SchemaBundle implements ISchemaBundle { + + /** + * Constructs a new SchemaBundle. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ISchemaBundle); + + /** SchemaBundle name. */ + public name: string; + + /** SchemaBundle protoSchema. */ + public protoSchema?: (google.bigtable.admin.v2.IProtoSchema|null); + + /** SchemaBundle etag. */ + public etag: string; + + /** SchemaBundle type. */ + public type?: "protoSchema"; + + /** + * Creates a new SchemaBundle instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaBundle instance + */ + public static create(properties?: google.bigtable.admin.v2.ISchemaBundle): google.bigtable.admin.v2.SchemaBundle; + + /** + * Encodes the specified SchemaBundle message. Does not implicitly {@link google.bigtable.admin.v2.SchemaBundle.verify|verify} messages. + * @param message SchemaBundle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ISchemaBundle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaBundle message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.SchemaBundle.verify|verify} messages. + * @param message SchemaBundle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ISchemaBundle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaBundle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaBundle + * @throws {Error} If the payload is not 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.SchemaBundle; + + /** + * Decodes a SchemaBundle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaBundle + * @throws {Error} If the payload 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.SchemaBundle; + + /** + * Verifies a SchemaBundle message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaBundle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaBundle + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.SchemaBundle; + + /** + * Creates a plain object from a SchemaBundle message. Also converts values to other types if specified. + * @param message SchemaBundle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.SchemaBundle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaBundle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaBundle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Type. */ + interface IType { + + /** Type bytesType */ + bytesType?: (google.bigtable.admin.v2.Type.IBytes|null); + + /** Type stringType */ + stringType?: (google.bigtable.admin.v2.Type.IString|null); + + /** Type int64Type */ + int64Type?: (google.bigtable.admin.v2.Type.IInt64|null); + + /** Type float32Type */ + float32Type?: (google.bigtable.admin.v2.Type.IFloat32|null); + + /** Type float64Type */ + float64Type?: (google.bigtable.admin.v2.Type.IFloat64|null); + + /** Type boolType */ + boolType?: (google.bigtable.admin.v2.Type.IBool|null); + + /** Type timestampType */ + timestampType?: (google.bigtable.admin.v2.Type.ITimestamp|null); + + /** Type dateType */ + dateType?: (google.bigtable.admin.v2.Type.IDate|null); + + /** Type aggregateType */ + aggregateType?: (google.bigtable.admin.v2.Type.IAggregate|null); + + /** Type structType */ + structType?: (google.bigtable.admin.v2.Type.IStruct|null); + + /** Type arrayType */ + arrayType?: (google.bigtable.admin.v2.Type.IArray|null); + + /** Type mapType */ + mapType?: (google.bigtable.admin.v2.Type.IMap|null); + + /** Type protoType */ + protoType?: (google.bigtable.admin.v2.Type.IProto|null); + + /** Type enumType */ + enumType?: (google.bigtable.admin.v2.Type.IEnum|null); + } + + /** Represents a Type. */ + class Type implements IType { + + /** + * Constructs a new Type. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IType); + + /** Type bytesType. */ + public bytesType?: (google.bigtable.admin.v2.Type.IBytes|null); + + /** Type stringType. */ + public stringType?: (google.bigtable.admin.v2.Type.IString|null); + + /** Type int64Type. */ + public int64Type?: (google.bigtable.admin.v2.Type.IInt64|null); + + /** Type float32Type. */ + public float32Type?: (google.bigtable.admin.v2.Type.IFloat32|null); + + /** Type float64Type. */ + public float64Type?: (google.bigtable.admin.v2.Type.IFloat64|null); + + /** Type boolType. */ + public boolType?: (google.bigtable.admin.v2.Type.IBool|null); + + /** Type timestampType. */ + public timestampType?: (google.bigtable.admin.v2.Type.ITimestamp|null); + + /** Type dateType. */ + public dateType?: (google.bigtable.admin.v2.Type.IDate|null); + + /** Type aggregateType. */ + public aggregateType?: (google.bigtable.admin.v2.Type.IAggregate|null); + + /** Type structType. */ + public structType?: (google.bigtable.admin.v2.Type.IStruct|null); + + /** Type arrayType. */ + public arrayType?: (google.bigtable.admin.v2.Type.IArray|null); + + /** Type mapType. */ + public mapType?: (google.bigtable.admin.v2.Type.IMap|null); + + /** Type protoType. */ + public protoType?: (google.bigtable.admin.v2.Type.IProto|null); + + /** Type enumType. */ + public enumType?: (google.bigtable.admin.v2.Type.IEnum|null); + + /** Type kind. */ + public kind?: ("bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"|"protoType"|"enumType"); + + /** + * Creates a new Type instance using the specified properties. + * @param [properties] Properties to set + * @returns Type instance + */ + public static create(properties?: google.bigtable.admin.v2.IType): google.bigtable.admin.v2.Type; + + /** + * Encodes the specified Type message. Does not implicitly {@link google.bigtable.admin.v2.Type.verify|verify} messages. + * @param message Type message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Type message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.verify|verify} messages. + * @param message Type message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Type message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Type + * @throws {Error} If the payload is not 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.Type; + + /** + * Decodes a Type message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Type + * @throws {Error} If the payload 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.Type; + + /** + * Verifies a Type message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Type message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Type + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type; + + /** + * Creates a plain object from a Type message. Also converts values to other types if specified. + * @param message Type + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Type to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Type + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Type { + + /** Properties of a Bytes. */ + interface IBytes { + + /** Bytes encoding */ + encoding?: (google.bigtable.admin.v2.Type.Bytes.IEncoding|null); + } + + /** Represents a Bytes. */ + class Bytes implements IBytes { + + /** + * Constructs a new Bytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IBytes); + + /** Bytes encoding. */ + public encoding?: (google.bigtable.admin.v2.Type.Bytes.IEncoding|null); + + /** + * Creates a new Bytes instance using the specified properties. + * @param [properties] Properties to set + * @returns Bytes instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IBytes): google.bigtable.admin.v2.Type.Bytes; + + /** + * Encodes the specified Bytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.verify|verify} messages. + * @param message Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Bytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.verify|verify} messages. + * @param message Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Bytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Bytes + * @throws {Error} If the payload is not 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.Type.Bytes; + + /** + * Decodes a Bytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Bytes + * @throws {Error} If the payload 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.Type.Bytes; + + /** + * Verifies a Bytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Bytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Bytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Bytes; + + /** + * Creates a plain object from a Bytes message. Also converts values to other types if specified. + * @param message Bytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Bytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Bytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Bytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Bytes { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding raw */ + raw?: (google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Bytes.IEncoding); + + /** Encoding raw. */ + public raw?: (google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw|null); + + /** Encoding encoding. */ + public encoding?: "raw"; + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Bytes.IEncoding): google.bigtable.admin.v2.Type.Bytes.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Bytes.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Bytes.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.Bytes.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.Bytes.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Bytes.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Bytes.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of a Raw. */ + interface IRaw { + } + + /** Represents a Raw. */ + class Raw implements IRaw { + + /** + * Constructs a new Raw. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw); + + /** + * Creates a new Raw instance using the specified properties. + * @param [properties] Properties to set + * @returns Raw instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw): google.bigtable.admin.v2.Type.Bytes.Encoding.Raw; + + /** + * Encodes the specified Raw message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @param message Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Raw message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @param message Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Raw message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Raw + * @throws {Error} If the payload is not 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.Type.Bytes.Encoding.Raw; + + /** + * Decodes a Raw message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Raw + * @throws {Error} If the payload 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.Type.Bytes.Encoding.Raw; + + /** + * Verifies a Raw message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Raw message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Raw + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Bytes.Encoding.Raw; + + /** + * Creates a plain object from a Raw message. Also converts values to other types if specified. + * @param message Raw + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Bytes.Encoding.Raw, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Raw to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Raw + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a String. */ + interface IString { + + /** String encoding */ + encoding?: (google.bigtable.admin.v2.Type.String.IEncoding|null); + } + + /** Represents a String. */ + class String implements IString { + + /** + * Constructs a new String. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IString); + + /** String encoding. */ + public encoding?: (google.bigtable.admin.v2.Type.String.IEncoding|null); + + /** + * Creates a new String instance using the specified properties. + * @param [properties] Properties to set + * @returns String instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IString): google.bigtable.admin.v2.Type.String; + + /** + * Encodes the specified String message. Does not implicitly {@link google.bigtable.admin.v2.Type.String.verify|verify} messages. + * @param message String message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IString, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified String message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.String.verify|verify} messages. + * @param message String message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IString, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a String message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns String + * @throws {Error} If the payload is not 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.Type.String; + + /** + * Decodes a String message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns String + * @throws {Error} If the payload 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.Type.String; + + /** + * Verifies a String message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a String message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns String + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.String; + + /** + * Creates a plain object from a String message. Also converts values to other types if specified. + * @param message String + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.String, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this String to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for String + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace String { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding utf8Raw */ + utf8Raw?: (google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw|null); + + /** Encoding utf8Bytes */ + utf8Bytes?: (google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.String.IEncoding); + + /** Encoding utf8Raw. */ + public utf8Raw?: (google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw|null); + + /** Encoding utf8Bytes. */ + public utf8Bytes?: (google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes|null); + + /** Encoding encoding. */ + public encoding?: ("utf8Raw"|"utf8Bytes"); + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.String.IEncoding): google.bigtable.admin.v2.Type.String.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.String.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.String.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.String.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.String.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.String.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.String.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of an Utf8Raw. */ + interface IUtf8Raw { + } + + /** Represents an Utf8Raw. */ + class Utf8Raw implements IUtf8Raw { + + /** + * Constructs a new Utf8Raw. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw); + + /** + * Creates a new Utf8Raw instance using the specified properties. + * @param [properties] Properties to set + * @returns Utf8Raw instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw): google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw; + + /** + * Encodes the specified Utf8Raw message. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.verify|verify} messages. + * @param message Utf8Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Utf8Raw message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.verify|verify} messages. + * @param message Utf8Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Utf8Raw message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Utf8Raw + * @throws {Error} If the payload is not 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.Type.String.Encoding.Utf8Raw; + + /** + * Decodes an Utf8Raw message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Utf8Raw + * @throws {Error} If the payload 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.Type.String.Encoding.Utf8Raw; + + /** + * Verifies an Utf8Raw message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Utf8Raw message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Utf8Raw + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw; + + /** + * Creates a plain object from an Utf8Raw message. Also converts values to other types if specified. + * @param message Utf8Raw + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Utf8Raw to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Utf8Raw + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Utf8Bytes. */ + interface IUtf8Bytes { + } + + /** Represents an Utf8Bytes. */ + class Utf8Bytes implements IUtf8Bytes { + + /** + * Constructs a new Utf8Bytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes); + + /** + * Creates a new Utf8Bytes instance using the specified properties. + * @param [properties] Properties to set + * @returns Utf8Bytes instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes): google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes; + + /** + * Encodes the specified Utf8Bytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.verify|verify} messages. + * @param message Utf8Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Utf8Bytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.verify|verify} messages. + * @param message Utf8Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Utf8Bytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Utf8Bytes + * @throws {Error} If the payload is not 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.Type.String.Encoding.Utf8Bytes; + + /** + * Decodes an Utf8Bytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Utf8Bytes + * @throws {Error} If the payload 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.Type.String.Encoding.Utf8Bytes; + + /** + * Verifies an Utf8Bytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Utf8Bytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Utf8Bytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes; + + /** + * Creates a plain object from an Utf8Bytes message. Also converts values to other types if specified. + * @param message Utf8Bytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Utf8Bytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Utf8Bytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an Int64. */ + interface IInt64 { + + /** Int64 encoding */ + encoding?: (google.bigtable.admin.v2.Type.Int64.IEncoding|null); + } + + /** Represents an Int64. */ + class Int64 implements IInt64 { + + /** + * Constructs a new Int64. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IInt64); + + /** Int64 encoding. */ + public encoding?: (google.bigtable.admin.v2.Type.Int64.IEncoding|null); + + /** + * Creates a new Int64 instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64 instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IInt64): google.bigtable.admin.v2.Type.Int64; + + /** + * Encodes the specified Int64 message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.verify|verify} messages. + * @param message Int64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IInt64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64 message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.verify|verify} messages. + * @param message Int64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IInt64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64 + * @throws {Error} If the payload is not 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.Type.Int64; + + /** + * Decodes an Int64 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64 + * @throws {Error} If the payload 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.Type.Int64; + + /** + * Verifies an Int64 message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int64 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64 + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Int64; + + /** + * Creates a plain object from an Int64 message. Also converts values to other types if specified. + * @param message Int64 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Int64, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Int64 { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding bigEndianBytes */ + bigEndianBytes?: (google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes|null); + + /** Encoding orderedCodeBytes */ + orderedCodeBytes?: (google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Int64.IEncoding); + + /** Encoding bigEndianBytes. */ + public bigEndianBytes?: (google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes|null); + + /** Encoding orderedCodeBytes. */ + public orderedCodeBytes?: (google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes|null); + + /** Encoding encoding. */ + public encoding?: ("bigEndianBytes"|"orderedCodeBytes"); + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Int64.IEncoding): google.bigtable.admin.v2.Type.Int64.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Int64.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Int64.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.Int64.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.Int64.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Int64.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Int64.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of a BigEndianBytes. */ + interface IBigEndianBytes { + + /** BigEndianBytes bytesType */ + bytesType?: (google.bigtable.admin.v2.Type.IBytes|null); + } + + /** Represents a BigEndianBytes. */ + class BigEndianBytes implements IBigEndianBytes { + + /** + * Constructs a new BigEndianBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes); + + /** BigEndianBytes bytesType. */ + public bytesType?: (google.bigtable.admin.v2.Type.IBytes|null); + + /** + * Creates a new BigEndianBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns BigEndianBytes instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes): google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes; + + /** + * Encodes the specified BigEndianBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @param message BigEndianBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigEndianBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @param message BigEndianBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigEndianBytes + * @throws {Error} If the payload is not 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.Type.Int64.Encoding.BigEndianBytes; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigEndianBytes + * @throws {Error} If the payload 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.Type.Int64.Encoding.BigEndianBytes; + + /** + * Verifies a BigEndianBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigEndianBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigEndianBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes; + + /** + * Creates a plain object from a BigEndianBytes message. Also converts values to other types if specified. + * @param message BigEndianBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigEndianBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigEndianBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OrderedCodeBytes. */ + interface IOrderedCodeBytes { + } + + /** Represents an OrderedCodeBytes. */ + class OrderedCodeBytes implements IOrderedCodeBytes { + + /** + * Constructs a new OrderedCodeBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes); + + /** + * Creates a new OrderedCodeBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderedCodeBytes instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes): google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes; + + /** + * Encodes the specified OrderedCodeBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.verify|verify} messages. + * @param message OrderedCodeBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderedCodeBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.verify|verify} messages. + * @param message OrderedCodeBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderedCodeBytes + * @throws {Error} If the payload is not 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.Type.Int64.Encoding.OrderedCodeBytes; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderedCodeBytes + * @throws {Error} If the payload 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.Type.Int64.Encoding.OrderedCodeBytes; + + /** + * Verifies an OrderedCodeBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrderedCodeBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderedCodeBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes; + + /** + * Creates a plain object from an OrderedCodeBytes message. Also converts values to other types if specified. + * @param message OrderedCodeBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderedCodeBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderedCodeBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Bool. */ + interface IBool { + } + + /** Represents a Bool. */ + class Bool implements IBool { + + /** + * Constructs a new Bool. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IBool); + + /** + * Creates a new Bool instance using the specified properties. + * @param [properties] Properties to set + * @returns Bool instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IBool): google.bigtable.admin.v2.Type.Bool; + + /** + * Encodes the specified Bool message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bool.verify|verify} messages. + * @param message Bool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IBool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Bool message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bool.verify|verify} messages. + * @param message Bool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IBool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Bool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Bool + * @throws {Error} If the payload is not 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.Type.Bool; + + /** + * Decodes a Bool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Bool + * @throws {Error} If the payload 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.Type.Bool; + + /** + * Verifies a Bool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Bool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Bool + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Bool; + + /** + * Creates a plain object from a Bool message. Also converts values to other types if specified. + * @param message Bool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Bool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Bool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Bool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Float32. */ + interface IFloat32 { + } + + /** Represents a Float32. */ + class Float32 implements IFloat32 { + + /** + * Constructs a new Float32. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IFloat32); + + /** + * Creates a new Float32 instance using the specified properties. + * @param [properties] Properties to set + * @returns Float32 instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IFloat32): google.bigtable.admin.v2.Type.Float32; + + /** + * Encodes the specified Float32 message. Does not implicitly {@link google.bigtable.admin.v2.Type.Float32.verify|verify} messages. + * @param message Float32 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IFloat32, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Float32 message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Float32.verify|verify} messages. + * @param message Float32 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IFloat32, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Float32 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Float32 + * @throws {Error} If the payload is not 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.Type.Float32; + + /** + * Decodes a Float32 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Float32 + * @throws {Error} If the payload 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.Type.Float32; + + /** + * Verifies a Float32 message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Float32 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Float32 + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Float32; + + /** + * Creates a plain object from a Float32 message. Also converts values to other types if specified. + * @param message Float32 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Float32, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Float32 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Float32 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Float64. */ + interface IFloat64 { + } + + /** Represents a Float64. */ + class Float64 implements IFloat64 { + + /** + * Constructs a new Float64. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IFloat64); + + /** + * Creates a new Float64 instance using the specified properties. + * @param [properties] Properties to set + * @returns Float64 instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IFloat64): google.bigtable.admin.v2.Type.Float64; + + /** + * Encodes the specified Float64 message. Does not implicitly {@link google.bigtable.admin.v2.Type.Float64.verify|verify} messages. + * @param message Float64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IFloat64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Float64 message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Float64.verify|verify} messages. + * @param message Float64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IFloat64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Float64 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Float64 + * @throws {Error} If the payload is not 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.Type.Float64; + + /** + * Decodes a Float64 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Float64 + * @throws {Error} If the payload 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.Type.Float64; + + /** + * Verifies a Float64 message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Float64 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Float64 + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Float64; + + /** + * Creates a plain object from a Float64 message. Also converts values to other types if specified. + * @param message Float64 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Float64, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Float64 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Float64 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp encoding */ + encoding?: (google.bigtable.admin.v2.Type.Timestamp.IEncoding|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.ITimestamp); + + /** Timestamp encoding. */ + public encoding?: (google.bigtable.admin.v2.Type.Timestamp.IEncoding|null); + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.ITimestamp): google.bigtable.admin.v2.Type.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.bigtable.admin.v2.Type.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.Type.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.Type.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Timestamp { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding unixMicrosInt64 */ + unixMicrosInt64?: (google.bigtable.admin.v2.Type.Int64.IEncoding|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Timestamp.IEncoding); + + /** Encoding unixMicrosInt64. */ + public unixMicrosInt64?: (google.bigtable.admin.v2.Type.Int64.IEncoding|null); + + /** Encoding encoding. */ + public encoding?: "unixMicrosInt64"; + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Timestamp.IEncoding): google.bigtable.admin.v2.Type.Timestamp.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Timestamp.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Timestamp.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Timestamp.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Timestamp.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.Timestamp.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.Timestamp.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Timestamp.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Timestamp.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Date. */ + interface IDate { + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IDate); + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IDate): google.bigtable.admin.v2.Type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.bigtable.admin.v2.Type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.Type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.Type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: (google.bigtable.admin.v2.Type.Struct.IField[]|null); + + /** Struct encoding */ + encoding?: (google.bigtable.admin.v2.Type.Struct.IEncoding|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IStruct); + + /** Struct fields. */ + public fields: google.bigtable.admin.v2.Type.Struct.IField[]; + + /** Struct encoding. */ + public encoding?: (google.bigtable.admin.v2.Type.Struct.IEncoding|null); + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IStruct): google.bigtable.admin.v2.Type.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.Type.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.Type.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Struct { + + /** Properties of a Field. */ + interface IField { + + /** Field fieldName */ + fieldName?: (string|null); + + /** Field type */ + type?: (google.bigtable.admin.v2.IType|null); + } + + /** Represents a Field. */ + class Field implements IField { + + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Struct.IField); + + /** Field fieldName. */ + public fieldName: string; + + /** Field type. */ + public type?: (google.bigtable.admin.v2.IType|null); + + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Struct.IField): google.bigtable.admin.v2.Type.Struct.Field; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Struct.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Struct.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @throws {Error} If the payload is not 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.Type.Struct.Field; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @throws {Error} If the payload 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.Type.Struct.Field; + + /** + * Verifies a Field message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Struct.Field; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Struct.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding singleton */ + singleton?: (google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton|null); + + /** Encoding delimitedBytes */ + delimitedBytes?: (google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes|null); + + /** Encoding orderedCodeBytes */ + orderedCodeBytes?: (google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Struct.IEncoding); + + /** Encoding singleton. */ + public singleton?: (google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton|null); + + /** Encoding delimitedBytes. */ + public delimitedBytes?: (google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes|null); + + /** Encoding orderedCodeBytes. */ + public orderedCodeBytes?: (google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes|null); + + /** Encoding encoding. */ + public encoding?: ("singleton"|"delimitedBytes"|"orderedCodeBytes"); + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Struct.IEncoding): google.bigtable.admin.v2.Type.Struct.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Struct.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Struct.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.Struct.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.Struct.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Struct.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Struct.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of a Singleton. */ + interface ISingleton { + } + + /** Represents a Singleton. */ + class Singleton implements ISingleton { + + /** + * Constructs a new Singleton. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton); + + /** + * Creates a new Singleton instance using the specified properties. + * @param [properties] Properties to set + * @returns Singleton instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton): google.bigtable.admin.v2.Type.Struct.Encoding.Singleton; + + /** + * Encodes the specified Singleton message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.verify|verify} messages. + * @param message Singleton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Singleton message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.verify|verify} messages. + * @param message Singleton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Singleton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Singleton + * @throws {Error} If the payload is not 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.Type.Struct.Encoding.Singleton; + + /** + * Decodes a Singleton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Singleton + * @throws {Error} If the payload 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.Type.Struct.Encoding.Singleton; + + /** + * Verifies a Singleton message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Singleton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Singleton + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Struct.Encoding.Singleton; + + /** + * Creates a plain object from a Singleton message. Also converts values to other types if specified. + * @param message Singleton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Struct.Encoding.Singleton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Singleton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Singleton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DelimitedBytes. */ + interface IDelimitedBytes { + + /** DelimitedBytes delimiter */ + delimiter?: (Uint8Array|Buffer|string|null); + } + + /** Represents a DelimitedBytes. */ + class DelimitedBytes implements IDelimitedBytes { + + /** + * Constructs a new DelimitedBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes); + + /** DelimitedBytes delimiter. */ + public delimiter: (Uint8Array|Buffer|string); + + /** + * Creates a new DelimitedBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns DelimitedBytes instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes): google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes; + + /** + * Encodes the specified DelimitedBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.verify|verify} messages. + * @param message DelimitedBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DelimitedBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.verify|verify} messages. + * @param message DelimitedBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DelimitedBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DelimitedBytes + * @throws {Error} If the payload is not 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.Type.Struct.Encoding.DelimitedBytes; + + /** + * Decodes a DelimitedBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DelimitedBytes + * @throws {Error} If the payload 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.Type.Struct.Encoding.DelimitedBytes; + + /** + * Verifies a DelimitedBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DelimitedBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DelimitedBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes; + + /** + * Creates a plain object from a DelimitedBytes message. Also converts values to other types if specified. + * @param message DelimitedBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DelimitedBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DelimitedBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OrderedCodeBytes. */ + interface IOrderedCodeBytes { + } + + /** Represents an OrderedCodeBytes. */ + class OrderedCodeBytes implements IOrderedCodeBytes { + + /** + * Constructs a new OrderedCodeBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes); + + /** + * Creates a new OrderedCodeBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderedCodeBytes instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes): google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes; + + /** + * Encodes the specified OrderedCodeBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.verify|verify} messages. + * @param message OrderedCodeBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderedCodeBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.verify|verify} messages. + * @param message OrderedCodeBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderedCodeBytes + * @throws {Error} If the payload is not 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.Type.Struct.Encoding.OrderedCodeBytes; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderedCodeBytes + * @throws {Error} If the payload 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.Type.Struct.Encoding.OrderedCodeBytes; + + /** + * Verifies an OrderedCodeBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrderedCodeBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderedCodeBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes; + + /** + * Creates a plain object from an OrderedCodeBytes message. Also converts values to other types if specified. + * @param message OrderedCodeBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderedCodeBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderedCodeBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Proto. */ + interface IProto { + + /** Proto schemaBundleId */ + schemaBundleId?: (string|null); + + /** Proto messageName */ + messageName?: (string|null); + } + + /** Represents a Proto. */ + class Proto implements IProto { + + /** + * Constructs a new Proto. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IProto); + + /** Proto schemaBundleId. */ + public schemaBundleId: string; + + /** Proto messageName. */ + public messageName: string; + + /** + * Creates a new Proto instance using the specified properties. + * @param [properties] Properties to set + * @returns Proto instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IProto): google.bigtable.admin.v2.Type.Proto; + + /** + * Encodes the specified Proto message. Does not implicitly {@link google.bigtable.admin.v2.Type.Proto.verify|verify} messages. + * @param message Proto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Proto message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Proto.verify|verify} messages. + * @param message Proto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Proto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Proto + * @throws {Error} If the payload is not 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.Type.Proto; + + /** + * Decodes a Proto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Proto + * @throws {Error} If the payload 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.Type.Proto; + + /** + * Verifies a Proto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Proto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Proto + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Proto; + + /** + * Creates a plain object from a Proto message. Also converts values to other types if specified. + * @param message Proto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Proto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Proto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Proto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Enum. */ + interface IEnum { + + /** Enum schemaBundleId */ + schemaBundleId?: (string|null); + + /** Enum enumName */ + enumName?: (string|null); + } + + /** Represents an Enum. */ + class Enum implements IEnum { + + /** + * Constructs a new Enum. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IEnum); + + /** Enum schemaBundleId. */ + public schemaBundleId: string; + + /** Enum enumName. */ + public enumName: string; + + /** + * Creates a new Enum instance using the specified properties. + * @param [properties] Properties to set + * @returns Enum instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IEnum): google.bigtable.admin.v2.Type.Enum; + + /** + * Encodes the specified Enum message. Does not implicitly {@link google.bigtable.admin.v2.Type.Enum.verify|verify} messages. + * @param message Enum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Enum message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Enum.verify|verify} messages. + * @param message Enum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Enum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Enum + * @throws {Error} If the payload is not 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.Type.Enum; + + /** + * Decodes an Enum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Enum + * @throws {Error} If the payload 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.Type.Enum; + + /** + * Verifies an Enum message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Enum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Enum + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Enum; + + /** + * Creates a plain object from an Enum message. Also converts values to other types if specified. + * @param message Enum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Enum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Enum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Enum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Array. */ + interface IArray { + + /** Array elementType */ + elementType?: (google.bigtable.admin.v2.IType|null); + } + + /** Represents an Array. */ + class Array implements IArray { + + /** + * Constructs a new Array. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IArray); + + /** Array elementType. */ + public elementType?: (google.bigtable.admin.v2.IType|null); + + /** + * Creates a new Array instance using the specified properties. + * @param [properties] Properties to set + * @returns Array instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IArray): google.bigtable.admin.v2.Type.Array; + + /** + * Encodes the specified Array message. Does not implicitly {@link google.bigtable.admin.v2.Type.Array.verify|verify} messages. + * @param message Array message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IArray, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Array message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Array.verify|verify} messages. + * @param message Array message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IArray, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Array message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Array + * @throws {Error} If the payload is not 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.Type.Array; + + /** + * Decodes an Array message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Array + * @throws {Error} If the payload 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.Type.Array; + + /** + * Verifies an Array message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Array message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Array + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Array; + + /** + * Creates a plain object from an Array message. Also converts values to other types if specified. + * @param message Array + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Array, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Array to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Array + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Map. */ + interface IMap { + + /** Map keyType */ + keyType?: (google.bigtable.admin.v2.IType|null); + + /** Map valueType */ + valueType?: (google.bigtable.admin.v2.IType|null); + } + + /** Represents a Map. */ + class Map implements IMap { + + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IMap); + + /** Map keyType. */ + public keyType?: (google.bigtable.admin.v2.IType|null); + + /** Map valueType. */ + public valueType?: (google.bigtable.admin.v2.IType|null); + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IMap): google.bigtable.admin.v2.Type.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link google.bigtable.admin.v2.Type.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @throws {Error} If the payload is not 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.Type.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @throws {Error} If the payload 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.Type.Map; + + /** + * Verifies a Map message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Aggregate. */ + interface IAggregate { + + /** Aggregate inputType */ + inputType?: (google.bigtable.admin.v2.IType|null); + + /** Aggregate stateType */ + stateType?: (google.bigtable.admin.v2.IType|null); + + /** Aggregate sum */ + sum?: (google.bigtable.admin.v2.Type.Aggregate.ISum|null); + + /** Aggregate hllppUniqueCount */ + hllppUniqueCount?: (google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null); + + /** Aggregate max */ + max?: (google.bigtable.admin.v2.Type.Aggregate.IMax|null); + + /** Aggregate min */ + min?: (google.bigtable.admin.v2.Type.Aggregate.IMin|null); + } + + /** Represents an Aggregate. */ + class Aggregate implements IAggregate { + + /** + * Constructs a new Aggregate. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IAggregate); + + /** Aggregate inputType. */ + public inputType?: (google.bigtable.admin.v2.IType|null); + + /** Aggregate stateType. */ + public stateType?: (google.bigtable.admin.v2.IType|null); + + /** Aggregate sum. */ + public sum?: (google.bigtable.admin.v2.Type.Aggregate.ISum|null); + + /** Aggregate hllppUniqueCount. */ + public hllppUniqueCount?: (google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null); + + /** Aggregate max. */ + public max?: (google.bigtable.admin.v2.Type.Aggregate.IMax|null); + + /** Aggregate min. */ + public min?: (google.bigtable.admin.v2.Type.Aggregate.IMin|null); + + /** Aggregate aggregator. */ + public aggregator?: ("sum"|"hllppUniqueCount"|"max"|"min"); + + /** + * Creates a new Aggregate instance using the specified properties. + * @param [properties] Properties to set + * @returns Aggregate instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IAggregate): google.bigtable.admin.v2.Type.Aggregate; + + /** + * Encodes the specified Aggregate message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * @param message Aggregate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Aggregate message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * @param message Aggregate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Aggregate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aggregate + * @throws {Error} If the payload is not 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.Type.Aggregate; + + /** + * Decodes an Aggregate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aggregate + * @throws {Error} If the payload 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.Type.Aggregate; + + /** + * Verifies an Aggregate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregate + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Aggregate; + + /** + * Creates a plain object from an Aggregate message. Also converts values to other types if specified. + * @param message Aggregate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Aggregate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aggregate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Aggregate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Aggregate { + + /** Properties of a Sum. */ + interface ISum { + } + + /** Represents a Sum. */ + class Sum implements ISum { + + /** + * Constructs a new Sum. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.ISum); + + /** + * Creates a new Sum instance using the specified properties. + * @param [properties] Properties to set + * @returns Sum instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Aggregate.ISum): google.bigtable.admin.v2.Type.Aggregate.Sum; + + /** + * Encodes the specified Sum message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Sum.verify|verify} messages. + * @param message Sum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Aggregate.ISum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Sum.verify|verify} messages. + * @param message Sum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Aggregate.ISum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sum + * @throws {Error} If the payload is not 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.Type.Aggregate.Sum; + + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sum + * @throws {Error} If the payload 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.Type.Aggregate.Sum; + + /** + * Verifies a Sum message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sum + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Aggregate.Sum; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @param message Sum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Aggregate.Sum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Max. */ + interface IMax { + } + + /** Represents a Max. */ + class Max implements IMax { + + /** + * Constructs a new Max. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.IMax); + + /** + * Creates a new Max instance using the specified properties. + * @param [properties] Properties to set + * @returns Max instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Aggregate.IMax): google.bigtable.admin.v2.Type.Aggregate.Max; + + /** + * Encodes the specified Max message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Max.verify|verify} messages. + * @param message Max message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Aggregate.IMax, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Max message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Max.verify|verify} messages. + * @param message Max message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Aggregate.IMax, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Max message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Max + * @throws {Error} If the payload is not 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.Type.Aggregate.Max; + + /** + * Decodes a Max message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Max + * @throws {Error} If the payload 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.Type.Aggregate.Max; + + /** + * Verifies a Max message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Max message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Max + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Aggregate.Max; + + /** + * Creates a plain object from a Max message. Also converts values to other types if specified. + * @param message Max + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Aggregate.Max, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Max to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Max + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Min. */ + interface IMin { + } + + /** Represents a Min. */ + class Min implements IMin { + + /** + * Constructs a new Min. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.IMin); + + /** + * Creates a new Min instance using the specified properties. + * @param [properties] Properties to set + * @returns Min instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Aggregate.IMin): google.bigtable.admin.v2.Type.Aggregate.Min; + + /** + * Encodes the specified Min message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Min.verify|verify} messages. + * @param message Min message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Aggregate.IMin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Min message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Min.verify|verify} messages. + * @param message Min message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Aggregate.IMin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Min message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Min + * @throws {Error} If the payload is not 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.Type.Aggregate.Min; + + /** + * Decodes a Min message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Min + * @throws {Error} If the payload 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.Type.Aggregate.Min; + + /** + * Verifies a Min message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Min message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Min + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Aggregate.Min; + + /** + * Creates a plain object from a Min message. Also converts values to other types if specified. + * @param message Min + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Aggregate.Min, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Min to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Min + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HyperLogLogPlusPlusUniqueCount. */ + interface IHyperLogLogPlusPlusUniqueCount { + } + + /** Represents a HyperLogLogPlusPlusUniqueCount. */ + class HyperLogLogPlusPlusUniqueCount implements IHyperLogLogPlusPlusUniqueCount { + + /** + * Constructs a new HyperLogLogPlusPlusUniqueCount. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount); + + /** + * Creates a new HyperLogLogPlusPlusUniqueCount instance using the specified properties. + * @param [properties] Properties to set + * @returns HyperLogLogPlusPlusUniqueCount instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount): google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount; + + /** + * Encodes the specified HyperLogLogPlusPlusUniqueCount message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify|verify} messages. + * @param message HyperLogLogPlusPlusUniqueCount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HyperLogLogPlusPlusUniqueCount message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify|verify} messages. + * @param message HyperLogLogPlusPlusUniqueCount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HyperLogLogPlusPlusUniqueCount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HyperLogLogPlusPlusUniqueCount + * @throws {Error} If the payload is not 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.Type.Aggregate.HyperLogLogPlusPlusUniqueCount; + + /** + * Decodes a HyperLogLogPlusPlusUniqueCount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HyperLogLogPlusPlusUniqueCount + * @throws {Error} If the payload 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.Type.Aggregate.HyperLogLogPlusPlusUniqueCount; + + /** + * Verifies a HyperLogLogPlusPlusUniqueCount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HyperLogLogPlusPlusUniqueCount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HyperLogLogPlusPlusUniqueCount + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount; + + /** + * Creates a plain object from a HyperLogLogPlusPlusUniqueCount message. Also converts values to other types if specified. + * @param message HyperLogLogPlusPlusUniqueCount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HyperLogLogPlusPlusUniqueCount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HyperLogLogPlusPlusUniqueCount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + } + + /** Namespace v2. */ + namespace v2 { + + /** Represents a Bigtable */ + class Bigtable extends $protobuf.rpc.Service { + + /** + * Constructs a new Bigtable service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Bigtable service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Bigtable; + + /** + * Calls ReadRows. + * @param request ReadRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadRowsResponse + */ + public readRows(request: google.bigtable.v2.IReadRowsRequest, callback: google.bigtable.v2.Bigtable.ReadRowsCallback): void; + + /** + * Calls ReadRows. + * @param request ReadRowsRequest message or plain object + * @returns Promise + */ + public readRows(request: google.bigtable.v2.IReadRowsRequest): Promise; + + /** + * Calls SampleRowKeys. + * @param request SampleRowKeysRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SampleRowKeysResponse + */ + public sampleRowKeys(request: google.bigtable.v2.ISampleRowKeysRequest, callback: google.bigtable.v2.Bigtable.SampleRowKeysCallback): void; + + /** + * Calls SampleRowKeys. + * @param request SampleRowKeysRequest message or plain object + * @returns Promise + */ + public sampleRowKeys(request: google.bigtable.v2.ISampleRowKeysRequest): Promise; + + /** + * Calls MutateRow. + * @param request MutateRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MutateRowResponse + */ + public mutateRow(request: google.bigtable.v2.IMutateRowRequest, callback: google.bigtable.v2.Bigtable.MutateRowCallback): void; + + /** + * Calls MutateRow. + * @param request MutateRowRequest message or plain object + * @returns Promise + */ + public mutateRow(request: google.bigtable.v2.IMutateRowRequest): Promise; + + /** + * Calls MutateRows. + * @param request MutateRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MutateRowsResponse + */ + public mutateRows(request: google.bigtable.v2.IMutateRowsRequest, callback: google.bigtable.v2.Bigtable.MutateRowsCallback): void; + + /** + * Calls MutateRows. + * @param request MutateRowsRequest message or plain object + * @returns Promise + */ + public mutateRows(request: google.bigtable.v2.IMutateRowsRequest): Promise; + + /** + * Calls CheckAndMutateRow. + * @param request CheckAndMutateRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckAndMutateRowResponse + */ + public checkAndMutateRow(request: google.bigtable.v2.ICheckAndMutateRowRequest, callback: google.bigtable.v2.Bigtable.CheckAndMutateRowCallback): void; + + /** + * Calls CheckAndMutateRow. + * @param request CheckAndMutateRowRequest message or plain object + * @returns Promise + */ + public checkAndMutateRow(request: google.bigtable.v2.ICheckAndMutateRowRequest): Promise; + + /** + * Calls PingAndWarm. + * @param request PingAndWarmRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PingAndWarmResponse + */ + public pingAndWarm(request: google.bigtable.v2.IPingAndWarmRequest, callback: google.bigtable.v2.Bigtable.PingAndWarmCallback): void; + + /** + * Calls PingAndWarm. + * @param request PingAndWarmRequest message or plain object + * @returns Promise + */ + public pingAndWarm(request: google.bigtable.v2.IPingAndWarmRequest): Promise; + + /** + * Calls ReadModifyWriteRow. + * @param request ReadModifyWriteRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadModifyWriteRowResponse + */ + public readModifyWriteRow(request: google.bigtable.v2.IReadModifyWriteRowRequest, callback: google.bigtable.v2.Bigtable.ReadModifyWriteRowCallback): void; + + /** + * Calls ReadModifyWriteRow. + * @param request ReadModifyWriteRowRequest message or plain object + * @returns Promise + */ + public readModifyWriteRow(request: google.bigtable.v2.IReadModifyWriteRowRequest): Promise; + + /** + * Calls GenerateInitialChangeStreamPartitions. + * @param request GenerateInitialChangeStreamPartitionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateInitialChangeStreamPartitionsResponse + */ + public generateInitialChangeStreamPartitions(request: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest, callback: google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitionsCallback): void; + + /** + * Calls GenerateInitialChangeStreamPartitions. + * @param request GenerateInitialChangeStreamPartitionsRequest message or plain object + * @returns Promise + */ + public generateInitialChangeStreamPartitions(request: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest): Promise; + + /** + * Calls ReadChangeStream. + * @param request ReadChangeStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadChangeStreamResponse + */ + public readChangeStream(request: google.bigtable.v2.IReadChangeStreamRequest, callback: google.bigtable.v2.Bigtable.ReadChangeStreamCallback): void; + + /** + * Calls ReadChangeStream. + * @param request ReadChangeStreamRequest message or plain object + * @returns Promise + */ + public readChangeStream(request: google.bigtable.v2.IReadChangeStreamRequest): Promise; + + /** + * Calls PrepareQuery. + * @param request PrepareQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PrepareQueryResponse + */ + public prepareQuery(request: google.bigtable.v2.IPrepareQueryRequest, callback: google.bigtable.v2.Bigtable.PrepareQueryCallback): void; + + /** + * Calls PrepareQuery. + * @param request PrepareQueryRequest message or plain object + * @returns Promise + */ + public prepareQuery(request: google.bigtable.v2.IPrepareQueryRequest): Promise; + + /** + * Calls ExecuteQuery. + * @param request ExecuteQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteQueryResponse + */ + public executeQuery(request: google.bigtable.v2.IExecuteQueryRequest, callback: google.bigtable.v2.Bigtable.ExecuteQueryCallback): void; + + /** + * Calls ExecuteQuery. + * @param request ExecuteQueryRequest message or plain object + * @returns Promise + */ + public executeQuery(request: google.bigtable.v2.IExecuteQueryRequest): Promise; + + /** + * Calls GetClientConfiguration. + * @param request GetClientConfigurationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ClientConfiguration + */ + public getClientConfiguration(request: google.bigtable.v2.IGetClientConfigurationRequest, callback: google.bigtable.v2.Bigtable.GetClientConfigurationCallback): void; + + /** + * Calls GetClientConfiguration. + * @param request GetClientConfigurationRequest message or plain object + * @returns Promise + */ + public getClientConfiguration(request: google.bigtable.v2.IGetClientConfigurationRequest): Promise; + + /** + * Calls OpenTable. + * @param request SessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionResponse + */ + public openTable(request: google.bigtable.v2.ISessionRequest, callback: google.bigtable.v2.Bigtable.OpenTableCallback): void; + + /** + * Calls OpenTable. + * @param request SessionRequest message or plain object + * @returns Promise + */ + public openTable(request: google.bigtable.v2.ISessionRequest): Promise; + + /** + * Calls OpenAuthorizedView. + * @param request SessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionResponse + */ + public openAuthorizedView(request: google.bigtable.v2.ISessionRequest, callback: google.bigtable.v2.Bigtable.OpenAuthorizedViewCallback): void; + + /** + * Calls OpenAuthorizedView. + * @param request SessionRequest message or plain object + * @returns Promise + */ + public openAuthorizedView(request: google.bigtable.v2.ISessionRequest): Promise; + + /** + * Calls OpenMaterializedView. + * @param request SessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionResponse + */ + public openMaterializedView(request: google.bigtable.v2.ISessionRequest, callback: google.bigtable.v2.Bigtable.OpenMaterializedViewCallback): void; + + /** + * Calls OpenMaterializedView. + * @param request SessionRequest message or plain object + * @returns Promise + */ + public openMaterializedView(request: google.bigtable.v2.ISessionRequest): Promise; + } + + namespace Bigtable { + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|readRows}. + * @param error Error, if any + * @param [response] ReadRowsResponse + */ + type ReadRowsCallback = (error: (Error|null), response?: google.bigtable.v2.ReadRowsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|sampleRowKeys}. + * @param error Error, if any + * @param [response] SampleRowKeysResponse + */ + type SampleRowKeysCallback = (error: (Error|null), response?: google.bigtable.v2.SampleRowKeysResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|mutateRow}. + * @param error Error, if any + * @param [response] MutateRowResponse + */ + type MutateRowCallback = (error: (Error|null), response?: google.bigtable.v2.MutateRowResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|mutateRows}. + * @param error Error, if any + * @param [response] MutateRowsResponse + */ + type MutateRowsCallback = (error: (Error|null), response?: google.bigtable.v2.MutateRowsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|checkAndMutateRow}. + * @param error Error, if any + * @param [response] CheckAndMutateRowResponse + */ + type CheckAndMutateRowCallback = (error: (Error|null), response?: google.bigtable.v2.CheckAndMutateRowResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|pingAndWarm}. + * @param error Error, if any + * @param [response] PingAndWarmResponse + */ + type PingAndWarmCallback = (error: (Error|null), response?: google.bigtable.v2.PingAndWarmResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|readModifyWriteRow}. + * @param error Error, if any + * @param [response] ReadModifyWriteRowResponse + */ + type ReadModifyWriteRowCallback = (error: (Error|null), response?: google.bigtable.v2.ReadModifyWriteRowResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|generateInitialChangeStreamPartitions}. + * @param error Error, if any + * @param [response] GenerateInitialChangeStreamPartitionsResponse + */ + type GenerateInitialChangeStreamPartitionsCallback = (error: (Error|null), response?: google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|readChangeStream}. + * @param error Error, if any + * @param [response] ReadChangeStreamResponse + */ + type ReadChangeStreamCallback = (error: (Error|null), response?: google.bigtable.v2.ReadChangeStreamResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|prepareQuery}. + * @param error Error, if any + * @param [response] PrepareQueryResponse + */ + type PrepareQueryCallback = (error: (Error|null), response?: google.bigtable.v2.PrepareQueryResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|executeQuery}. + * @param error Error, if any + * @param [response] ExecuteQueryResponse + */ + type ExecuteQueryCallback = (error: (Error|null), response?: google.bigtable.v2.ExecuteQueryResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|getClientConfiguration}. + * @param error Error, if any + * @param [response] ClientConfiguration + */ + type GetClientConfigurationCallback = (error: (Error|null), response?: google.bigtable.v2.ClientConfiguration) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|openTable}. + * @param error Error, if any + * @param [response] SessionResponse + */ + type OpenTableCallback = (error: (Error|null), response?: google.bigtable.v2.SessionResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|openAuthorizedView}. + * @param error Error, if any + * @param [response] SessionResponse + */ + type OpenAuthorizedViewCallback = (error: (Error|null), response?: google.bigtable.v2.SessionResponse) => void; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|openMaterializedView}. + * @param error Error, if any + * @param [response] SessionResponse + */ + type OpenMaterializedViewCallback = (error: (Error|null), response?: google.bigtable.v2.SessionResponse) => void; + } + + /** Properties of a ReadRowsRequest. */ + interface IReadRowsRequest { + + /** ReadRowsRequest tableName */ + tableName?: (string|null); + + /** ReadRowsRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** ReadRowsRequest materializedViewName */ + materializedViewName?: (string|null); + + /** ReadRowsRequest appProfileId */ + appProfileId?: (string|null); + + /** ReadRowsRequest rows */ + rows?: (google.bigtable.v2.IRowSet|null); + + /** ReadRowsRequest filter */ + filter?: (google.bigtable.v2.IRowFilter|null); + + /** ReadRowsRequest rowsLimit */ + rowsLimit?: (number|Long|string|null); + + /** ReadRowsRequest requestStatsView */ + requestStatsView?: (google.bigtable.v2.ReadRowsRequest.RequestStatsView|keyof typeof google.bigtable.v2.ReadRowsRequest.RequestStatsView|null); + + /** ReadRowsRequest reversed */ + reversed?: (boolean|null); + } + + /** Represents a ReadRowsRequest. */ + class ReadRowsRequest implements IReadRowsRequest { + + /** + * Constructs a new ReadRowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadRowsRequest); + + /** ReadRowsRequest tableName. */ + public tableName: string; + + /** ReadRowsRequest authorizedViewName. */ + public authorizedViewName: string; + + /** ReadRowsRequest materializedViewName. */ + public materializedViewName: string; + + /** ReadRowsRequest appProfileId. */ + public appProfileId: string; + + /** ReadRowsRequest rows. */ + public rows?: (google.bigtable.v2.IRowSet|null); + + /** ReadRowsRequest filter. */ + public filter?: (google.bigtable.v2.IRowFilter|null); + + /** ReadRowsRequest rowsLimit. */ + public rowsLimit: (number|Long|string); + + /** ReadRowsRequest requestStatsView. */ + public requestStatsView: (google.bigtable.v2.ReadRowsRequest.RequestStatsView|keyof typeof google.bigtable.v2.ReadRowsRequest.RequestStatsView); + + /** ReadRowsRequest reversed. */ + public reversed: boolean; + + /** + * Creates a new ReadRowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadRowsRequest instance + */ + public static create(properties?: google.bigtable.v2.IReadRowsRequest): google.bigtable.v2.ReadRowsRequest; + + /** + * Encodes the specified ReadRowsRequest message. Does not implicitly {@link google.bigtable.v2.ReadRowsRequest.verify|verify} messages. + * @param message ReadRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IReadRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadRowsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadRowsRequest.verify|verify} messages. + * @param message ReadRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IReadRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadRowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadRowsRequest + * @throws {Error} If the payload is not 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.ReadRowsRequest; + + /** + * Decodes a ReadRowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadRowsRequest + * @throws {Error} If the payload 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.ReadRowsRequest; + + /** + * Verifies a ReadRowsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadRowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadRowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadRowsRequest; + + /** + * Creates a plain object from a ReadRowsRequest message. Also converts values to other types if specified. + * @param message ReadRowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadRowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadRowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReadRowsRequest { + + /** RequestStatsView enum. */ + enum RequestStatsView { + REQUEST_STATS_VIEW_UNSPECIFIED = 0, + REQUEST_STATS_NONE = 1, + REQUEST_STATS_FULL = 2 + } + } + + /** Properties of a ReadRowsResponse. */ + interface IReadRowsResponse { + + /** ReadRowsResponse chunks */ + chunks?: (google.bigtable.v2.ReadRowsResponse.ICellChunk[]|null); + + /** ReadRowsResponse lastScannedRowKey */ + lastScannedRowKey?: (Uint8Array|Buffer|string|null); + + /** ReadRowsResponse requestStats */ + requestStats?: (google.bigtable.v2.IRequestStats|null); + } + + /** Represents a ReadRowsResponse. */ + class ReadRowsResponse implements IReadRowsResponse { + + /** + * Constructs a new ReadRowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadRowsResponse); + + /** ReadRowsResponse chunks. */ + public chunks: google.bigtable.v2.ReadRowsResponse.ICellChunk[]; + + /** ReadRowsResponse lastScannedRowKey. */ + public lastScannedRowKey: (Uint8Array|Buffer|string); + + /** ReadRowsResponse requestStats. */ + public requestStats?: (google.bigtable.v2.IRequestStats|null); + + /** + * Creates a new ReadRowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadRowsResponse instance + */ + public static create(properties?: google.bigtable.v2.IReadRowsResponse): google.bigtable.v2.ReadRowsResponse; + + /** + * Encodes the specified ReadRowsResponse message. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.verify|verify} messages. + * @param message ReadRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IReadRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadRowsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.verify|verify} messages. + * @param message ReadRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IReadRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadRowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadRowsResponse + * @throws {Error} If the payload is not 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.ReadRowsResponse; + + /** + * Decodes a ReadRowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadRowsResponse + * @throws {Error} If the payload 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.ReadRowsResponse; + + /** + * Verifies a ReadRowsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadRowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadRowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadRowsResponse; + + /** + * Creates a plain object from a ReadRowsResponse message. Also converts values to other types if specified. + * @param message ReadRowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadRowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadRowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReadRowsResponse { + + /** Properties of a CellChunk. */ + interface ICellChunk { + + /** CellChunk rowKey */ + rowKey?: (Uint8Array|Buffer|string|null); + + /** CellChunk familyName */ + familyName?: (google.protobuf.IStringValue|null); + + /** CellChunk qualifier */ + qualifier?: (google.protobuf.IBytesValue|null); + + /** CellChunk timestampMicros */ + timestampMicros?: (number|Long|string|null); + + /** CellChunk labels */ + labels?: (string[]|null); + + /** CellChunk value */ + value?: (Uint8Array|Buffer|string|null); + + /** CellChunk valueSize */ + valueSize?: (number|null); + + /** CellChunk resetRow */ + resetRow?: (boolean|null); + + /** CellChunk commitRow */ + commitRow?: (boolean|null); + } + + /** Represents a CellChunk. */ + class CellChunk implements ICellChunk { + + /** + * Constructs a new CellChunk. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ReadRowsResponse.ICellChunk); + + /** CellChunk rowKey. */ + public rowKey: (Uint8Array|Buffer|string); + + /** CellChunk familyName. */ + public familyName?: (google.protobuf.IStringValue|null); + + /** CellChunk qualifier. */ + public qualifier?: (google.protobuf.IBytesValue|null); + + /** CellChunk timestampMicros. */ + public timestampMicros: (number|Long|string); + + /** CellChunk labels. */ + public labels: string[]; + + /** CellChunk value. */ + public value: (Uint8Array|Buffer|string); + + /** CellChunk valueSize. */ + public valueSize: number; + + /** CellChunk resetRow. */ + public resetRow?: (boolean|null); + + /** CellChunk commitRow. */ + public commitRow?: (boolean|null); + + /** CellChunk rowStatus. */ + public rowStatus?: ("resetRow"|"commitRow"); + + /** + * Creates a new CellChunk instance using the specified properties. + * @param [properties] Properties to set + * @returns CellChunk instance + */ + public static create(properties?: google.bigtable.v2.ReadRowsResponse.ICellChunk): google.bigtable.v2.ReadRowsResponse.CellChunk; + + /** + * Encodes the specified CellChunk message. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.CellChunk.verify|verify} messages. + * @param message CellChunk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ReadRowsResponse.ICellChunk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CellChunk message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.CellChunk.verify|verify} messages. + * @param message CellChunk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ReadRowsResponse.ICellChunk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CellChunk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CellChunk + * @throws {Error} If the payload is not 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.ReadRowsResponse.CellChunk; + + /** + * Decodes a CellChunk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CellChunk + * @throws {Error} If the payload 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.ReadRowsResponse.CellChunk; + + /** + * Verifies a CellChunk message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CellChunk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CellChunk + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadRowsResponse.CellChunk; + + /** + * Creates a plain object from a CellChunk message. Also converts values to other types if specified. + * @param message CellChunk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadRowsResponse.CellChunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CellChunk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CellChunk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SampleRowKeysRequest. */ + interface ISampleRowKeysRequest { + + /** SampleRowKeysRequest tableName */ + tableName?: (string|null); + + /** SampleRowKeysRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** SampleRowKeysRequest materializedViewName */ + materializedViewName?: (string|null); + + /** SampleRowKeysRequest appProfileId */ + appProfileId?: (string|null); + + /** SampleRowKeysRequest rowRange */ + rowRange?: (google.bigtable.v2.IRowRange|null); + } + + /** Represents a SampleRowKeysRequest. */ + class SampleRowKeysRequest implements ISampleRowKeysRequest { + + /** + * Constructs a new SampleRowKeysRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISampleRowKeysRequest); + + /** SampleRowKeysRequest tableName. */ + public tableName: string; + + /** SampleRowKeysRequest authorizedViewName. */ + public authorizedViewName: string; + + /** SampleRowKeysRequest materializedViewName. */ + public materializedViewName: string; + + /** SampleRowKeysRequest appProfileId. */ + public appProfileId: string; + + /** SampleRowKeysRequest rowRange. */ + public rowRange?: (google.bigtable.v2.IRowRange|null); + + /** + * Creates a new SampleRowKeysRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SampleRowKeysRequest instance + */ + public static create(properties?: google.bigtable.v2.ISampleRowKeysRequest): google.bigtable.v2.SampleRowKeysRequest; + + /** + * Encodes the specified SampleRowKeysRequest message. Does not implicitly {@link google.bigtable.v2.SampleRowKeysRequest.verify|verify} messages. + * @param message SampleRowKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISampleRowKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SampleRowKeysRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SampleRowKeysRequest.verify|verify} messages. + * @param message SampleRowKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISampleRowKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SampleRowKeysRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SampleRowKeysRequest + * @throws {Error} If the payload is not 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.SampleRowKeysRequest; + + /** + * Decodes a SampleRowKeysRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SampleRowKeysRequest + * @throws {Error} If the payload 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.SampleRowKeysRequest; + + /** + * Verifies a SampleRowKeysRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SampleRowKeysRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SampleRowKeysRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SampleRowKeysRequest; + + /** + * Creates a plain object from a SampleRowKeysRequest message. Also converts values to other types if specified. + * @param message SampleRowKeysRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SampleRowKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SampleRowKeysRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SampleRowKeysRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SampleRowKeysResponse. */ + interface ISampleRowKeysResponse { + + /** SampleRowKeysResponse rowKey */ + rowKey?: (Uint8Array|Buffer|string|null); + + /** SampleRowKeysResponse offsetBytes */ + offsetBytes?: (number|Long|string|null); + } + + /** Represents a SampleRowKeysResponse. */ + class SampleRowKeysResponse implements ISampleRowKeysResponse { + + /** + * Constructs a new SampleRowKeysResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISampleRowKeysResponse); + + /** SampleRowKeysResponse rowKey. */ + public rowKey: (Uint8Array|Buffer|string); + + /** SampleRowKeysResponse offsetBytes. */ + public offsetBytes: (number|Long|string); + + /** + * Creates a new SampleRowKeysResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SampleRowKeysResponse instance + */ + public static create(properties?: google.bigtable.v2.ISampleRowKeysResponse): google.bigtable.v2.SampleRowKeysResponse; + + /** + * Encodes the specified SampleRowKeysResponse message. Does not implicitly {@link google.bigtable.v2.SampleRowKeysResponse.verify|verify} messages. + * @param message SampleRowKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISampleRowKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SampleRowKeysResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SampleRowKeysResponse.verify|verify} messages. + * @param message SampleRowKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISampleRowKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SampleRowKeysResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SampleRowKeysResponse + * @throws {Error} If the payload is not 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.SampleRowKeysResponse; + + /** + * Decodes a SampleRowKeysResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SampleRowKeysResponse + * @throws {Error} If the payload 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.SampleRowKeysResponse; + + /** + * Verifies a SampleRowKeysResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SampleRowKeysResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SampleRowKeysResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SampleRowKeysResponse; + + /** + * Creates a plain object from a SampleRowKeysResponse message. Also converts values to other types if specified. + * @param message SampleRowKeysResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SampleRowKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SampleRowKeysResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SampleRowKeysResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MutateRowRequest. */ + interface IMutateRowRequest { + + /** MutateRowRequest tableName */ + tableName?: (string|null); + + /** MutateRowRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** MutateRowRequest appProfileId */ + appProfileId?: (string|null); + + /** MutateRowRequest rowKey */ + rowKey?: (Uint8Array|Buffer|string|null); + + /** MutateRowRequest mutations */ + mutations?: (google.bigtable.v2.IMutation[]|null); + + /** MutateRowRequest idempotency */ + idempotency?: (google.bigtable.v2.IIdempotency|null); + } + + /** Represents a MutateRowRequest. */ + class MutateRowRequest implements IMutateRowRequest { + + /** + * Constructs a new MutateRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IMutateRowRequest); + + /** MutateRowRequest tableName. */ + public tableName: string; + + /** MutateRowRequest authorizedViewName. */ + public authorizedViewName: string; + + /** MutateRowRequest appProfileId. */ + public appProfileId: string; + + /** MutateRowRequest rowKey. */ + public rowKey: (Uint8Array|Buffer|string); + + /** MutateRowRequest mutations. */ + public mutations: google.bigtable.v2.IMutation[]; + + /** MutateRowRequest idempotency. */ + public idempotency?: (google.bigtable.v2.IIdempotency|null); + + /** + * Creates a new MutateRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateRowRequest instance + */ + public static create(properties?: google.bigtable.v2.IMutateRowRequest): google.bigtable.v2.MutateRowRequest; + + /** + * Encodes the specified MutateRowRequest message. Does not implicitly {@link google.bigtable.v2.MutateRowRequest.verify|verify} messages. + * @param message MutateRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowRequest.verify|verify} messages. + * @param message MutateRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateRowRequest + * @throws {Error} If the payload is not 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.MutateRowRequest; + + /** + * Decodes a MutateRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateRowRequest + * @throws {Error} If the payload 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.MutateRowRequest; + + /** + * Verifies a MutateRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MutateRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowRequest; + + /** + * Creates a plain object from a MutateRowRequest message. Also converts values to other types if specified. + * @param message MutateRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.MutateRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MutateRowResponse. */ + interface IMutateRowResponse { + } + + /** Represents a MutateRowResponse. */ + class MutateRowResponse implements IMutateRowResponse { + + /** + * Constructs a new MutateRowResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IMutateRowResponse); + + /** + * Creates a new MutateRowResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateRowResponse instance + */ + public static create(properties?: google.bigtable.v2.IMutateRowResponse): google.bigtable.v2.MutateRowResponse; + + /** + * Encodes the specified MutateRowResponse message. Does not implicitly {@link google.bigtable.v2.MutateRowResponse.verify|verify} messages. + * @param message MutateRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowResponse.verify|verify} messages. + * @param message MutateRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateRowResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateRowResponse + * @throws {Error} If the payload is not 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.MutateRowResponse; + + /** + * Decodes a MutateRowResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateRowResponse + * @throws {Error} If the payload 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.MutateRowResponse; + + /** + * Verifies a MutateRowResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MutateRowResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateRowResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowResponse; + + /** + * Creates a plain object from a MutateRowResponse message. Also converts values to other types if specified. + * @param message MutateRowResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.MutateRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateRowResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateRowResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MutateRowsRequest. */ + interface IMutateRowsRequest { + + /** MutateRowsRequest tableName */ + tableName?: (string|null); + + /** MutateRowsRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** MutateRowsRequest appProfileId */ + appProfileId?: (string|null); + + /** MutateRowsRequest entries */ + entries?: (google.bigtable.v2.MutateRowsRequest.IEntry[]|null); + } + + /** Represents a MutateRowsRequest. */ + class MutateRowsRequest implements IMutateRowsRequest { + + /** + * Constructs a new MutateRowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IMutateRowsRequest); + + /** MutateRowsRequest tableName. */ + public tableName: string; + + /** MutateRowsRequest authorizedViewName. */ + public authorizedViewName: string; + + /** MutateRowsRequest appProfileId. */ + public appProfileId: string; + + /** MutateRowsRequest entries. */ + public entries: google.bigtable.v2.MutateRowsRequest.IEntry[]; + + /** + * Creates a new MutateRowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateRowsRequest instance + */ + public static create(properties?: google.bigtable.v2.IMutateRowsRequest): google.bigtable.v2.MutateRowsRequest; + + /** + * Encodes the specified MutateRowsRequest message. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.verify|verify} messages. + * @param message MutateRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IMutateRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateRowsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.verify|verify} messages. + * @param message MutateRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IMutateRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateRowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateRowsRequest + * @throws {Error} If the payload is not 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.MutateRowsRequest; + + /** + * Decodes a MutateRowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateRowsRequest + * @throws {Error} If the payload 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.MutateRowsRequest; + + /** + * Verifies a MutateRowsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MutateRowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateRowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsRequest; + + /** + * Creates a plain object from a MutateRowsRequest message. Also converts values to other types if specified. + * @param message MutateRowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.MutateRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateRowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateRowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MutateRowsRequest { + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry rowKey */ + rowKey?: (Uint8Array|Buffer|string|null); + + /** Entry mutations */ + mutations?: (google.bigtable.v2.IMutation[]|null); + + /** Entry idempotency */ + idempotency?: (google.bigtable.v2.IIdempotency|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.MutateRowsRequest.IEntry); + + /** Entry rowKey. */ + public rowKey: (Uint8Array|Buffer|string); + + /** Entry mutations. */ + public mutations: google.bigtable.v2.IMutation[]; + + /** Entry idempotency. */ + public idempotency?: (google.bigtable.v2.IIdempotency|null); + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.bigtable.v2.MutateRowsRequest.IEntry): google.bigtable.v2.MutateRowsRequest.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.MutateRowsRequest.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.MutateRowsRequest.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not 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.MutateRowsRequest.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload 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.MutateRowsRequest.Entry; + + /** + * Verifies an Entry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsRequest.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.MutateRowsRequest.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a MutateRowsResponse. */ + interface IMutateRowsResponse { + + /** MutateRowsResponse entries */ + entries?: (google.bigtable.v2.MutateRowsResponse.IEntry[]|null); + + /** MutateRowsResponse rateLimitInfo */ + rateLimitInfo?: (google.bigtable.v2.IRateLimitInfo|null); + } + + /** Represents a MutateRowsResponse. */ + class MutateRowsResponse implements IMutateRowsResponse { + + /** + * Constructs a new MutateRowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IMutateRowsResponse); + + /** MutateRowsResponse entries. */ + public entries: google.bigtable.v2.MutateRowsResponse.IEntry[]; + + /** MutateRowsResponse rateLimitInfo. */ + public rateLimitInfo?: (google.bigtable.v2.IRateLimitInfo|null); + + /** + * Creates a new MutateRowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateRowsResponse instance + */ + public static create(properties?: google.bigtable.v2.IMutateRowsResponse): google.bigtable.v2.MutateRowsResponse; + + /** + * Encodes the specified MutateRowsResponse message. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.verify|verify} messages. + * @param message MutateRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IMutateRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateRowsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.verify|verify} messages. + * @param message MutateRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IMutateRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateRowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateRowsResponse + * @throws {Error} If the payload is not 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.MutateRowsResponse; + + /** + * Decodes a MutateRowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateRowsResponse + * @throws {Error} If the payload 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.MutateRowsResponse; + + /** + * Verifies a MutateRowsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MutateRowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateRowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsResponse; + + /** + * Creates a plain object from a MutateRowsResponse message. Also converts values to other types if specified. + * @param message MutateRowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.MutateRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateRowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateRowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MutateRowsResponse { + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry index */ + index?: (number|Long|string|null); + + /** Entry status */ + status?: (google.rpc.IStatus|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.MutateRowsResponse.IEntry); + + /** Entry index. */ + public index: (number|Long|string); + + /** Entry status. */ + public status?: (google.rpc.IStatus|null); + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.bigtable.v2.MutateRowsResponse.IEntry): google.bigtable.v2.MutateRowsResponse.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.MutateRowsResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.MutateRowsResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not 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.MutateRowsResponse.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload 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.MutateRowsResponse.Entry; + + /** + * Verifies an Entry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MutateRowsResponse.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.MutateRowsResponse.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** 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 { + + /** CheckAndMutateRowRequest tableName */ + tableName?: (string|null); + + /** CheckAndMutateRowRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** CheckAndMutateRowRequest appProfileId */ + appProfileId?: (string|null); + + /** CheckAndMutateRowRequest rowKey */ + rowKey?: (Uint8Array|Buffer|string|null); + + /** CheckAndMutateRowRequest predicateFilter */ + predicateFilter?: (google.bigtable.v2.IRowFilter|null); + + /** CheckAndMutateRowRequest trueMutations */ + trueMutations?: (google.bigtable.v2.IMutation[]|null); + + /** CheckAndMutateRowRequest falseMutations */ + falseMutations?: (google.bigtable.v2.IMutation[]|null); + } + + /** Represents a CheckAndMutateRowRequest. */ + class CheckAndMutateRowRequest implements ICheckAndMutateRowRequest { + + /** + * Constructs a new CheckAndMutateRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ICheckAndMutateRowRequest); + + /** CheckAndMutateRowRequest tableName. */ + public tableName: string; + + /** CheckAndMutateRowRequest authorizedViewName. */ + public authorizedViewName: string; + + /** CheckAndMutateRowRequest appProfileId. */ + public appProfileId: string; + + /** CheckAndMutateRowRequest rowKey. */ + public rowKey: (Uint8Array|Buffer|string); + + /** CheckAndMutateRowRequest predicateFilter. */ + public predicateFilter?: (google.bigtable.v2.IRowFilter|null); + + /** CheckAndMutateRowRequest trueMutations. */ + public trueMutations: google.bigtable.v2.IMutation[]; + + /** CheckAndMutateRowRequest falseMutations. */ + public falseMutations: google.bigtable.v2.IMutation[]; + + /** + * Creates a new CheckAndMutateRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckAndMutateRowRequest instance + */ + public static create(properties?: google.bigtable.v2.ICheckAndMutateRowRequest): google.bigtable.v2.CheckAndMutateRowRequest; + + /** + * Encodes the specified CheckAndMutateRowRequest message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. + * @param message CheckAndMutateRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ICheckAndMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckAndMutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. + * @param message CheckAndMutateRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ICheckAndMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckAndMutateRowRequest + * @throws {Error} If the payload is not 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.CheckAndMutateRowRequest; + + /** + * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckAndMutateRowRequest + * @throws {Error} If the payload 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.CheckAndMutateRowRequest; + + /** + * Verifies a CheckAndMutateRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckAndMutateRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckAndMutateRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.CheckAndMutateRowRequest; + + /** + * Creates a plain object from a CheckAndMutateRowRequest message. Also converts values to other types if specified. + * @param message CheckAndMutateRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.CheckAndMutateRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckAndMutateRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckAndMutateRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckAndMutateRowResponse. */ + interface ICheckAndMutateRowResponse { + + /** CheckAndMutateRowResponse predicateMatched */ + predicateMatched?: (boolean|null); + } + + /** Represents a CheckAndMutateRowResponse. */ + class CheckAndMutateRowResponse implements ICheckAndMutateRowResponse { + + /** + * Constructs a new CheckAndMutateRowResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ICheckAndMutateRowResponse); + + /** CheckAndMutateRowResponse predicateMatched. */ + public predicateMatched: boolean; + + /** + * Creates a new CheckAndMutateRowResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckAndMutateRowResponse instance + */ + public static create(properties?: google.bigtable.v2.ICheckAndMutateRowResponse): google.bigtable.v2.CheckAndMutateRowResponse; + + /** + * Encodes the specified CheckAndMutateRowResponse message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowResponse.verify|verify} messages. + * @param message CheckAndMutateRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ICheckAndMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckAndMutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowResponse.verify|verify} messages. + * @param message CheckAndMutateRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ICheckAndMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckAndMutateRowResponse + * @throws {Error} If the payload is not 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.CheckAndMutateRowResponse; + + /** + * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckAndMutateRowResponse + * @throws {Error} If the payload 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.CheckAndMutateRowResponse; + + /** + * Verifies a CheckAndMutateRowResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckAndMutateRowResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckAndMutateRowResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.CheckAndMutateRowResponse; + + /** + * Creates a plain object from a CheckAndMutateRowResponse message. Also converts values to other types if specified. + * @param message CheckAndMutateRowResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.CheckAndMutateRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckAndMutateRowResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckAndMutateRowResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingAndWarmRequest. */ + interface IPingAndWarmRequest { + + /** PingAndWarmRequest name */ + name?: (string|null); + + /** PingAndWarmRequest appProfileId */ + appProfileId?: (string|null); + } + + /** Represents a PingAndWarmRequest. */ + class PingAndWarmRequest implements IPingAndWarmRequest { + + /** + * Constructs a new PingAndWarmRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPingAndWarmRequest); + + /** PingAndWarmRequest name. */ + public name: string; + + /** PingAndWarmRequest appProfileId. */ + public appProfileId: string; + + /** + * Creates a new PingAndWarmRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PingAndWarmRequest instance + */ + public static create(properties?: google.bigtable.v2.IPingAndWarmRequest): google.bigtable.v2.PingAndWarmRequest; + + /** + * Encodes the specified PingAndWarmRequest message. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * @param message PingAndWarmRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPingAndWarmRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingAndWarmRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * @param message PingAndWarmRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPingAndWarmRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingAndWarmRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingAndWarmRequest + * @throws {Error} If the payload is not 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.PingAndWarmRequest; + + /** + * Decodes a PingAndWarmRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingAndWarmRequest + * @throws {Error} If the payload 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.PingAndWarmRequest; + + /** + * Verifies a PingAndWarmRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingAndWarmRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingAndWarmRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PingAndWarmRequest; + + /** + * Creates a plain object from a PingAndWarmRequest message. Also converts values to other types if specified. + * @param message PingAndWarmRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PingAndWarmRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingAndWarmRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingAndWarmRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingAndWarmResponse. */ + interface IPingAndWarmResponse { + } + + /** Represents a PingAndWarmResponse. */ + class PingAndWarmResponse implements IPingAndWarmResponse { + + /** + * Constructs a new PingAndWarmResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPingAndWarmResponse); + + /** + * Creates a new PingAndWarmResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PingAndWarmResponse instance + */ + public static create(properties?: google.bigtable.v2.IPingAndWarmResponse): google.bigtable.v2.PingAndWarmResponse; + + /** + * Encodes the specified PingAndWarmResponse message. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. + * @param message PingAndWarmResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPingAndWarmResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingAndWarmResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. + * @param message PingAndWarmResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPingAndWarmResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingAndWarmResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingAndWarmResponse + * @throws {Error} If the payload is not 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.PingAndWarmResponse; + + /** + * Decodes a PingAndWarmResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingAndWarmResponse + * @throws {Error} If the payload 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.PingAndWarmResponse; + + /** + * Verifies a PingAndWarmResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingAndWarmResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingAndWarmResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PingAndWarmResponse; + + /** + * Creates a plain object from a PingAndWarmResponse message. Also converts values to other types if specified. + * @param message PingAndWarmResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PingAndWarmResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingAndWarmResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingAndWarmResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadModifyWriteRowRequest. */ + interface IReadModifyWriteRowRequest { + + /** ReadModifyWriteRowRequest tableName */ + tableName?: (string|null); + + /** ReadModifyWriteRowRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** ReadModifyWriteRowRequest appProfileId */ + appProfileId?: (string|null); + + /** ReadModifyWriteRowRequest rowKey */ + rowKey?: (Uint8Array|Buffer|string|null); + + /** ReadModifyWriteRowRequest rules */ + rules?: (google.bigtable.v2.IReadModifyWriteRule[]|null); + } + + /** Represents a ReadModifyWriteRowRequest. */ + class ReadModifyWriteRowRequest implements IReadModifyWriteRowRequest { + + /** + * Constructs a new ReadModifyWriteRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadModifyWriteRowRequest); + + /** ReadModifyWriteRowRequest tableName. */ + public tableName: string; + + /** ReadModifyWriteRowRequest authorizedViewName. */ + public authorizedViewName: string; + + /** ReadModifyWriteRowRequest appProfileId. */ + public appProfileId: string; + + /** ReadModifyWriteRowRequest rowKey. */ + public rowKey: (Uint8Array|Buffer|string); + + /** ReadModifyWriteRowRequest rules. */ + public rules: google.bigtable.v2.IReadModifyWriteRule[]; + + /** + * Creates a new ReadModifyWriteRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadModifyWriteRowRequest instance + */ + public static create(properties?: google.bigtable.v2.IReadModifyWriteRowRequest): google.bigtable.v2.ReadModifyWriteRowRequest; + + /** + * Encodes the specified ReadModifyWriteRowRequest message. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowRequest.verify|verify} messages. + * @param message ReadModifyWriteRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IReadModifyWriteRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadModifyWriteRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowRequest.verify|verify} messages. + * @param message ReadModifyWriteRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IReadModifyWriteRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadModifyWriteRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadModifyWriteRowRequest + * @throws {Error} If the payload is not 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.ReadModifyWriteRowRequest; + + /** + * Decodes a ReadModifyWriteRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadModifyWriteRowRequest + * @throws {Error} If the payload 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.ReadModifyWriteRowRequest; + + /** + * Verifies a ReadModifyWriteRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadModifyWriteRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadModifyWriteRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadModifyWriteRowRequest; + + /** + * Creates a plain object from a ReadModifyWriteRowRequest message. Also converts values to other types if specified. + * @param message ReadModifyWriteRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadModifyWriteRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadModifyWriteRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadModifyWriteRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadModifyWriteRowResponse. */ + interface IReadModifyWriteRowResponse { + + /** ReadModifyWriteRowResponse row */ + row?: (google.bigtable.v2.IRow|null); + } + + /** Represents a ReadModifyWriteRowResponse. */ + class ReadModifyWriteRowResponse implements IReadModifyWriteRowResponse { + + /** + * Constructs a new ReadModifyWriteRowResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadModifyWriteRowResponse); + + /** ReadModifyWriteRowResponse row. */ + public row?: (google.bigtable.v2.IRow|null); + + /** + * Creates a new ReadModifyWriteRowResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadModifyWriteRowResponse instance + */ + public static create(properties?: google.bigtable.v2.IReadModifyWriteRowResponse): google.bigtable.v2.ReadModifyWriteRowResponse; + + /** + * Encodes the specified ReadModifyWriteRowResponse message. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowResponse.verify|verify} messages. + * @param message ReadModifyWriteRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IReadModifyWriteRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadModifyWriteRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowResponse.verify|verify} messages. + * @param message ReadModifyWriteRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IReadModifyWriteRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadModifyWriteRowResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadModifyWriteRowResponse + * @throws {Error} If the payload is not 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.ReadModifyWriteRowResponse; + + /** + * Decodes a ReadModifyWriteRowResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadModifyWriteRowResponse + * @throws {Error} If the payload 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.ReadModifyWriteRowResponse; + + /** + * Verifies a ReadModifyWriteRowResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadModifyWriteRowResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadModifyWriteRowResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadModifyWriteRowResponse; + + /** + * Creates a plain object from a ReadModifyWriteRowResponse message. Also converts values to other types if specified. + * @param message ReadModifyWriteRowResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadModifyWriteRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadModifyWriteRowResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadModifyWriteRowResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateInitialChangeStreamPartitionsRequest. */ + interface IGenerateInitialChangeStreamPartitionsRequest { + + /** GenerateInitialChangeStreamPartitionsRequest tableName */ + tableName?: (string|null); + + /** GenerateInitialChangeStreamPartitionsRequest appProfileId */ + appProfileId?: (string|null); + } + + /** Represents a GenerateInitialChangeStreamPartitionsRequest. */ + class GenerateInitialChangeStreamPartitionsRequest implements IGenerateInitialChangeStreamPartitionsRequest { + + /** + * Constructs a new GenerateInitialChangeStreamPartitionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest); + + /** GenerateInitialChangeStreamPartitionsRequest tableName. */ + public tableName: string; + + /** GenerateInitialChangeStreamPartitionsRequest appProfileId. */ + public appProfileId: string; + + /** + * Creates a new GenerateInitialChangeStreamPartitionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateInitialChangeStreamPartitionsRequest instance + */ + public static create(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest): google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; + + /** + * Encodes the specified GenerateInitialChangeStreamPartitionsRequest message. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.verify|verify} messages. + * @param message GenerateInitialChangeStreamPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateInitialChangeStreamPartitionsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.verify|verify} messages. + * @param message GenerateInitialChangeStreamPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateInitialChangeStreamPartitionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateInitialChangeStreamPartitionsRequest + * @throws {Error} If the payload is not 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.GenerateInitialChangeStreamPartitionsRequest; + + /** + * Decodes a GenerateInitialChangeStreamPartitionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateInitialChangeStreamPartitionsRequest + * @throws {Error} If the payload 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.GenerateInitialChangeStreamPartitionsRequest; + + /** + * Verifies a GenerateInitialChangeStreamPartitionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateInitialChangeStreamPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateInitialChangeStreamPartitionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; + + /** + * Creates a plain object from a GenerateInitialChangeStreamPartitionsRequest message. Also converts values to other types if specified. + * @param message GenerateInitialChangeStreamPartitionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateInitialChangeStreamPartitionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateInitialChangeStreamPartitionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateInitialChangeStreamPartitionsResponse. */ + interface IGenerateInitialChangeStreamPartitionsResponse { + + /** GenerateInitialChangeStreamPartitionsResponse partition */ + partition?: (google.bigtable.v2.IStreamPartition|null); + } + + /** Represents a GenerateInitialChangeStreamPartitionsResponse. */ + class GenerateInitialChangeStreamPartitionsResponse implements IGenerateInitialChangeStreamPartitionsResponse { + + /** + * Constructs a new GenerateInitialChangeStreamPartitionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse); + + /** GenerateInitialChangeStreamPartitionsResponse partition. */ + public partition?: (google.bigtable.v2.IStreamPartition|null); + + /** + * Creates a new GenerateInitialChangeStreamPartitionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateInitialChangeStreamPartitionsResponse instance + */ + public static create(properties?: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse): google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; + + /** + * Encodes the specified GenerateInitialChangeStreamPartitionsResponse message. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.verify|verify} messages. + * @param message GenerateInitialChangeStreamPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateInitialChangeStreamPartitionsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.verify|verify} messages. + * @param message GenerateInitialChangeStreamPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateInitialChangeStreamPartitionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateInitialChangeStreamPartitionsResponse + * @throws {Error} If the payload is not 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.GenerateInitialChangeStreamPartitionsResponse; + + /** + * Decodes a GenerateInitialChangeStreamPartitionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateInitialChangeStreamPartitionsResponse + * @throws {Error} If the payload 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.GenerateInitialChangeStreamPartitionsResponse; + + /** + * Verifies a GenerateInitialChangeStreamPartitionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateInitialChangeStreamPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateInitialChangeStreamPartitionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; + + /** + * Creates a plain object from a GenerateInitialChangeStreamPartitionsResponse message. Also converts values to other types if specified. + * @param message GenerateInitialChangeStreamPartitionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateInitialChangeStreamPartitionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateInitialChangeStreamPartitionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadChangeStreamRequest. */ + interface IReadChangeStreamRequest { + + /** ReadChangeStreamRequest tableName */ + tableName?: (string|null); + + /** ReadChangeStreamRequest appProfileId */ + appProfileId?: (string|null); + + /** ReadChangeStreamRequest partition */ + partition?: (google.bigtable.v2.IStreamPartition|null); + + /** ReadChangeStreamRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** ReadChangeStreamRequest continuationTokens */ + continuationTokens?: (google.bigtable.v2.IStreamContinuationTokens|null); + + /** ReadChangeStreamRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** ReadChangeStreamRequest heartbeatDuration */ + heartbeatDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a ReadChangeStreamRequest. */ + class ReadChangeStreamRequest implements IReadChangeStreamRequest { + + /** + * Constructs a new ReadChangeStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadChangeStreamRequest); + + /** ReadChangeStreamRequest tableName. */ + public tableName: string; + + /** ReadChangeStreamRequest appProfileId. */ + public appProfileId: string; + + /** ReadChangeStreamRequest partition. */ + public partition?: (google.bigtable.v2.IStreamPartition|null); + + /** ReadChangeStreamRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** ReadChangeStreamRequest continuationTokens. */ + public continuationTokens?: (google.bigtable.v2.IStreamContinuationTokens|null); + + /** ReadChangeStreamRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** ReadChangeStreamRequest heartbeatDuration. */ + public heartbeatDuration?: (google.protobuf.IDuration|null); + + /** ReadChangeStreamRequest startFrom. */ + public startFrom?: ("startTime"|"continuationTokens"); + + /** + * Creates a new ReadChangeStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadChangeStreamRequest instance + */ + public static create(properties?: google.bigtable.v2.IReadChangeStreamRequest): google.bigtable.v2.ReadChangeStreamRequest; + + /** + * Encodes the specified ReadChangeStreamRequest message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamRequest.verify|verify} messages. + * @param message ReadChangeStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IReadChangeStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadChangeStreamRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamRequest.verify|verify} messages. + * @param message ReadChangeStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IReadChangeStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadChangeStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadChangeStreamRequest + * @throws {Error} If the payload is not 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.ReadChangeStreamRequest; + + /** + * Decodes a ReadChangeStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadChangeStreamRequest + * @throws {Error} If the payload 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.ReadChangeStreamRequest; + + /** + * Verifies a ReadChangeStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadChangeStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadChangeStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamRequest; + + /** + * Creates a plain object from a ReadChangeStreamRequest message. Also converts values to other types if specified. + * @param message ReadChangeStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadChangeStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadChangeStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadChangeStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadChangeStreamResponse. */ + interface IReadChangeStreamResponse { + + /** ReadChangeStreamResponse dataChange */ + dataChange?: (google.bigtable.v2.ReadChangeStreamResponse.IDataChange|null); + + /** ReadChangeStreamResponse heartbeat */ + heartbeat?: (google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat|null); + + /** ReadChangeStreamResponse closeStream */ + closeStream?: (google.bigtable.v2.ReadChangeStreamResponse.ICloseStream|null); + } + + /** Represents a ReadChangeStreamResponse. */ + class ReadChangeStreamResponse implements IReadChangeStreamResponse { + + /** + * Constructs a new ReadChangeStreamResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadChangeStreamResponse); + + /** ReadChangeStreamResponse dataChange. */ + public dataChange?: (google.bigtable.v2.ReadChangeStreamResponse.IDataChange|null); + + /** ReadChangeStreamResponse heartbeat. */ + public heartbeat?: (google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat|null); + + /** ReadChangeStreamResponse closeStream. */ + public closeStream?: (google.bigtable.v2.ReadChangeStreamResponse.ICloseStream|null); + + /** ReadChangeStreamResponse streamRecord. */ + public streamRecord?: ("dataChange"|"heartbeat"|"closeStream"); + + /** + * Creates a new ReadChangeStreamResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadChangeStreamResponse instance + */ + public static create(properties?: google.bigtable.v2.IReadChangeStreamResponse): google.bigtable.v2.ReadChangeStreamResponse; + + /** + * Encodes the specified ReadChangeStreamResponse message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.verify|verify} messages. + * @param message ReadChangeStreamResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IReadChangeStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadChangeStreamResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.verify|verify} messages. + * @param message ReadChangeStreamResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IReadChangeStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadChangeStreamResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadChangeStreamResponse + * @throws {Error} If the payload is not 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.ReadChangeStreamResponse; + + /** + * Decodes a ReadChangeStreamResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadChangeStreamResponse + * @throws {Error} If the payload 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.ReadChangeStreamResponse; + + /** + * Verifies a ReadChangeStreamResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadChangeStreamResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadChangeStreamResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamResponse; + + /** + * Creates a plain object from a ReadChangeStreamResponse message. Also converts values to other types if specified. + * @param message ReadChangeStreamResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadChangeStreamResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadChangeStreamResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadChangeStreamResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReadChangeStreamResponse { + + /** Properties of a MutationChunk. */ + interface IMutationChunk { + + /** MutationChunk chunkInfo */ + chunkInfo?: (google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo|null); + + /** MutationChunk mutation */ + mutation?: (google.bigtable.v2.IMutation|null); + } + + /** Represents a MutationChunk. */ + class MutationChunk implements IMutationChunk { + + /** + * Constructs a new MutationChunk. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk); + + /** MutationChunk chunkInfo. */ + public chunkInfo?: (google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo|null); + + /** MutationChunk mutation. */ + public mutation?: (google.bigtable.v2.IMutation|null); + + /** + * Creates a new MutationChunk instance using the specified properties. + * @param [properties] Properties to set + * @returns MutationChunk instance + */ + public static create(properties?: google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk): google.bigtable.v2.ReadChangeStreamResponse.MutationChunk; + + /** + * Encodes the specified MutationChunk message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.verify|verify} messages. + * @param message MutationChunk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutationChunk message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.verify|verify} messages. + * @param message MutationChunk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutationChunk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutationChunk + * @throws {Error} If the payload is not 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.ReadChangeStreamResponse.MutationChunk; + + /** + * Decodes a MutationChunk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutationChunk + * @throws {Error} If the payload 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.ReadChangeStreamResponse.MutationChunk; + + /** + * Verifies a MutationChunk message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MutationChunk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutationChunk + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamResponse.MutationChunk; + + /** + * Creates a plain object from a MutationChunk message. Also converts values to other types if specified. + * @param message MutationChunk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadChangeStreamResponse.MutationChunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutationChunk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutationChunk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MutationChunk { + + /** Properties of a ChunkInfo. */ + interface IChunkInfo { + + /** ChunkInfo chunkedValueSize */ + chunkedValueSize?: (number|null); + + /** ChunkInfo chunkedValueOffset */ + chunkedValueOffset?: (number|null); + + /** ChunkInfo lastChunk */ + lastChunk?: (boolean|null); + } + + /** Represents a ChunkInfo. */ + class ChunkInfo implements IChunkInfo { + + /** + * Constructs a new ChunkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo); + + /** ChunkInfo chunkedValueSize. */ + public chunkedValueSize: number; + + /** ChunkInfo chunkedValueOffset. */ + public chunkedValueOffset: number; + + /** ChunkInfo lastChunk. */ + public lastChunk: boolean; + + /** + * Creates a new ChunkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ChunkInfo instance + */ + public static create(properties?: google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo): google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo; + + /** + * Encodes the specified ChunkInfo message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify|verify} messages. + * @param message ChunkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChunkInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify|verify} messages. + * @param message ChunkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChunkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChunkInfo + * @throws {Error} If the payload is not 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.ReadChangeStreamResponse.MutationChunk.ChunkInfo; + + /** + * Decodes a ChunkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChunkInfo + * @throws {Error} If the payload 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.ReadChangeStreamResponse.MutationChunk.ChunkInfo; + + /** + * Verifies a ChunkInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChunkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChunkInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo; + + /** + * Creates a plain object from a ChunkInfo message. Also converts values to other types if specified. + * @param message ChunkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChunkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChunkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataChange. */ + interface IDataChange { + + /** DataChange type */ + type?: (google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type|keyof typeof google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type|null); + + /** DataChange sourceClusterId */ + sourceClusterId?: (string|null); + + /** DataChange rowKey */ + rowKey?: (Uint8Array|Buffer|string|null); + + /** DataChange commitTimestamp */ + commitTimestamp?: (google.protobuf.ITimestamp|null); + + /** DataChange tiebreaker */ + tiebreaker?: (number|null); + + /** DataChange chunks */ + chunks?: (google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk[]|null); + + /** DataChange done */ + done?: (boolean|null); + + /** DataChange token */ + token?: (string|null); + + /** DataChange estimatedLowWatermark */ + estimatedLowWatermark?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DataChange. */ + class DataChange implements IDataChange { + + /** + * Constructs a new DataChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.IDataChange); + + /** DataChange type. */ + public type: (google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type|keyof typeof google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type); + + /** DataChange sourceClusterId. */ + public sourceClusterId: string; + + /** DataChange rowKey. */ + public rowKey: (Uint8Array|Buffer|string); + + /** DataChange commitTimestamp. */ + public commitTimestamp?: (google.protobuf.ITimestamp|null); + + /** DataChange tiebreaker. */ + public tiebreaker: number; + + /** DataChange chunks. */ + public chunks: google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk[]; + + /** DataChange done. */ + public done: boolean; + + /** DataChange token. */ + public token: string; + + /** DataChange estimatedLowWatermark. */ + public estimatedLowWatermark?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new DataChange instance using the specified properties. + * @param [properties] Properties to set + * @returns DataChange instance + */ + public static create(properties?: google.bigtable.v2.ReadChangeStreamResponse.IDataChange): google.bigtable.v2.ReadChangeStreamResponse.DataChange; + + /** + * Encodes the specified DataChange message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify|verify} messages. + * @param message DataChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ReadChangeStreamResponse.IDataChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataChange message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify|verify} messages. + * @param message DataChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ReadChangeStreamResponse.IDataChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataChange + * @throws {Error} If the payload is not 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.ReadChangeStreamResponse.DataChange; + + /** + * Decodes a DataChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataChange + * @throws {Error} If the payload 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.ReadChangeStreamResponse.DataChange; + + /** + * Verifies a DataChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataChange + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamResponse.DataChange; + + /** + * Creates a plain object from a DataChange message. Also converts values to other types if specified. + * @param message DataChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadChangeStreamResponse.DataChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataChange { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + USER = 1, + GARBAGE_COLLECTION = 2, + CONTINUATION = 3 + } + } + + /** Properties of a Heartbeat. */ + interface IHeartbeat { + + /** Heartbeat continuationToken */ + continuationToken?: (google.bigtable.v2.IStreamContinuationToken|null); + + /** Heartbeat estimatedLowWatermark */ + estimatedLowWatermark?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Heartbeat. */ + class Heartbeat implements IHeartbeat { + + /** + * Constructs a new Heartbeat. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat); + + /** Heartbeat continuationToken. */ + public continuationToken?: (google.bigtable.v2.IStreamContinuationToken|null); + + /** Heartbeat estimatedLowWatermark. */ + public estimatedLowWatermark?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Heartbeat instance using the specified properties. + * @param [properties] Properties to set + * @returns Heartbeat instance + */ + public static create(properties?: google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat): google.bigtable.v2.ReadChangeStreamResponse.Heartbeat; + + /** + * Encodes the specified Heartbeat message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify|verify} messages. + * @param message Heartbeat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Heartbeat message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify|verify} messages. + * @param message Heartbeat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Heartbeat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Heartbeat + * @throws {Error} If the payload is not 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.ReadChangeStreamResponse.Heartbeat; + + /** + * Decodes a Heartbeat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Heartbeat + * @throws {Error} If the payload 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.ReadChangeStreamResponse.Heartbeat; + + /** + * Verifies a Heartbeat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Heartbeat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Heartbeat + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamResponse.Heartbeat; + + /** + * Creates a plain object from a Heartbeat message. Also converts values to other types if specified. + * @param message Heartbeat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadChangeStreamResponse.Heartbeat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Heartbeat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Heartbeat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloseStream. */ + interface ICloseStream { + + /** CloseStream status */ + status?: (google.rpc.IStatus|null); + + /** CloseStream continuationTokens */ + continuationTokens?: (google.bigtable.v2.IStreamContinuationToken[]|null); + + /** CloseStream newPartitions */ + newPartitions?: (google.bigtable.v2.IStreamPartition[]|null); + } + + /** Represents a CloseStream. */ + class CloseStream implements ICloseStream { + + /** + * Constructs a new CloseStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ReadChangeStreamResponse.ICloseStream); + + /** CloseStream status. */ + public status?: (google.rpc.IStatus|null); + + /** CloseStream continuationTokens. */ + public continuationTokens: google.bigtable.v2.IStreamContinuationToken[]; + + /** CloseStream newPartitions. */ + public newPartitions: google.bigtable.v2.IStreamPartition[]; + + /** + * Creates a new CloseStream instance using the specified properties. + * @param [properties] Properties to set + * @returns CloseStream instance + */ + public static create(properties?: google.bigtable.v2.ReadChangeStreamResponse.ICloseStream): google.bigtable.v2.ReadChangeStreamResponse.CloseStream; + + /** + * Encodes the specified CloseStream message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify|verify} messages. + * @param message CloseStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ReadChangeStreamResponse.ICloseStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloseStream message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify|verify} messages. + * @param message CloseStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ReadChangeStreamResponse.ICloseStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloseStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloseStream + * @throws {Error} If the payload is not 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.ReadChangeStreamResponse.CloseStream; + + /** + * Decodes a CloseStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloseStream + * @throws {Error} If the payload 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.ReadChangeStreamResponse.CloseStream; + + /** + * Verifies a CloseStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloseStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloseStream + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadChangeStreamResponse.CloseStream; + + /** + * Creates a plain object from a CloseStream message. Also converts values to other types if specified. + * @param message CloseStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadChangeStreamResponse.CloseStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloseStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloseStream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExecuteQueryRequest. */ + interface IExecuteQueryRequest { + + /** ExecuteQueryRequest instanceName */ + instanceName?: (string|null); + + /** ExecuteQueryRequest appProfileId */ + appProfileId?: (string|null); + + /** ExecuteQueryRequest query */ + query?: (string|null); + + /** ExecuteQueryRequest preparedQuery */ + preparedQuery?: (Uint8Array|Buffer|string|null); + + /** ExecuteQueryRequest protoFormat */ + protoFormat?: (google.bigtable.v2.IProtoFormat|null); + + /** ExecuteQueryRequest resumeToken */ + resumeToken?: (Uint8Array|Buffer|string|null); + + /** ExecuteQueryRequest params */ + params?: ({ [k: string]: google.bigtable.v2.IValue }|null); + + /** ExecuteQueryRequest viewParameters */ + viewParameters?: ({ [k: string]: google.bigtable.v2.IValue }|null); + } + + /** Represents an ExecuteQueryRequest. */ + class ExecuteQueryRequest implements IExecuteQueryRequest { + + /** + * Constructs a new ExecuteQueryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IExecuteQueryRequest); + + /** ExecuteQueryRequest instanceName. */ + public instanceName: string; + + /** ExecuteQueryRequest appProfileId. */ + public appProfileId: string; + + /** ExecuteQueryRequest query. */ + public query: string; + + /** ExecuteQueryRequest preparedQuery. */ + public preparedQuery: (Uint8Array|Buffer|string); + + /** ExecuteQueryRequest protoFormat. */ + public protoFormat?: (google.bigtable.v2.IProtoFormat|null); + + /** ExecuteQueryRequest resumeToken. */ + public resumeToken: (Uint8Array|Buffer|string); + + /** ExecuteQueryRequest params. */ + public params: { [k: string]: google.bigtable.v2.IValue }; + + /** ExecuteQueryRequest viewParameters. */ + public viewParameters: { [k: string]: google.bigtable.v2.IValue }; + + /** ExecuteQueryRequest dataFormat. */ + public dataFormat?: "protoFormat"; + + /** + * Creates a new ExecuteQueryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteQueryRequest instance + */ + public static create(properties?: google.bigtable.v2.IExecuteQueryRequest): google.bigtable.v2.ExecuteQueryRequest; + + /** + * Encodes the specified ExecuteQueryRequest message. Does not implicitly {@link google.bigtable.v2.ExecuteQueryRequest.verify|verify} messages. + * @param message ExecuteQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IExecuteQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteQueryRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ExecuteQueryRequest.verify|verify} messages. + * @param message ExecuteQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IExecuteQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteQueryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteQueryRequest + * @throws {Error} If the payload is not 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.ExecuteQueryRequest; + + /** + * Decodes an ExecuteQueryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteQueryRequest + * @throws {Error} If the payload 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.ExecuteQueryRequest; + + /** + * Verifies an ExecuteQueryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecuteQueryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteQueryRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ExecuteQueryRequest; + + /** + * Creates a plain object from an ExecuteQueryRequest message. Also converts values to other types if specified. + * @param message ExecuteQueryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ExecuteQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteQueryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteQueryResponse. */ + interface IExecuteQueryResponse { + + /** ExecuteQueryResponse metadata */ + metadata?: (google.bigtable.v2.IResultSetMetadata|null); + + /** ExecuteQueryResponse results */ + results?: (google.bigtable.v2.IPartialResultSet|null); + } + + /** Represents an ExecuteQueryResponse. */ + class ExecuteQueryResponse implements IExecuteQueryResponse { + + /** + * Constructs a new ExecuteQueryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IExecuteQueryResponse); + + /** ExecuteQueryResponse metadata. */ + public metadata?: (google.bigtable.v2.IResultSetMetadata|null); + + /** ExecuteQueryResponse results. */ + public results?: (google.bigtable.v2.IPartialResultSet|null); + + /** ExecuteQueryResponse response. */ + public response?: ("metadata"|"results"); + + /** + * Creates a new ExecuteQueryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteQueryResponse instance + */ + public static create(properties?: google.bigtable.v2.IExecuteQueryResponse): google.bigtable.v2.ExecuteQueryResponse; + + /** + * Encodes the specified ExecuteQueryResponse message. Does not implicitly {@link google.bigtable.v2.ExecuteQueryResponse.verify|verify} messages. + * @param message ExecuteQueryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IExecuteQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteQueryResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ExecuteQueryResponse.verify|verify} messages. + * @param message ExecuteQueryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IExecuteQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteQueryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteQueryResponse + * @throws {Error} If the payload is not 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.ExecuteQueryResponse; + + /** + * Decodes an ExecuteQueryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteQueryResponse + * @throws {Error} If the payload 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.ExecuteQueryResponse; + + /** + * Verifies an ExecuteQueryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecuteQueryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteQueryResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ExecuteQueryResponse; + + /** + * Creates a plain object from an ExecuteQueryResponse message. Also converts values to other types if specified. + * @param message ExecuteQueryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ExecuteQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteQueryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrepareQueryRequest. */ + interface IPrepareQueryRequest { + + /** PrepareQueryRequest instanceName */ + instanceName?: (string|null); + + /** PrepareQueryRequest appProfileId */ + appProfileId?: (string|null); + + /** PrepareQueryRequest query */ + query?: (string|null); + + /** PrepareQueryRequest protoFormat */ + protoFormat?: (google.bigtable.v2.IProtoFormat|null); + + /** PrepareQueryRequest paramTypes */ + paramTypes?: ({ [k: string]: google.bigtable.v2.IType }|null); + } + + /** Represents a PrepareQueryRequest. */ + class PrepareQueryRequest implements IPrepareQueryRequest { + + /** + * Constructs a new PrepareQueryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPrepareQueryRequest); + + /** PrepareQueryRequest instanceName. */ + public instanceName: string; + + /** PrepareQueryRequest appProfileId. */ + public appProfileId: string; + + /** PrepareQueryRequest query. */ + public query: string; + + /** PrepareQueryRequest protoFormat. */ + public protoFormat?: (google.bigtable.v2.IProtoFormat|null); + + /** PrepareQueryRequest paramTypes. */ + public paramTypes: { [k: string]: google.bigtable.v2.IType }; + + /** PrepareQueryRequest dataFormat. */ + public dataFormat?: "protoFormat"; + + /** + * Creates a new PrepareQueryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PrepareQueryRequest instance + */ + public static create(properties?: google.bigtable.v2.IPrepareQueryRequest): google.bigtable.v2.PrepareQueryRequest; + + /** + * Encodes the specified PrepareQueryRequest message. Does not implicitly {@link google.bigtable.v2.PrepareQueryRequest.verify|verify} messages. + * @param message PrepareQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPrepareQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrepareQueryRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.PrepareQueryRequest.verify|verify} messages. + * @param message PrepareQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPrepareQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrepareQueryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrepareQueryRequest + * @throws {Error} If the payload is not 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.PrepareQueryRequest; + + /** + * Decodes a PrepareQueryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrepareQueryRequest + * @throws {Error} If the payload 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.PrepareQueryRequest; + + /** + * Verifies a PrepareQueryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrepareQueryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrepareQueryRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PrepareQueryRequest; + + /** + * Creates a plain object from a PrepareQueryRequest message. Also converts values to other types if specified. + * @param message PrepareQueryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PrepareQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrepareQueryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrepareQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrepareQueryResponse. */ + interface IPrepareQueryResponse { + + /** PrepareQueryResponse metadata */ + metadata?: (google.bigtable.v2.IResultSetMetadata|null); + + /** PrepareQueryResponse preparedQuery */ + preparedQuery?: (Uint8Array|Buffer|string|null); + + /** PrepareQueryResponse validUntil */ + validUntil?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PrepareQueryResponse. */ + class PrepareQueryResponse implements IPrepareQueryResponse { + + /** + * Constructs a new PrepareQueryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPrepareQueryResponse); + + /** PrepareQueryResponse metadata. */ + public metadata?: (google.bigtable.v2.IResultSetMetadata|null); + + /** PrepareQueryResponse preparedQuery. */ + public preparedQuery: (Uint8Array|Buffer|string); + + /** PrepareQueryResponse validUntil. */ + public validUntil?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new PrepareQueryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PrepareQueryResponse instance + */ + public static create(properties?: google.bigtable.v2.IPrepareQueryResponse): google.bigtable.v2.PrepareQueryResponse; + + /** + * Encodes the specified PrepareQueryResponse message. Does not implicitly {@link google.bigtable.v2.PrepareQueryResponse.verify|verify} messages. + * @param message PrepareQueryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPrepareQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrepareQueryResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.PrepareQueryResponse.verify|verify} messages. + * @param message PrepareQueryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPrepareQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrepareQueryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrepareQueryResponse + * @throws {Error} If the payload is not 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.PrepareQueryResponse; + + /** + * Decodes a PrepareQueryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrepareQueryResponse + * @throws {Error} If the payload 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.PrepareQueryResponse; + + /** + * Verifies a PrepareQueryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrepareQueryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrepareQueryResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PrepareQueryResponse; + + /** + * Creates a plain object from a PrepareQueryResponse message. Also converts values to other types if specified. + * @param message PrepareQueryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PrepareQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrepareQueryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrepareQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Row. */ + interface IRow { + + /** Row key */ + key?: (Uint8Array|Buffer|string|null); + + /** Row families */ + families?: (google.bigtable.v2.IFamily[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IRow); + + /** Row key. */ + public key: (Uint8Array|Buffer|string); + + /** Row families. */ + public families: google.bigtable.v2.IFamily[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.bigtable.v2.IRow): google.bigtable.v2.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.bigtable.v2.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.bigtable.v2.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @throws {Error} If the payload is not 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.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @throws {Error} If the payload 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.Row; + + /** + * Verifies a Row message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Family. */ + interface IFamily { + + /** Family name */ + name?: (string|null); + + /** Family columns */ + columns?: (google.bigtable.v2.IColumn[]|null); + } + + /** Represents a Family. */ + class Family implements IFamily { + + /** + * Constructs a new Family. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IFamily); + + /** Family name. */ + public name: string; + + /** Family columns. */ + public columns: google.bigtable.v2.IColumn[]; + + /** + * Creates a new Family instance using the specified properties. + * @param [properties] Properties to set + * @returns Family instance + */ + public static create(properties?: google.bigtable.v2.IFamily): google.bigtable.v2.Family; + + /** + * Encodes the specified Family message. Does not implicitly {@link google.bigtable.v2.Family.verify|verify} messages. + * @param message Family message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Family message, length delimited. Does not implicitly {@link google.bigtable.v2.Family.verify|verify} messages. + * @param message Family message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Family message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Family + * @throws {Error} If the payload is not 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.Family; + + /** + * Decodes a Family message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Family + * @throws {Error} If the payload 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.Family; + + /** + * Verifies a Family message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Family message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Family + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Family; + + /** + * Creates a plain object from a Family message. Also converts values to other types if specified. + * @param message Family + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Family, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Family to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Family + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Column. */ + interface IColumn { + + /** Column qualifier */ + qualifier?: (Uint8Array|Buffer|string|null); + + /** Column cells */ + cells?: (google.bigtable.v2.ICell[]|null); + } + + /** Represents a Column. */ + class Column implements IColumn { + + /** + * Constructs a new Column. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IColumn); + + /** Column qualifier. */ + public qualifier: (Uint8Array|Buffer|string); + + /** Column cells. */ + public cells: google.bigtable.v2.ICell[]; + + /** + * Creates a new Column instance using the specified properties. + * @param [properties] Properties to set + * @returns Column instance + */ + public static create(properties?: google.bigtable.v2.IColumn): google.bigtable.v2.Column; + + /** + * Encodes the specified Column message. Does not implicitly {@link google.bigtable.v2.Column.verify|verify} messages. + * @param message Column message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.bigtable.v2.Column.verify|verify} messages. + * @param message Column message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Column message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Column + * @throws {Error} If the payload is not 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.Column; + + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Column + * @throws {Error} If the payload 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.Column; + + /** + * Verifies a Column message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Column + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Column; + + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @param message Column + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Column to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Column + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cell. */ + interface ICell { + + /** Cell timestampMicros */ + timestampMicros?: (number|Long|string|null); + + /** Cell value */ + value?: (Uint8Array|Buffer|string|null); + + /** Cell labels */ + labels?: (string[]|null); + } + + /** Represents a Cell. */ + class Cell implements ICell { + + /** + * Constructs a new Cell. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ICell); + + /** Cell timestampMicros. */ + public timestampMicros: (number|Long|string); + + /** Cell value. */ + public value: (Uint8Array|Buffer|string); + + /** Cell labels. */ + public labels: string[]; + + /** + * Creates a new Cell instance using the specified properties. + * @param [properties] Properties to set + * @returns Cell instance + */ + public static create(properties?: google.bigtable.v2.ICell): google.bigtable.v2.Cell; + + /** + * Encodes the specified Cell message. Does not implicitly {@link google.bigtable.v2.Cell.verify|verify} messages. + * @param message Cell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ICell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cell message, length delimited. Does not implicitly {@link google.bigtable.v2.Cell.verify|verify} messages. + * @param message Cell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ICell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cell message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cell + * @throws {Error} If the payload is not 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.Cell; + + /** + * Decodes a Cell message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cell + * @throws {Error} If the payload 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.Cell; + + /** + * Verifies a Cell message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Cell message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cell + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Cell; + + /** + * Creates a plain object from a Cell message. Also converts values to other types if specified. + * @param message Cell + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Cell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cell to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cell + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value type */ + type?: (google.bigtable.v2.IType|null); + + /** Value rawValue */ + rawValue?: (Uint8Array|Buffer|string|null); + + /** Value rawTimestampMicros */ + rawTimestampMicros?: (number|Long|string|null); + + /** Value bytesValue */ + bytesValue?: (Uint8Array|Buffer|string|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value intValue */ + intValue?: (number|Long|string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value floatValue */ + floatValue?: (number|null); + + /** Value timestampValue */ + timestampValue?: (google.protobuf.ITimestamp|null); + + /** Value dateValue */ + dateValue?: (google.type.IDate|null); + + /** Value arrayValue */ + arrayValue?: (google.bigtable.v2.IArrayValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IValue); + + /** Value type. */ + public type?: (google.bigtable.v2.IType|null); + + /** Value rawValue. */ + public rawValue?: (Uint8Array|Buffer|string|null); + + /** Value rawTimestampMicros. */ + public rawTimestampMicros?: (number|Long|string|null); + + /** Value bytesValue. */ + public bytesValue?: (Uint8Array|Buffer|string|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value intValue. */ + public intValue?: (number|Long|string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value floatValue. */ + public floatValue?: (number|null); + + /** Value timestampValue. */ + public timestampValue?: (google.protobuf.ITimestamp|null); + + /** Value dateValue. */ + public dateValue?: (google.type.IDate|null); + + /** Value arrayValue. */ + public arrayValue?: (google.bigtable.v2.IArrayValue|null); + + /** Value kind. */ + public kind?: ("rawValue"|"rawTimestampMicros"|"bytesValue"|"stringValue"|"intValue"|"boolValue"|"floatValue"|"timestampValue"|"dateValue"|"arrayValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.bigtable.v2.IValue): google.bigtable.v2.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.bigtable.v2.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.bigtable.v2.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ArrayValue. */ + interface IArrayValue { + + /** ArrayValue values */ + values?: (google.bigtable.v2.IValue[]|null); + } + + /** Represents an ArrayValue. */ + class ArrayValue implements IArrayValue { + + /** + * Constructs a new ArrayValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IArrayValue); + + /** ArrayValue values. */ + public values: google.bigtable.v2.IValue[]; + + /** + * Creates a new ArrayValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ArrayValue instance + */ + public static create(properties?: google.bigtable.v2.IArrayValue): google.bigtable.v2.ArrayValue; + + /** + * Encodes the specified ArrayValue message. Does not implicitly {@link google.bigtable.v2.ArrayValue.verify|verify} messages. + * @param message ArrayValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IArrayValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArrayValue message, length delimited. Does not implicitly {@link google.bigtable.v2.ArrayValue.verify|verify} messages. + * @param message ArrayValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IArrayValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArrayValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArrayValue + * @throws {Error} If the payload is not 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.ArrayValue; + + /** + * Decodes an ArrayValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArrayValue + * @throws {Error} If the payload 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.ArrayValue; + + /** + * Verifies an ArrayValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArrayValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArrayValue + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ArrayValue; + + /** + * Creates a plain object from an ArrayValue message. Also converts values to other types if specified. + * @param message ArrayValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ArrayValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArrayValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArrayValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RowRange. */ + interface IRowRange { + + /** RowRange startKeyClosed */ + startKeyClosed?: (Uint8Array|Buffer|string|null); + + /** RowRange startKeyOpen */ + startKeyOpen?: (Uint8Array|Buffer|string|null); + + /** RowRange endKeyOpen */ + endKeyOpen?: (Uint8Array|Buffer|string|null); + + /** RowRange endKeyClosed */ + endKeyClosed?: (Uint8Array|Buffer|string|null); + } + + /** Represents a RowRange. */ + class RowRange implements IRowRange { + + /** + * Constructs a new RowRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IRowRange); + + /** RowRange startKeyClosed. */ + public startKeyClosed?: (Uint8Array|Buffer|string|null); + + /** RowRange startKeyOpen. */ + public startKeyOpen?: (Uint8Array|Buffer|string|null); + + /** RowRange endKeyOpen. */ + public endKeyOpen?: (Uint8Array|Buffer|string|null); + + /** RowRange endKeyClosed. */ + public endKeyClosed?: (Uint8Array|Buffer|string|null); + + /** RowRange startKey. */ + public startKey?: ("startKeyClosed"|"startKeyOpen"); + + /** RowRange endKey. */ + public endKey?: ("endKeyOpen"|"endKeyClosed"); + + /** + * Creates a new RowRange instance using the specified properties. + * @param [properties] Properties to set + * @returns RowRange instance + */ + public static create(properties?: google.bigtable.v2.IRowRange): google.bigtable.v2.RowRange; + + /** + * Encodes the specified RowRange message. Does not implicitly {@link google.bigtable.v2.RowRange.verify|verify} messages. + * @param message RowRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IRowRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RowRange message, length delimited. Does not implicitly {@link google.bigtable.v2.RowRange.verify|verify} messages. + * @param message RowRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IRowRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RowRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RowRange + * @throws {Error} If the payload is not 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.RowRange; + + /** + * Decodes a RowRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RowRange + * @throws {Error} If the payload 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.RowRange; + + /** + * Verifies a RowRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RowRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RowRange + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowRange; + + /** + * Creates a plain object from a RowRange message. Also converts values to other types if specified. + * @param message RowRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RowRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RowRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RowRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RowSet. */ + interface IRowSet { + + /** RowSet rowKeys */ + rowKeys?: (Uint8Array[]|null); + + /** RowSet rowRanges */ + rowRanges?: (google.bigtable.v2.IRowRange[]|null); + } + + /** Represents a RowSet. */ + class RowSet implements IRowSet { + + /** + * Constructs a new RowSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IRowSet); + + /** RowSet rowKeys. */ + public rowKeys: Uint8Array[]; + + /** RowSet rowRanges. */ + public rowRanges: google.bigtable.v2.IRowRange[]; + + /** + * Creates a new RowSet instance using the specified properties. + * @param [properties] Properties to set + * @returns RowSet instance + */ + public static create(properties?: google.bigtable.v2.IRowSet): google.bigtable.v2.RowSet; + + /** + * Encodes the specified RowSet message. Does not implicitly {@link google.bigtable.v2.RowSet.verify|verify} messages. + * @param message RowSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IRowSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RowSet message, length delimited. Does not implicitly {@link google.bigtable.v2.RowSet.verify|verify} messages. + * @param message RowSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IRowSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RowSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RowSet + * @throws {Error} If the payload is not 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.RowSet; + + /** + * Decodes a RowSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RowSet + * @throws {Error} If the payload 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.RowSet; + + /** + * Verifies a RowSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RowSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RowSet + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowSet; + + /** + * Creates a plain object from a RowSet message. Also converts values to other types if specified. + * @param message RowSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RowSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RowSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RowSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ColumnRange. */ + interface IColumnRange { + + /** ColumnRange familyName */ + familyName?: (string|null); + + /** ColumnRange startQualifierClosed */ + startQualifierClosed?: (Uint8Array|Buffer|string|null); + + /** ColumnRange startQualifierOpen */ + startQualifierOpen?: (Uint8Array|Buffer|string|null); + + /** ColumnRange endQualifierClosed */ + endQualifierClosed?: (Uint8Array|Buffer|string|null); + + /** ColumnRange endQualifierOpen */ + endQualifierOpen?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ColumnRange. */ + class ColumnRange implements IColumnRange { + + /** + * Constructs a new ColumnRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IColumnRange); + + /** ColumnRange familyName. */ + public familyName: string; + + /** ColumnRange startQualifierClosed. */ + public startQualifierClosed?: (Uint8Array|Buffer|string|null); + + /** ColumnRange startQualifierOpen. */ + public startQualifierOpen?: (Uint8Array|Buffer|string|null); + + /** ColumnRange endQualifierClosed. */ + public endQualifierClosed?: (Uint8Array|Buffer|string|null); + + /** ColumnRange endQualifierOpen. */ + public endQualifierOpen?: (Uint8Array|Buffer|string|null); + + /** ColumnRange startQualifier. */ + public startQualifier?: ("startQualifierClosed"|"startQualifierOpen"); + + /** ColumnRange endQualifier. */ + public endQualifier?: ("endQualifierClosed"|"endQualifierOpen"); + + /** + * Creates a new ColumnRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnRange instance + */ + public static create(properties?: google.bigtable.v2.IColumnRange): google.bigtable.v2.ColumnRange; + + /** + * Encodes the specified ColumnRange message. Does not implicitly {@link google.bigtable.v2.ColumnRange.verify|verify} messages. + * @param message ColumnRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IColumnRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnRange message, length delimited. Does not implicitly {@link google.bigtable.v2.ColumnRange.verify|verify} messages. + * @param message ColumnRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IColumnRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnRange + * @throws {Error} If the payload is not 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.ColumnRange; + + /** + * Decodes a ColumnRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnRange + * @throws {Error} If the payload 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.ColumnRange; + + /** + * Verifies a ColumnRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnRange + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ColumnRange; + + /** + * Creates a plain object from a ColumnRange message. Also converts values to other types if specified. + * @param message ColumnRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ColumnRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimestampRange. */ + interface ITimestampRange { + + /** TimestampRange startTimestampMicros */ + startTimestampMicros?: (number|Long|string|null); + + /** TimestampRange endTimestampMicros */ + endTimestampMicros?: (number|Long|string|null); + } + + /** Represents a TimestampRange. */ + class TimestampRange implements ITimestampRange { + + /** + * Constructs a new TimestampRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ITimestampRange); + + /** TimestampRange startTimestampMicros. */ + public startTimestampMicros: (number|Long|string); + + /** TimestampRange endTimestampMicros. */ + public endTimestampMicros: (number|Long|string); + + /** + * Creates a new TimestampRange instance using the specified properties. + * @param [properties] Properties to set + * @returns TimestampRange instance + */ + public static create(properties?: google.bigtable.v2.ITimestampRange): google.bigtable.v2.TimestampRange; + + /** + * Encodes the specified TimestampRange message. Does not implicitly {@link google.bigtable.v2.TimestampRange.verify|verify} messages. + * @param message TimestampRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ITimestampRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimestampRange message, length delimited. Does not implicitly {@link google.bigtable.v2.TimestampRange.verify|verify} messages. + * @param message TimestampRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ITimestampRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimestampRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimestampRange + * @throws {Error} If the payload is not 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.TimestampRange; + + /** + * Decodes a TimestampRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimestampRange + * @throws {Error} If the payload 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.TimestampRange; + + /** + * Verifies a TimestampRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimestampRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimestampRange + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.TimestampRange; + + /** + * Creates a plain object from a TimestampRange message. Also converts values to other types if specified. + * @param message TimestampRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.TimestampRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimestampRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimestampRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ValueRange. */ + interface IValueRange { + + /** ValueRange startValueClosed */ + startValueClosed?: (Uint8Array|Buffer|string|null); + + /** ValueRange startValueOpen */ + startValueOpen?: (Uint8Array|Buffer|string|null); + + /** ValueRange endValueClosed */ + endValueClosed?: (Uint8Array|Buffer|string|null); + + /** ValueRange endValueOpen */ + endValueOpen?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ValueRange. */ + class ValueRange implements IValueRange { + + /** + * Constructs a new ValueRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IValueRange); + + /** ValueRange startValueClosed. */ + public startValueClosed?: (Uint8Array|Buffer|string|null); + + /** ValueRange startValueOpen. */ + public startValueOpen?: (Uint8Array|Buffer|string|null); + + /** ValueRange endValueClosed. */ + public endValueClosed?: (Uint8Array|Buffer|string|null); + + /** ValueRange endValueOpen. */ + public endValueOpen?: (Uint8Array|Buffer|string|null); + + /** ValueRange startValue. */ + public startValue?: ("startValueClosed"|"startValueOpen"); + + /** ValueRange endValue. */ + public endValue?: ("endValueClosed"|"endValueOpen"); + + /** + * Creates a new ValueRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ValueRange instance + */ + public static create(properties?: google.bigtable.v2.IValueRange): google.bigtable.v2.ValueRange; + + /** + * Encodes the specified ValueRange message. Does not implicitly {@link google.bigtable.v2.ValueRange.verify|verify} messages. + * @param message ValueRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IValueRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValueRange message, length delimited. Does not implicitly {@link google.bigtable.v2.ValueRange.verify|verify} messages. + * @param message ValueRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IValueRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValueRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValueRange + * @throws {Error} If the payload is not 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.ValueRange; + + /** + * Decodes a ValueRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValueRange + * @throws {Error} If the payload 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.ValueRange; + + /** + * Verifies a ValueRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValueRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValueRange + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ValueRange; + + /** + * Creates a plain object from a ValueRange message. Also converts values to other types if specified. + * @param message ValueRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ValueRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValueRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValueRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ValueBitmask. */ + interface IValueBitmask { + + /** ValueBitmask mask */ + mask?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ValueBitmask. */ + class ValueBitmask implements IValueBitmask { + + /** + * Constructs a new ValueBitmask. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IValueBitmask); + + /** ValueBitmask mask. */ + public mask: (Uint8Array|Buffer|string); + + /** + * Creates a new ValueBitmask instance using the specified properties. + * @param [properties] Properties to set + * @returns ValueBitmask instance + */ + public static create(properties?: google.bigtable.v2.IValueBitmask): google.bigtable.v2.ValueBitmask; + + /** + * Encodes the specified ValueBitmask message. Does not implicitly {@link google.bigtable.v2.ValueBitmask.verify|verify} messages. + * @param message ValueBitmask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IValueBitmask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValueBitmask message, length delimited. Does not implicitly {@link google.bigtable.v2.ValueBitmask.verify|verify} messages. + * @param message ValueBitmask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IValueBitmask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValueBitmask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValueBitmask + * @throws {Error} If the payload is not 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.ValueBitmask; + + /** + * Decodes a ValueBitmask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValueBitmask + * @throws {Error} If the payload 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.ValueBitmask; + + /** + * Verifies a ValueBitmask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValueBitmask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValueBitmask + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ValueBitmask; + + /** + * Creates a plain object from a ValueBitmask message. Also converts values to other types if specified. + * @param message ValueBitmask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ValueBitmask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValueBitmask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValueBitmask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RowFilter. */ + interface IRowFilter { + + /** RowFilter chain */ + chain?: (google.bigtable.v2.RowFilter.IChain|null); + + /** RowFilter interleave */ + interleave?: (google.bigtable.v2.RowFilter.IInterleave|null); + + /** RowFilter condition */ + condition?: (google.bigtable.v2.RowFilter.ICondition|null); + + /** RowFilter sink */ + sink?: (boolean|null); + + /** RowFilter passAllFilter */ + passAllFilter?: (boolean|null); + + /** RowFilter blockAllFilter */ + blockAllFilter?: (boolean|null); + + /** RowFilter rowKeyRegexFilter */ + rowKeyRegexFilter?: (Uint8Array|Buffer|string|null); + + /** RowFilter rowSampleFilter */ + rowSampleFilter?: (number|null); + + /** RowFilter familyNameRegexFilter */ + familyNameRegexFilter?: (string|null); + + /** RowFilter columnQualifierRegexFilter */ + columnQualifierRegexFilter?: (Uint8Array|Buffer|string|null); + + /** RowFilter columnRangeFilter */ + columnRangeFilter?: (google.bigtable.v2.IColumnRange|null); + + /** RowFilter timestampRangeFilter */ + timestampRangeFilter?: (google.bigtable.v2.ITimestampRange|null); + + /** RowFilter valueRegexFilter */ + valueRegexFilter?: (Uint8Array|Buffer|string|null); + + /** RowFilter valueRangeFilter */ + valueRangeFilter?: (google.bigtable.v2.IValueRange|null); + + /** RowFilter cellsPerRowOffsetFilter */ + cellsPerRowOffsetFilter?: (number|null); + + /** RowFilter cellsPerRowLimitFilter */ + cellsPerRowLimitFilter?: (number|null); + + /** RowFilter cellsPerColumnLimitFilter */ + cellsPerColumnLimitFilter?: (number|null); + + /** RowFilter stripValueTransformer */ + stripValueTransformer?: (boolean|null); + + /** RowFilter applyLabelTransformer */ + applyLabelTransformer?: (string|null); + + /** RowFilter valueBitmaskFilter */ + valueBitmaskFilter?: (google.bigtable.v2.IValueBitmask|null); + } + + /** Represents a RowFilter. */ + class RowFilter implements IRowFilter { + + /** + * Constructs a new RowFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IRowFilter); + + /** RowFilter chain. */ + public chain?: (google.bigtable.v2.RowFilter.IChain|null); + + /** RowFilter interleave. */ + public interleave?: (google.bigtable.v2.RowFilter.IInterleave|null); + + /** RowFilter condition. */ + public condition?: (google.bigtable.v2.RowFilter.ICondition|null); + + /** RowFilter sink. */ + public sink?: (boolean|null); + + /** RowFilter passAllFilter. */ + public passAllFilter?: (boolean|null); + + /** RowFilter blockAllFilter. */ + public blockAllFilter?: (boolean|null); + + /** RowFilter rowKeyRegexFilter. */ + public rowKeyRegexFilter?: (Uint8Array|Buffer|string|null); + + /** RowFilter rowSampleFilter. */ + public rowSampleFilter?: (number|null); + + /** RowFilter familyNameRegexFilter. */ + public familyNameRegexFilter?: (string|null); + + /** RowFilter columnQualifierRegexFilter. */ + public columnQualifierRegexFilter?: (Uint8Array|Buffer|string|null); + + /** RowFilter columnRangeFilter. */ + public columnRangeFilter?: (google.bigtable.v2.IColumnRange|null); + + /** RowFilter timestampRangeFilter. */ + public timestampRangeFilter?: (google.bigtable.v2.ITimestampRange|null); + + /** RowFilter valueRegexFilter. */ + public valueRegexFilter?: (Uint8Array|Buffer|string|null); + + /** RowFilter valueRangeFilter. */ + public valueRangeFilter?: (google.bigtable.v2.IValueRange|null); + + /** RowFilter cellsPerRowOffsetFilter. */ + public cellsPerRowOffsetFilter?: (number|null); + + /** RowFilter cellsPerRowLimitFilter. */ + public cellsPerRowLimitFilter?: (number|null); + + /** RowFilter cellsPerColumnLimitFilter. */ + public cellsPerColumnLimitFilter?: (number|null); + + /** RowFilter stripValueTransformer. */ + public stripValueTransformer?: (boolean|null); + + /** RowFilter applyLabelTransformer. */ + public applyLabelTransformer?: (string|null); + + /** RowFilter valueBitmaskFilter. */ + public valueBitmaskFilter?: (google.bigtable.v2.IValueBitmask|null); + + /** RowFilter filter. */ + public filter?: ("chain"|"interleave"|"condition"|"sink"|"passAllFilter"|"blockAllFilter"|"rowKeyRegexFilter"|"rowSampleFilter"|"familyNameRegexFilter"|"columnQualifierRegexFilter"|"columnRangeFilter"|"timestampRangeFilter"|"valueRegexFilter"|"valueRangeFilter"|"cellsPerRowOffsetFilter"|"cellsPerRowLimitFilter"|"cellsPerColumnLimitFilter"|"stripValueTransformer"|"applyLabelTransformer"|"valueBitmaskFilter"); + + /** + * Creates a new RowFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns RowFilter instance + */ + public static create(properties?: google.bigtable.v2.IRowFilter): google.bigtable.v2.RowFilter; + + /** + * Encodes the specified RowFilter message. Does not implicitly {@link google.bigtable.v2.RowFilter.verify|verify} messages. + * @param message RowFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IRowFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RowFilter message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.verify|verify} messages. + * @param message RowFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IRowFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RowFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RowFilter + * @throws {Error} If the payload is not 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.RowFilter; + + /** + * Decodes a RowFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RowFilter + * @throws {Error} If the payload 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.RowFilter; + + /** + * Verifies a RowFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RowFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RowFilter + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowFilter; + + /** + * Creates a plain object from a RowFilter message. Also converts values to other types if specified. + * @param message RowFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RowFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RowFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RowFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RowFilter { + + /** Properties of a Chain. */ + interface IChain { + + /** Chain filters */ + filters?: (google.bigtable.v2.IRowFilter[]|null); + } + + /** Represents a Chain. */ + class Chain implements IChain { + + /** + * Constructs a new Chain. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.RowFilter.IChain); + + /** Chain filters. */ + public filters: google.bigtable.v2.IRowFilter[]; + + /** + * Creates a new Chain instance using the specified properties. + * @param [properties] Properties to set + * @returns Chain instance + */ + public static create(properties?: google.bigtable.v2.RowFilter.IChain): google.bigtable.v2.RowFilter.Chain; + + /** + * Encodes the specified Chain message. Does not implicitly {@link google.bigtable.v2.RowFilter.Chain.verify|verify} messages. + * @param message Chain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.RowFilter.IChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Chain message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Chain.verify|verify} messages. + * @param message Chain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.RowFilter.IChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Chain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Chain + * @throws {Error} If the payload is not 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.RowFilter.Chain; + + /** + * Decodes a Chain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Chain + * @throws {Error} If the payload 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.RowFilter.Chain; + + /** + * Verifies a Chain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Chain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Chain + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowFilter.Chain; + + /** + * Creates a plain object from a Chain message. Also converts values to other types if specified. + * @param message Chain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RowFilter.Chain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Chain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Chain + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Interleave. */ + interface IInterleave { + + /** Interleave filters */ + filters?: (google.bigtable.v2.IRowFilter[]|null); + } + + /** Represents an Interleave. */ + class Interleave implements IInterleave { + + /** + * Constructs a new Interleave. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.RowFilter.IInterleave); + + /** Interleave filters. */ + public filters: google.bigtable.v2.IRowFilter[]; + + /** + * Creates a new Interleave instance using the specified properties. + * @param [properties] Properties to set + * @returns Interleave instance + */ + public static create(properties?: google.bigtable.v2.RowFilter.IInterleave): google.bigtable.v2.RowFilter.Interleave; + + /** + * Encodes the specified Interleave message. Does not implicitly {@link google.bigtable.v2.RowFilter.Interleave.verify|verify} messages. + * @param message Interleave message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.RowFilter.IInterleave, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interleave message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Interleave.verify|verify} messages. + * @param message Interleave message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.RowFilter.IInterleave, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interleave message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interleave + * @throws {Error} If the payload is not 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.RowFilter.Interleave; + + /** + * Decodes an Interleave message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interleave + * @throws {Error} If the payload 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.RowFilter.Interleave; + + /** + * Verifies an Interleave message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Interleave message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interleave + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowFilter.Interleave; + + /** + * Creates a plain object from an Interleave message. Also converts values to other types if specified. + * @param message Interleave + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RowFilter.Interleave, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interleave to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interleave + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Condition. */ + interface ICondition { + + /** Condition predicateFilter */ + predicateFilter?: (google.bigtable.v2.IRowFilter|null); + + /** Condition trueFilter */ + trueFilter?: (google.bigtable.v2.IRowFilter|null); + + /** Condition falseFilter */ + falseFilter?: (google.bigtable.v2.IRowFilter|null); + } + + /** Represents a Condition. */ + class Condition implements ICondition { + + /** + * Constructs a new Condition. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.RowFilter.ICondition); + + /** Condition predicateFilter. */ + public predicateFilter?: (google.bigtable.v2.IRowFilter|null); + + /** Condition trueFilter. */ + public trueFilter?: (google.bigtable.v2.IRowFilter|null); + + /** Condition falseFilter. */ + public falseFilter?: (google.bigtable.v2.IRowFilter|null); + + /** + * Creates a new Condition instance using the specified properties. + * @param [properties] Properties to set + * @returns Condition instance + */ + public static create(properties?: google.bigtable.v2.RowFilter.ICondition): google.bigtable.v2.RowFilter.Condition; + + /** + * Encodes the specified Condition message. Does not implicitly {@link google.bigtable.v2.RowFilter.Condition.verify|verify} messages. + * @param message Condition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.RowFilter.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Condition.verify|verify} messages. + * @param message Condition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.RowFilter.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Condition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Condition + * @throws {Error} If the payload is not 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.RowFilter.Condition; + + /** + * Decodes a Condition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Condition + * @throws {Error} If the payload 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.RowFilter.Condition; + + /** + * Verifies a Condition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Condition + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RowFilter.Condition; + + /** + * Creates a plain object from a Condition message. Also converts values to other types if specified. + * @param message Condition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RowFilter.Condition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Condition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Condition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Mutation. */ + interface IMutation { + + /** Mutation setCell */ + setCell?: (google.bigtable.v2.Mutation.ISetCell|null); + + /** Mutation addToCell */ + addToCell?: (google.bigtable.v2.Mutation.IAddToCell|null); + + /** Mutation mergeToCell */ + mergeToCell?: (google.bigtable.v2.Mutation.IMergeToCell|null); + + /** Mutation deleteFromColumn */ + deleteFromColumn?: (google.bigtable.v2.Mutation.IDeleteFromColumn|null); + + /** Mutation deleteFromFamily */ + deleteFromFamily?: (google.bigtable.v2.Mutation.IDeleteFromFamily|null); + + /** Mutation deleteFromRow */ + deleteFromRow?: (google.bigtable.v2.Mutation.IDeleteFromRow|null); + } + + /** Represents a Mutation. */ + class Mutation implements IMutation { + + /** + * Constructs a new Mutation. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IMutation); + + /** Mutation setCell. */ + public setCell?: (google.bigtable.v2.Mutation.ISetCell|null); + + /** Mutation addToCell. */ + public addToCell?: (google.bigtable.v2.Mutation.IAddToCell|null); + + /** Mutation mergeToCell. */ + public mergeToCell?: (google.bigtable.v2.Mutation.IMergeToCell|null); + + /** Mutation deleteFromColumn. */ + public deleteFromColumn?: (google.bigtable.v2.Mutation.IDeleteFromColumn|null); + + /** Mutation deleteFromFamily. */ + public deleteFromFamily?: (google.bigtable.v2.Mutation.IDeleteFromFamily|null); + + /** Mutation deleteFromRow. */ + public deleteFromRow?: (google.bigtable.v2.Mutation.IDeleteFromRow|null); + + /** Mutation mutation. */ + public mutation?: ("setCell"|"addToCell"|"mergeToCell"|"deleteFromColumn"|"deleteFromFamily"|"deleteFromRow"); + + /** + * Creates a new Mutation instance using the specified properties. + * @param [properties] Properties to set + * @returns Mutation instance + */ + public static create(properties?: google.bigtable.v2.IMutation): google.bigtable.v2.Mutation; + + /** + * Encodes the specified Mutation message. Does not implicitly {@link google.bigtable.v2.Mutation.verify|verify} messages. + * @param message Mutation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IMutation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Mutation message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.verify|verify} messages. + * @param message Mutation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IMutation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Mutation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Mutation + * @throws {Error} If the payload is not 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.Mutation; + + /** + * Decodes a Mutation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Mutation + * @throws {Error} If the payload 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.Mutation; + + /** + * Verifies a Mutation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Mutation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Mutation + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation; + + /** + * Creates a plain object from a Mutation message. Also converts values to other types if specified. + * @param message Mutation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Mutation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Mutation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Mutation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Mutation { + + /** Properties of a SetCell. */ + interface ISetCell { + + /** SetCell familyName */ + familyName?: (string|null); + + /** SetCell columnQualifier */ + columnQualifier?: (Uint8Array|Buffer|string|null); + + /** SetCell timestampMicros */ + timestampMicros?: (number|Long|string|null); + + /** SetCell value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents a SetCell. */ + class SetCell implements ISetCell { + + /** + * Constructs a new SetCell. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Mutation.ISetCell); + + /** SetCell familyName. */ + public familyName: string; + + /** SetCell columnQualifier. */ + public columnQualifier: (Uint8Array|Buffer|string); + + /** SetCell timestampMicros. */ + public timestampMicros: (number|Long|string); + + /** SetCell value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new SetCell instance using the specified properties. + * @param [properties] Properties to set + * @returns SetCell instance + */ + public static create(properties?: google.bigtable.v2.Mutation.ISetCell): google.bigtable.v2.Mutation.SetCell; + + /** + * Encodes the specified SetCell message. Does not implicitly {@link google.bigtable.v2.Mutation.SetCell.verify|verify} messages. + * @param message SetCell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Mutation.ISetCell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.SetCell.verify|verify} messages. + * @param message SetCell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Mutation.ISetCell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetCell message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetCell + * @throws {Error} If the payload is not 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.Mutation.SetCell; + + /** + * Decodes a SetCell message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetCell + * @throws {Error} If the payload 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.Mutation.SetCell; + + /** + * Verifies a SetCell message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetCell message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetCell + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.SetCell; + + /** + * Creates a plain object from a SetCell message. Also converts values to other types if specified. + * @param message SetCell + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Mutation.SetCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetCell to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetCell + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddToCell. */ + interface IAddToCell { + + /** AddToCell familyName */ + familyName?: (string|null); + + /** AddToCell columnQualifier */ + columnQualifier?: (google.bigtable.v2.IValue|null); + + /** AddToCell timestamp */ + timestamp?: (google.bigtable.v2.IValue|null); + + /** AddToCell input */ + input?: (google.bigtable.v2.IValue|null); + } + + /** Represents an AddToCell. */ + class AddToCell implements IAddToCell { + + /** + * Constructs a new AddToCell. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Mutation.IAddToCell); + + /** AddToCell familyName. */ + public familyName: string; + + /** AddToCell columnQualifier. */ + public columnQualifier?: (google.bigtable.v2.IValue|null); + + /** AddToCell timestamp. */ + public timestamp?: (google.bigtable.v2.IValue|null); + + /** AddToCell input. */ + public input?: (google.bigtable.v2.IValue|null); + + /** + * Creates a new AddToCell instance using the specified properties. + * @param [properties] Properties to set + * @returns AddToCell instance + */ + public static create(properties?: google.bigtable.v2.Mutation.IAddToCell): google.bigtable.v2.Mutation.AddToCell; + + /** + * Encodes the specified AddToCell message. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * @param message AddToCell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Mutation.IAddToCell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddToCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * @param message AddToCell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Mutation.IAddToCell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddToCell message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddToCell + * @throws {Error} If the payload is not 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.Mutation.AddToCell; + + /** + * Decodes an AddToCell message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddToCell + * @throws {Error} If the payload 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.Mutation.AddToCell; + + /** + * Verifies an AddToCell message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddToCell message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddToCell + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.AddToCell; + + /** + * Creates a plain object from an AddToCell message. Also converts values to other types if specified. + * @param message AddToCell + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Mutation.AddToCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddToCell to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddToCell + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MergeToCell. */ + interface IMergeToCell { + + /** MergeToCell familyName */ + familyName?: (string|null); + + /** MergeToCell columnQualifier */ + columnQualifier?: (google.bigtable.v2.IValue|null); + + /** MergeToCell timestamp */ + timestamp?: (google.bigtable.v2.IValue|null); + + /** MergeToCell input */ + input?: (google.bigtable.v2.IValue|null); + } + + /** Represents a MergeToCell. */ + class MergeToCell implements IMergeToCell { + + /** + * Constructs a new MergeToCell. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Mutation.IMergeToCell); + + /** MergeToCell familyName. */ + public familyName: string; + + /** MergeToCell columnQualifier. */ + public columnQualifier?: (google.bigtable.v2.IValue|null); + + /** MergeToCell timestamp. */ + public timestamp?: (google.bigtable.v2.IValue|null); + + /** MergeToCell input. */ + public input?: (google.bigtable.v2.IValue|null); + + /** + * Creates a new MergeToCell instance using the specified properties. + * @param [properties] Properties to set + * @returns MergeToCell instance + */ + public static create(properties?: google.bigtable.v2.Mutation.IMergeToCell): google.bigtable.v2.Mutation.MergeToCell; + + /** + * Encodes the specified MergeToCell message. Does not implicitly {@link google.bigtable.v2.Mutation.MergeToCell.verify|verify} messages. + * @param message MergeToCell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Mutation.IMergeToCell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MergeToCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.MergeToCell.verify|verify} messages. + * @param message MergeToCell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Mutation.IMergeToCell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MergeToCell message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MergeToCell + * @throws {Error} If the payload is not 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.Mutation.MergeToCell; + + /** + * Decodes a MergeToCell message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MergeToCell + * @throws {Error} If the payload 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.Mutation.MergeToCell; + + /** + * Verifies a MergeToCell message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MergeToCell message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MergeToCell + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.MergeToCell; + + /** + * Creates a plain object from a MergeToCell message. Also converts values to other types if specified. + * @param message MergeToCell + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Mutation.MergeToCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MergeToCell to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MergeToCell + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFromColumn. */ + interface IDeleteFromColumn { + + /** DeleteFromColumn familyName */ + familyName?: (string|null); + + /** DeleteFromColumn columnQualifier */ + columnQualifier?: (Uint8Array|Buffer|string|null); + + /** DeleteFromColumn timeRange */ + timeRange?: (google.bigtable.v2.ITimestampRange|null); + } + + /** Represents a DeleteFromColumn. */ + class DeleteFromColumn implements IDeleteFromColumn { + + /** + * Constructs a new DeleteFromColumn. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Mutation.IDeleteFromColumn); + + /** DeleteFromColumn familyName. */ + public familyName: string; + + /** DeleteFromColumn columnQualifier. */ + public columnQualifier: (Uint8Array|Buffer|string); + + /** DeleteFromColumn timeRange. */ + public timeRange?: (google.bigtable.v2.ITimestampRange|null); + + /** + * Creates a new DeleteFromColumn instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFromColumn instance + */ + public static create(properties?: google.bigtable.v2.Mutation.IDeleteFromColumn): google.bigtable.v2.Mutation.DeleteFromColumn; + + /** + * Encodes the specified DeleteFromColumn message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromColumn.verify|verify} messages. + * @param message DeleteFromColumn message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Mutation.IDeleteFromColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFromColumn message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromColumn.verify|verify} messages. + * @param message DeleteFromColumn message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Mutation.IDeleteFromColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFromColumn message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFromColumn + * @throws {Error} If the payload is not 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.Mutation.DeleteFromColumn; + + /** + * Decodes a DeleteFromColumn message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFromColumn + * @throws {Error} If the payload 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.Mutation.DeleteFromColumn; + + /** + * Verifies a DeleteFromColumn message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFromColumn message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFromColumn + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.DeleteFromColumn; + + /** + * Creates a plain object from a DeleteFromColumn message. Also converts values to other types if specified. + * @param message DeleteFromColumn + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Mutation.DeleteFromColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFromColumn to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFromColumn + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFromFamily. */ + interface IDeleteFromFamily { + + /** DeleteFromFamily familyName */ + familyName?: (string|null); + } + + /** Represents a DeleteFromFamily. */ + class DeleteFromFamily implements IDeleteFromFamily { + + /** + * Constructs a new DeleteFromFamily. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Mutation.IDeleteFromFamily); + + /** DeleteFromFamily familyName. */ + public familyName: string; + + /** + * Creates a new DeleteFromFamily instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFromFamily instance + */ + public static create(properties?: google.bigtable.v2.Mutation.IDeleteFromFamily): google.bigtable.v2.Mutation.DeleteFromFamily; + + /** + * Encodes the specified DeleteFromFamily message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromFamily.verify|verify} messages. + * @param message DeleteFromFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Mutation.IDeleteFromFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFromFamily message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromFamily.verify|verify} messages. + * @param message DeleteFromFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Mutation.IDeleteFromFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFromFamily message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFromFamily + * @throws {Error} If the payload is not 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.Mutation.DeleteFromFamily; + + /** + * Decodes a DeleteFromFamily message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFromFamily + * @throws {Error} If the payload 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.Mutation.DeleteFromFamily; + + /** + * Verifies a DeleteFromFamily message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFromFamily message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFromFamily + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.DeleteFromFamily; + + /** + * Creates a plain object from a DeleteFromFamily message. Also converts values to other types if specified. + * @param message DeleteFromFamily + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Mutation.DeleteFromFamily, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFromFamily to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFromFamily + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFromRow. */ + interface IDeleteFromRow { + } + + /** Represents a DeleteFromRow. */ + class DeleteFromRow implements IDeleteFromRow { + + /** + * Constructs a new DeleteFromRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Mutation.IDeleteFromRow); + + /** + * Creates a new DeleteFromRow instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFromRow instance + */ + public static create(properties?: google.bigtable.v2.Mutation.IDeleteFromRow): google.bigtable.v2.Mutation.DeleteFromRow; + + /** + * Encodes the specified DeleteFromRow message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromRow.verify|verify} messages. + * @param message DeleteFromRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Mutation.IDeleteFromRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFromRow message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromRow.verify|verify} messages. + * @param message DeleteFromRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Mutation.IDeleteFromRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFromRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFromRow + * @throws {Error} If the payload is not 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.Mutation.DeleteFromRow; + + /** + * Decodes a DeleteFromRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFromRow + * @throws {Error} If the payload 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.Mutation.DeleteFromRow; + + /** + * Verifies a DeleteFromRow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFromRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFromRow + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.DeleteFromRow; + + /** + * Creates a plain object from a DeleteFromRow message. Also converts values to other types if specified. + * @param message DeleteFromRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Mutation.DeleteFromRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFromRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFromRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ReadModifyWriteRule. */ + interface IReadModifyWriteRule { + + /** ReadModifyWriteRule familyName */ + familyName?: (string|null); + + /** ReadModifyWriteRule columnQualifier */ + columnQualifier?: (Uint8Array|Buffer|string|null); + + /** ReadModifyWriteRule appendValue */ + appendValue?: (Uint8Array|Buffer|string|null); + + /** ReadModifyWriteRule incrementAmount */ + incrementAmount?: (number|Long|string|null); + } + + /** Represents a ReadModifyWriteRule. */ + class ReadModifyWriteRule implements IReadModifyWriteRule { + + /** + * Constructs a new ReadModifyWriteRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadModifyWriteRule); + + /** ReadModifyWriteRule familyName. */ + public familyName: string; + + /** ReadModifyWriteRule columnQualifier. */ + public columnQualifier: (Uint8Array|Buffer|string); + + /** ReadModifyWriteRule appendValue. */ + public appendValue?: (Uint8Array|Buffer|string|null); + + /** ReadModifyWriteRule incrementAmount. */ + public incrementAmount?: (number|Long|string|null); + + /** ReadModifyWriteRule rule. */ + public rule?: ("appendValue"|"incrementAmount"); + + /** + * Creates a new ReadModifyWriteRule instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadModifyWriteRule instance + */ + public static create(properties?: google.bigtable.v2.IReadModifyWriteRule): google.bigtable.v2.ReadModifyWriteRule; + + /** + * Encodes the specified ReadModifyWriteRule message. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRule.verify|verify} messages. + * @param message ReadModifyWriteRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IReadModifyWriteRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadModifyWriteRule message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRule.verify|verify} messages. + * @param message ReadModifyWriteRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IReadModifyWriteRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadModifyWriteRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadModifyWriteRule + * @throws {Error} If the payload is not 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.ReadModifyWriteRule; + + /** + * Decodes a ReadModifyWriteRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadModifyWriteRule + * @throws {Error} If the payload 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.ReadModifyWriteRule; + + /** + * Verifies a ReadModifyWriteRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadModifyWriteRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadModifyWriteRule + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadModifyWriteRule; + + /** + * Creates a plain object from a ReadModifyWriteRule message. Also converts values to other types if specified. + * @param message ReadModifyWriteRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadModifyWriteRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadModifyWriteRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadModifyWriteRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StreamPartition. */ + interface IStreamPartition { + + /** StreamPartition rowRange */ + rowRange?: (google.bigtable.v2.IRowRange|null); + } + + /** Represents a StreamPartition. */ + class StreamPartition implements IStreamPartition { + + /** + * Constructs a new StreamPartition. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IStreamPartition); + + /** StreamPartition rowRange. */ + public rowRange?: (google.bigtable.v2.IRowRange|null); + + /** + * Creates a new StreamPartition instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamPartition instance + */ + public static create(properties?: google.bigtable.v2.IStreamPartition): google.bigtable.v2.StreamPartition; + + /** + * Encodes the specified StreamPartition message. Does not implicitly {@link google.bigtable.v2.StreamPartition.verify|verify} messages. + * @param message StreamPartition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IStreamPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StreamPartition message, length delimited. Does not implicitly {@link google.bigtable.v2.StreamPartition.verify|verify} messages. + * @param message StreamPartition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IStreamPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StreamPartition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamPartition + * @throws {Error} If the payload is not 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.StreamPartition; + + /** + * Decodes a StreamPartition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamPartition + * @throws {Error} If the payload 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.StreamPartition; + + /** + * Verifies a StreamPartition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StreamPartition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamPartition + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.StreamPartition; + + /** + * Creates a plain object from a StreamPartition message. Also converts values to other types if specified. + * @param message StreamPartition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.StreamPartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StreamPartition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StreamPartition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StreamContinuationTokens. */ + interface IStreamContinuationTokens { + + /** StreamContinuationTokens tokens */ + tokens?: (google.bigtable.v2.IStreamContinuationToken[]|null); + } + + /** Represents a StreamContinuationTokens. */ + class StreamContinuationTokens implements IStreamContinuationTokens { + + /** + * Constructs a new StreamContinuationTokens. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IStreamContinuationTokens); + + /** StreamContinuationTokens tokens. */ + public tokens: google.bigtable.v2.IStreamContinuationToken[]; + + /** + * Creates a new StreamContinuationTokens instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamContinuationTokens instance + */ + public static create(properties?: google.bigtable.v2.IStreamContinuationTokens): google.bigtable.v2.StreamContinuationTokens; + + /** + * Encodes the specified StreamContinuationTokens message. Does not implicitly {@link google.bigtable.v2.StreamContinuationTokens.verify|verify} messages. + * @param message StreamContinuationTokens message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IStreamContinuationTokens, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StreamContinuationTokens message, length delimited. Does not implicitly {@link google.bigtable.v2.StreamContinuationTokens.verify|verify} messages. + * @param message StreamContinuationTokens message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IStreamContinuationTokens, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StreamContinuationTokens message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamContinuationTokens + * @throws {Error} If the payload is not 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.StreamContinuationTokens; + + /** + * Decodes a StreamContinuationTokens message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamContinuationTokens + * @throws {Error} If the payload 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.StreamContinuationTokens; + + /** + * Verifies a StreamContinuationTokens message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StreamContinuationTokens message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamContinuationTokens + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.StreamContinuationTokens; + + /** + * Creates a plain object from a StreamContinuationTokens message. Also converts values to other types if specified. + * @param message StreamContinuationTokens + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.StreamContinuationTokens, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StreamContinuationTokens to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StreamContinuationTokens + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StreamContinuationToken. */ + interface IStreamContinuationToken { + + /** StreamContinuationToken partition */ + partition?: (google.bigtable.v2.IStreamPartition|null); + + /** StreamContinuationToken token */ + token?: (string|null); + } + + /** Represents a StreamContinuationToken. */ + class StreamContinuationToken implements IStreamContinuationToken { + + /** + * Constructs a new StreamContinuationToken. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IStreamContinuationToken); + + /** StreamContinuationToken partition. */ + public partition?: (google.bigtable.v2.IStreamPartition|null); + + /** StreamContinuationToken token. */ + public token: string; + + /** + * Creates a new StreamContinuationToken instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamContinuationToken instance + */ + public static create(properties?: google.bigtable.v2.IStreamContinuationToken): google.bigtable.v2.StreamContinuationToken; + + /** + * Encodes the specified StreamContinuationToken message. Does not implicitly {@link google.bigtable.v2.StreamContinuationToken.verify|verify} messages. + * @param message StreamContinuationToken message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IStreamContinuationToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StreamContinuationToken message, length delimited. Does not implicitly {@link google.bigtable.v2.StreamContinuationToken.verify|verify} messages. + * @param message StreamContinuationToken message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IStreamContinuationToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StreamContinuationToken message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamContinuationToken + * @throws {Error} If the payload is not 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.StreamContinuationToken; + + /** + * Decodes a StreamContinuationToken message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamContinuationToken + * @throws {Error} If the payload 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.StreamContinuationToken; + + /** + * Verifies a StreamContinuationToken message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StreamContinuationToken message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamContinuationToken + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.StreamContinuationToken; + + /** + * Creates a plain object from a StreamContinuationToken message. Also converts values to other types if specified. + * @param message StreamContinuationToken + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.StreamContinuationToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StreamContinuationToken to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StreamContinuationToken + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtoFormat. */ + interface IProtoFormat { + } + + /** Represents a ProtoFormat. */ + class ProtoFormat implements IProtoFormat { + + /** + * Constructs a new ProtoFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IProtoFormat); + + /** + * Creates a new ProtoFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtoFormat instance + */ + public static create(properties?: google.bigtable.v2.IProtoFormat): google.bigtable.v2.ProtoFormat; + + /** + * Encodes the specified ProtoFormat message. Does not implicitly {@link google.bigtable.v2.ProtoFormat.verify|verify} messages. + * @param message ProtoFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IProtoFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtoFormat message, length delimited. Does not implicitly {@link google.bigtable.v2.ProtoFormat.verify|verify} messages. + * @param message ProtoFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IProtoFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtoFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtoFormat + * @throws {Error} If the payload is not 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.ProtoFormat; + + /** + * Decodes a ProtoFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtoFormat + * @throws {Error} If the payload 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.ProtoFormat; + + /** + * Verifies a ProtoFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtoFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtoFormat + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ProtoFormat; + + /** + * Creates a plain object from a ProtoFormat message. Also converts values to other types if specified. + * @param message ProtoFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ProtoFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtoFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtoFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ColumnMetadata. */ + interface IColumnMetadata { + + /** ColumnMetadata name */ + name?: (string|null); + + /** ColumnMetadata type */ + type?: (google.bigtable.v2.IType|null); + } + + /** Represents a ColumnMetadata. */ + class ColumnMetadata implements IColumnMetadata { + + /** + * Constructs a new ColumnMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IColumnMetadata); + + /** ColumnMetadata name. */ + public name: string; + + /** ColumnMetadata type. */ + public type?: (google.bigtable.v2.IType|null); + + /** + * Creates a new ColumnMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnMetadata instance + */ + public static create(properties?: google.bigtable.v2.IColumnMetadata): google.bigtable.v2.ColumnMetadata; + + /** + * Encodes the specified ColumnMetadata message. Does not implicitly {@link google.bigtable.v2.ColumnMetadata.verify|verify} messages. + * @param message ColumnMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IColumnMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnMetadata message, length delimited. Does not implicitly {@link google.bigtable.v2.ColumnMetadata.verify|verify} messages. + * @param message ColumnMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IColumnMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnMetadata + * @throws {Error} If the payload is not 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.ColumnMetadata; + + /** + * Decodes a ColumnMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnMetadata + * @throws {Error} If the payload 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.ColumnMetadata; + + /** + * Verifies a ColumnMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ColumnMetadata; + + /** + * Creates a plain object from a ColumnMetadata message. Also converts values to other types if specified. + * @param message ColumnMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ColumnMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtoSchema. */ + interface IProtoSchema { + + /** ProtoSchema columns */ + columns?: (google.bigtable.v2.IColumnMetadata[]|null); + } + + /** Represents a ProtoSchema. */ + class ProtoSchema implements IProtoSchema { + + /** + * Constructs a new ProtoSchema. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IProtoSchema); + + /** ProtoSchema columns. */ + public columns: google.bigtable.v2.IColumnMetadata[]; + + /** + * Creates a new ProtoSchema instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtoSchema instance + */ + public static create(properties?: google.bigtable.v2.IProtoSchema): google.bigtable.v2.ProtoSchema; + + /** + * Encodes the specified ProtoSchema message. Does not implicitly {@link google.bigtable.v2.ProtoSchema.verify|verify} messages. + * @param message ProtoSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IProtoSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtoSchema message, length delimited. Does not implicitly {@link google.bigtable.v2.ProtoSchema.verify|verify} messages. + * @param message ProtoSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IProtoSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtoSchema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtoSchema + * @throws {Error} If the payload is not 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.ProtoSchema; + + /** + * Decodes a ProtoSchema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtoSchema + * @throws {Error} If the payload 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.ProtoSchema; + + /** + * Verifies a ProtoSchema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtoSchema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtoSchema + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ProtoSchema; + + /** + * Creates a plain object from a ProtoSchema message. Also converts values to other types if specified. + * @param message ProtoSchema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ProtoSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtoSchema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtoSchema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResultSetMetadata. */ + interface IResultSetMetadata { + + /** ResultSetMetadata protoSchema */ + protoSchema?: (google.bigtable.v2.IProtoSchema|null); + } + + /** Represents a ResultSetMetadata. */ + class ResultSetMetadata implements IResultSetMetadata { + + /** + * Constructs a new ResultSetMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IResultSetMetadata); + + /** ResultSetMetadata protoSchema. */ + public protoSchema?: (google.bigtable.v2.IProtoSchema|null); + + /** ResultSetMetadata schema. */ + public schema?: "protoSchema"; + + /** + * Creates a new ResultSetMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ResultSetMetadata instance + */ + public static create(properties?: google.bigtable.v2.IResultSetMetadata): google.bigtable.v2.ResultSetMetadata; + + /** + * Encodes the specified ResultSetMetadata message. Does not implicitly {@link google.bigtable.v2.ResultSetMetadata.verify|verify} messages. + * @param message ResultSetMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IResultSetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResultSetMetadata message, length delimited. Does not implicitly {@link google.bigtable.v2.ResultSetMetadata.verify|verify} messages. + * @param message ResultSetMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IResultSetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResultSetMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResultSetMetadata + * @throws {Error} If the payload is not 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.ResultSetMetadata; + + /** + * Decodes a ResultSetMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResultSetMetadata + * @throws {Error} If the payload 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.ResultSetMetadata; + + /** + * Verifies a ResultSetMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResultSetMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResultSetMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ResultSetMetadata; + + /** + * Creates a plain object from a ResultSetMetadata message. Also converts values to other types if specified. + * @param message ResultSetMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ResultSetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResultSetMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResultSetMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtoRows. */ + interface IProtoRows { + + /** ProtoRows values */ + values?: (google.bigtable.v2.IValue[]|null); + } + + /** Represents a ProtoRows. */ + class ProtoRows implements IProtoRows { + + /** + * Constructs a new ProtoRows. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IProtoRows); + + /** ProtoRows values. */ + public values: google.bigtable.v2.IValue[]; + + /** + * Creates a new ProtoRows instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtoRows instance + */ + public static create(properties?: google.bigtable.v2.IProtoRows): google.bigtable.v2.ProtoRows; + + /** + * Encodes the specified ProtoRows message. Does not implicitly {@link google.bigtable.v2.ProtoRows.verify|verify} messages. + * @param message ProtoRows message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IProtoRows, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtoRows message, length delimited. Does not implicitly {@link google.bigtable.v2.ProtoRows.verify|verify} messages. + * @param message ProtoRows message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IProtoRows, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtoRows message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtoRows + * @throws {Error} If the payload is not 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.ProtoRows; + + /** + * Decodes a ProtoRows message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtoRows + * @throws {Error} If the payload 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.ProtoRows; + + /** + * Verifies a ProtoRows message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtoRows message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtoRows + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ProtoRows; + + /** + * Creates a plain object from a ProtoRows message. Also converts values to other types if specified. + * @param message ProtoRows + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ProtoRows, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtoRows to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtoRows + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtoRowsBatch. */ + interface IProtoRowsBatch { + + /** ProtoRowsBatch batchData */ + batchData?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ProtoRowsBatch. */ + class ProtoRowsBatch implements IProtoRowsBatch { + + /** + * Constructs a new ProtoRowsBatch. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IProtoRowsBatch); + + /** ProtoRowsBatch batchData. */ + public batchData: (Uint8Array|Buffer|string); + + /** + * Creates a new ProtoRowsBatch instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtoRowsBatch instance + */ + public static create(properties?: google.bigtable.v2.IProtoRowsBatch): google.bigtable.v2.ProtoRowsBatch; + + /** + * Encodes the specified ProtoRowsBatch message. Does not implicitly {@link google.bigtable.v2.ProtoRowsBatch.verify|verify} messages. + * @param message ProtoRowsBatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IProtoRowsBatch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtoRowsBatch message, length delimited. Does not implicitly {@link google.bigtable.v2.ProtoRowsBatch.verify|verify} messages. + * @param message ProtoRowsBatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IProtoRowsBatch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtoRowsBatch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtoRowsBatch + * @throws {Error} If the payload is not 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.ProtoRowsBatch; + + /** + * Decodes a ProtoRowsBatch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtoRowsBatch + * @throws {Error} If the payload 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.ProtoRowsBatch; + + /** + * Verifies a ProtoRowsBatch message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtoRowsBatch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtoRowsBatch + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ProtoRowsBatch; + + /** + * Creates a plain object from a ProtoRowsBatch message. Also converts values to other types if specified. + * @param message ProtoRowsBatch + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ProtoRowsBatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtoRowsBatch to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtoRowsBatch + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartialResultSet. */ + interface IPartialResultSet { + + /** PartialResultSet protoRowsBatch */ + protoRowsBatch?: (google.bigtable.v2.IProtoRowsBatch|null); + + /** PartialResultSet batchChecksum */ + batchChecksum?: (number|null); + + /** PartialResultSet resumeToken */ + resumeToken?: (Uint8Array|Buffer|string|null); + + /** PartialResultSet reset */ + reset?: (boolean|null); + + /** PartialResultSet estimatedBatchSize */ + estimatedBatchSize?: (number|null); + } + + /** Represents a PartialResultSet. */ + class PartialResultSet implements IPartialResultSet { + + /** + * Constructs a new PartialResultSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPartialResultSet); + + /** PartialResultSet protoRowsBatch. */ + public protoRowsBatch?: (google.bigtable.v2.IProtoRowsBatch|null); + + /** PartialResultSet batchChecksum. */ + public batchChecksum?: (number|null); + + /** PartialResultSet resumeToken. */ + public resumeToken: (Uint8Array|Buffer|string); + + /** PartialResultSet reset. */ + public reset: boolean; + + /** PartialResultSet estimatedBatchSize. */ + public estimatedBatchSize: number; + + /** PartialResultSet partialRows. */ + public partialRows?: "protoRowsBatch"; + + /** + * Creates a new PartialResultSet instance using the specified properties. + * @param [properties] Properties to set + * @returns PartialResultSet instance + */ + public static create(properties?: google.bigtable.v2.IPartialResultSet): google.bigtable.v2.PartialResultSet; + + /** + * Encodes the specified PartialResultSet message. Does not implicitly {@link google.bigtable.v2.PartialResultSet.verify|verify} messages. + * @param message PartialResultSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPartialResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartialResultSet message, length delimited. Does not implicitly {@link google.bigtable.v2.PartialResultSet.verify|verify} messages. + * @param message PartialResultSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPartialResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartialResultSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartialResultSet + * @throws {Error} If the payload is not 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.PartialResultSet; + + /** + * Decodes a PartialResultSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartialResultSet + * @throws {Error} If the payload 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.PartialResultSet; + + /** + * Verifies a PartialResultSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartialResultSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartialResultSet + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PartialResultSet; + + /** + * Creates a plain object from a PartialResultSet message. Also converts values to other types if specified. + * @param message PartialResultSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PartialResultSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartialResultSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartialResultSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Idempotency. */ + interface IIdempotency { + + /** Idempotency token */ + token?: (Uint8Array|Buffer|string|null); + + /** Idempotency startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Idempotency. */ + class Idempotency implements IIdempotency { + + /** + * Constructs a new Idempotency. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IIdempotency); + + /** Idempotency token. */ + public token: (Uint8Array|Buffer|string); + + /** Idempotency startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Idempotency instance using the specified properties. + * @param [properties] Properties to set + * @returns Idempotency instance + */ + public static create(properties?: google.bigtable.v2.IIdempotency): google.bigtable.v2.Idempotency; + + /** + * Encodes the specified Idempotency message. Does not implicitly {@link google.bigtable.v2.Idempotency.verify|verify} messages. + * @param message Idempotency message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IIdempotency, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Idempotency message, length delimited. Does not implicitly {@link google.bigtable.v2.Idempotency.verify|verify} messages. + * @param message Idempotency message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IIdempotency, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Idempotency message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Idempotency + * @throws {Error} If the payload is not 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.Idempotency; + + /** + * Decodes an Idempotency message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Idempotency + * @throws {Error} If the payload 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.Idempotency; + + /** + * Verifies an Idempotency message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Idempotency message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Idempotency + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Idempotency; + + /** + * Creates a plain object from an Idempotency message. Also converts values to other types if specified. + * @param message Idempotency + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Idempotency, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Idempotency to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Idempotency + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Type. */ + interface IType { + + /** Type bytesType */ + bytesType?: (google.bigtable.v2.Type.IBytes|null); + + /** Type stringType */ + stringType?: (google.bigtable.v2.Type.IString|null); + + /** Type int64Type */ + int64Type?: (google.bigtable.v2.Type.IInt64|null); + + /** Type float32Type */ + float32Type?: (google.bigtable.v2.Type.IFloat32|null); + + /** Type float64Type */ + float64Type?: (google.bigtable.v2.Type.IFloat64|null); + + /** Type boolType */ + boolType?: (google.bigtable.v2.Type.IBool|null); + + /** Type timestampType */ + timestampType?: (google.bigtable.v2.Type.ITimestamp|null); + + /** Type dateType */ + dateType?: (google.bigtable.v2.Type.IDate|null); + + /** Type aggregateType */ + aggregateType?: (google.bigtable.v2.Type.IAggregate|null); + + /** Type structType */ + structType?: (google.bigtable.v2.Type.IStruct|null); + + /** Type arrayType */ + arrayType?: (google.bigtable.v2.Type.IArray|null); + + /** Type mapType */ + mapType?: (google.bigtable.v2.Type.IMap|null); + + /** Type protoType */ + protoType?: (google.bigtable.v2.Type.IProto|null); + + /** Type enumType */ + enumType?: (google.bigtable.v2.Type.IEnum|null); + } + + /** Represents a Type. */ + class Type implements IType { + + /** + * Constructs a new Type. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IType); + + /** Type bytesType. */ + public bytesType?: (google.bigtable.v2.Type.IBytes|null); + + /** Type stringType. */ + public stringType?: (google.bigtable.v2.Type.IString|null); + + /** Type int64Type. */ + public int64Type?: (google.bigtable.v2.Type.IInt64|null); + + /** Type float32Type. */ + public float32Type?: (google.bigtable.v2.Type.IFloat32|null); + + /** Type float64Type. */ + public float64Type?: (google.bigtable.v2.Type.IFloat64|null); + + /** Type boolType. */ + public boolType?: (google.bigtable.v2.Type.IBool|null); + + /** Type timestampType. */ + public timestampType?: (google.bigtable.v2.Type.ITimestamp|null); + + /** Type dateType. */ + public dateType?: (google.bigtable.v2.Type.IDate|null); + + /** Type aggregateType. */ + public aggregateType?: (google.bigtable.v2.Type.IAggregate|null); + + /** Type structType. */ + public structType?: (google.bigtable.v2.Type.IStruct|null); + + /** Type arrayType. */ + public arrayType?: (google.bigtable.v2.Type.IArray|null); + + /** Type mapType. */ + public mapType?: (google.bigtable.v2.Type.IMap|null); + + /** Type protoType. */ + public protoType?: (google.bigtable.v2.Type.IProto|null); + + /** Type enumType. */ + public enumType?: (google.bigtable.v2.Type.IEnum|null); + + /** Type kind. */ + public kind?: ("bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"|"protoType"|"enumType"); + + /** + * Creates a new Type instance using the specified properties. + * @param [properties] Properties to set + * @returns Type instance + */ + public static create(properties?: google.bigtable.v2.IType): google.bigtable.v2.Type; + + /** + * Encodes the specified Type message. Does not implicitly {@link google.bigtable.v2.Type.verify|verify} messages. + * @param message Type message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Type message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.verify|verify} messages. + * @param message Type message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Type message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Type + * @throws {Error} If the payload is not 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.Type; + + /** + * Decodes a Type message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Type + * @throws {Error} If the payload 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.Type; + + /** + * Verifies a Type message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Type message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Type + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type; + + /** + * Creates a plain object from a Type message. Also converts values to other types if specified. + * @param message Type + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Type to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Type + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Type { + + /** Properties of a Bytes. */ + interface IBytes { + + /** Bytes encoding */ + encoding?: (google.bigtable.v2.Type.Bytes.IEncoding|null); + } + + /** Represents a Bytes. */ + class Bytes implements IBytes { + + /** + * Constructs a new Bytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IBytes); + + /** Bytes encoding. */ + public encoding?: (google.bigtable.v2.Type.Bytes.IEncoding|null); + + /** + * Creates a new Bytes instance using the specified properties. + * @param [properties] Properties to set + * @returns Bytes instance + */ + public static create(properties?: google.bigtable.v2.Type.IBytes): google.bigtable.v2.Type.Bytes; + + /** + * Encodes the specified Bytes message. Does not implicitly {@link google.bigtable.v2.Type.Bytes.verify|verify} messages. + * @param message Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Bytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Bytes.verify|verify} messages. + * @param message Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Bytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Bytes + * @throws {Error} If the payload is not 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.Type.Bytes; + + /** + * Decodes a Bytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Bytes + * @throws {Error} If the payload 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.Type.Bytes; + + /** + * Verifies a Bytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Bytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Bytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Bytes; + + /** + * Creates a plain object from a Bytes message. Also converts values to other types if specified. + * @param message Bytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Bytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Bytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Bytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Bytes { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding raw */ + raw?: (google.bigtable.v2.Type.Bytes.Encoding.IRaw|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Bytes.IEncoding); + + /** Encoding raw. */ + public raw?: (google.bigtable.v2.Type.Bytes.Encoding.IRaw|null); + + /** Encoding encoding. */ + public encoding?: "raw"; + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.v2.Type.Bytes.IEncoding): google.bigtable.v2.Type.Bytes.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.Bytes.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Bytes.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Bytes.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Bytes.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.Bytes.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.Bytes.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Bytes.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Bytes.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of a Raw. */ + interface IRaw { + + /** Raw escapeNulls */ + escapeNulls?: (boolean|null); + } + + /** Represents a Raw. */ + class Raw implements IRaw { + + /** + * Constructs a new Raw. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Bytes.Encoding.IRaw); + + /** Raw escapeNulls. */ + public escapeNulls: boolean; + + /** + * Creates a new Raw instance using the specified properties. + * @param [properties] Properties to set + * @returns Raw instance + */ + public static create(properties?: google.bigtable.v2.Type.Bytes.Encoding.IRaw): google.bigtable.v2.Type.Bytes.Encoding.Raw; + + /** + * Encodes the specified Raw message. Does not implicitly {@link google.bigtable.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @param message Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Bytes.Encoding.IRaw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Raw message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @param message Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Bytes.Encoding.IRaw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Raw message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Raw + * @throws {Error} If the payload is not 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.Type.Bytes.Encoding.Raw; + + /** + * Decodes a Raw message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Raw + * @throws {Error} If the payload 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.Type.Bytes.Encoding.Raw; + + /** + * Verifies a Raw message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Raw message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Raw + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Bytes.Encoding.Raw; + + /** + * Creates a plain object from a Raw message. Also converts values to other types if specified. + * @param message Raw + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Bytes.Encoding.Raw, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Raw to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Raw + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a String. */ + interface IString { + + /** String encoding */ + encoding?: (google.bigtable.v2.Type.String.IEncoding|null); + } + + /** Represents a String. */ + class String implements IString { + + /** + * Constructs a new String. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IString); + + /** String encoding. */ + public encoding?: (google.bigtable.v2.Type.String.IEncoding|null); + + /** + * Creates a new String instance using the specified properties. + * @param [properties] Properties to set + * @returns String instance + */ + public static create(properties?: google.bigtable.v2.Type.IString): google.bigtable.v2.Type.String; + + /** + * Encodes the specified String message. Does not implicitly {@link google.bigtable.v2.Type.String.verify|verify} messages. + * @param message String message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IString, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified String message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.String.verify|verify} messages. + * @param message String message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IString, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a String message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns String + * @throws {Error} If the payload is not 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.Type.String; + + /** + * Decodes a String message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns String + * @throws {Error} If the payload 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.Type.String; + + /** + * Verifies a String message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a String message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns String + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.String; + + /** + * Creates a plain object from a String message. Also converts values to other types if specified. + * @param message String + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.String, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this String to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for String + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace String { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding utf8Raw */ + utf8Raw?: (google.bigtable.v2.Type.String.Encoding.IUtf8Raw|null); + + /** Encoding utf8Bytes */ + utf8Bytes?: (google.bigtable.v2.Type.String.Encoding.IUtf8Bytes|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.String.IEncoding); + + /** Encoding utf8Raw. */ + public utf8Raw?: (google.bigtable.v2.Type.String.Encoding.IUtf8Raw|null); + + /** Encoding utf8Bytes. */ + public utf8Bytes?: (google.bigtable.v2.Type.String.Encoding.IUtf8Bytes|null); + + /** Encoding encoding. */ + public encoding?: ("utf8Raw"|"utf8Bytes"); + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.v2.Type.String.IEncoding): google.bigtable.v2.Type.String.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.String.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.String.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.String.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.String.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.String.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.String.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of an Utf8Raw. */ + interface IUtf8Raw { + } + + /** Represents an Utf8Raw. */ + class Utf8Raw implements IUtf8Raw { + + /** + * Constructs a new Utf8Raw. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.String.Encoding.IUtf8Raw); + + /** + * Creates a new Utf8Raw instance using the specified properties. + * @param [properties] Properties to set + * @returns Utf8Raw instance + */ + public static create(properties?: google.bigtable.v2.Type.String.Encoding.IUtf8Raw): google.bigtable.v2.Type.String.Encoding.Utf8Raw; + + /** + * Encodes the specified Utf8Raw message. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify|verify} messages. + * @param message Utf8Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.String.Encoding.IUtf8Raw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Utf8Raw message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify|verify} messages. + * @param message Utf8Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.String.Encoding.IUtf8Raw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Utf8Raw message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Utf8Raw + * @throws {Error} If the payload is not 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.Type.String.Encoding.Utf8Raw; + + /** + * Decodes an Utf8Raw message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Utf8Raw + * @throws {Error} If the payload 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.Type.String.Encoding.Utf8Raw; + + /** + * Verifies an Utf8Raw message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Utf8Raw message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Utf8Raw + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.String.Encoding.Utf8Raw; + + /** + * Creates a plain object from an Utf8Raw message. Also converts values to other types if specified. + * @param message Utf8Raw + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.String.Encoding.Utf8Raw, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Utf8Raw to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Utf8Raw + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Utf8Bytes. */ + interface IUtf8Bytes { + + /** Utf8Bytes nullEscapeChar */ + nullEscapeChar?: (string|null); + } + + /** Represents an Utf8Bytes. */ + class Utf8Bytes implements IUtf8Bytes { + + /** + * Constructs a new Utf8Bytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.String.Encoding.IUtf8Bytes); + + /** Utf8Bytes nullEscapeChar. */ + public nullEscapeChar: string; + + /** + * Creates a new Utf8Bytes instance using the specified properties. + * @param [properties] Properties to set + * @returns Utf8Bytes instance + */ + public static create(properties?: google.bigtable.v2.Type.String.Encoding.IUtf8Bytes): google.bigtable.v2.Type.String.Encoding.Utf8Bytes; + + /** + * Encodes the specified Utf8Bytes message. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.Utf8Bytes.verify|verify} messages. + * @param message Utf8Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.String.Encoding.IUtf8Bytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Utf8Bytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.Utf8Bytes.verify|verify} messages. + * @param message Utf8Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.String.Encoding.IUtf8Bytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Utf8Bytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Utf8Bytes + * @throws {Error} If the payload is not 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.Type.String.Encoding.Utf8Bytes; + + /** + * Decodes an Utf8Bytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Utf8Bytes + * @throws {Error} If the payload 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.Type.String.Encoding.Utf8Bytes; + + /** + * Verifies an Utf8Bytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Utf8Bytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Utf8Bytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.String.Encoding.Utf8Bytes; + + /** + * Creates a plain object from an Utf8Bytes message. Also converts values to other types if specified. + * @param message Utf8Bytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.String.Encoding.Utf8Bytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Utf8Bytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Utf8Bytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an Int64. */ + interface IInt64 { + + /** Int64 encoding */ + encoding?: (google.bigtable.v2.Type.Int64.IEncoding|null); + } + + /** Represents an Int64. */ + class Int64 implements IInt64 { + + /** + * Constructs a new Int64. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IInt64); + + /** Int64 encoding. */ + public encoding?: (google.bigtable.v2.Type.Int64.IEncoding|null); + + /** + * Creates a new Int64 instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64 instance + */ + public static create(properties?: google.bigtable.v2.Type.IInt64): google.bigtable.v2.Type.Int64; + + /** + * Encodes the specified Int64 message. Does not implicitly {@link google.bigtable.v2.Type.Int64.verify|verify} messages. + * @param message Int64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IInt64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64 message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Int64.verify|verify} messages. + * @param message Int64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IInt64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64 + * @throws {Error} If the payload is not 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.Type.Int64; + + /** + * Decodes an Int64 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64 + * @throws {Error} If the payload 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.Type.Int64; + + /** + * Verifies an Int64 message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int64 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64 + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Int64; + + /** + * Creates a plain object from an Int64 message. Also converts values to other types if specified. + * @param message Int64 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Int64, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Int64 { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding bigEndianBytes */ + bigEndianBytes?: (google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes|null); + + /** Encoding orderedCodeBytes */ + orderedCodeBytes?: (google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Int64.IEncoding); + + /** Encoding bigEndianBytes. */ + public bigEndianBytes?: (google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes|null); + + /** Encoding orderedCodeBytes. */ + public orderedCodeBytes?: (google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes|null); + + /** Encoding encoding. */ + public encoding?: ("bigEndianBytes"|"orderedCodeBytes"); + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.v2.Type.Int64.IEncoding): google.bigtable.v2.Type.Int64.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Int64.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Int64.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.Int64.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.Int64.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Int64.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Int64.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of a BigEndianBytes. */ + interface IBigEndianBytes { + + /** BigEndianBytes bytesType */ + bytesType?: (google.bigtable.v2.Type.IBytes|null); + } + + /** Represents a BigEndianBytes. */ + class BigEndianBytes implements IBigEndianBytes { + + /** + * Constructs a new BigEndianBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes); + + /** BigEndianBytes bytesType. */ + public bytesType?: (google.bigtable.v2.Type.IBytes|null); + + /** + * Creates a new BigEndianBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns BigEndianBytes instance + */ + public static create(properties?: google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes): google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes; + + /** + * Encodes the specified BigEndianBytes message. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @param message BigEndianBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigEndianBytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @param message BigEndianBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigEndianBytes + * @throws {Error} If the payload is not 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.Type.Int64.Encoding.BigEndianBytes; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigEndianBytes + * @throws {Error} If the payload 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.Type.Int64.Encoding.BigEndianBytes; + + /** + * Verifies a BigEndianBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigEndianBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigEndianBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes; + + /** + * Creates a plain object from a BigEndianBytes message. Also converts values to other types if specified. + * @param message BigEndianBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigEndianBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigEndianBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OrderedCodeBytes. */ + interface IOrderedCodeBytes { + } + + /** Represents an OrderedCodeBytes. */ + class OrderedCodeBytes implements IOrderedCodeBytes { + + /** + * Constructs a new OrderedCodeBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes); + + /** + * Creates a new OrderedCodeBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderedCodeBytes instance + */ + public static create(properties?: google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes): google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes; + + /** + * Encodes the specified OrderedCodeBytes message. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.verify|verify} messages. + * @param message OrderedCodeBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderedCodeBytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.verify|verify} messages. + * @param message OrderedCodeBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderedCodeBytes + * @throws {Error} If the payload is not 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.Type.Int64.Encoding.OrderedCodeBytes; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderedCodeBytes + * @throws {Error} If the payload 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.Type.Int64.Encoding.OrderedCodeBytes; + + /** + * Verifies an OrderedCodeBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrderedCodeBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderedCodeBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes; + + /** + * Creates a plain object from an OrderedCodeBytes message. Also converts values to other types if specified. + * @param message OrderedCodeBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderedCodeBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderedCodeBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Bool. */ + interface IBool { + } + + /** Represents a Bool. */ + class Bool implements IBool { + + /** + * Constructs a new Bool. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IBool); + + /** + * Creates a new Bool instance using the specified properties. + * @param [properties] Properties to set + * @returns Bool instance + */ + public static create(properties?: google.bigtable.v2.Type.IBool): google.bigtable.v2.Type.Bool; + + /** + * Encodes the specified Bool message. Does not implicitly {@link google.bigtable.v2.Type.Bool.verify|verify} messages. + * @param message Bool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IBool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Bool message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Bool.verify|verify} messages. + * @param message Bool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IBool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Bool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Bool + * @throws {Error} If the payload is not 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.Type.Bool; + + /** + * Decodes a Bool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Bool + * @throws {Error} If the payload 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.Type.Bool; + + /** + * Verifies a Bool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Bool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Bool + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Bool; + + /** + * Creates a plain object from a Bool message. Also converts values to other types if specified. + * @param message Bool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Bool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Bool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Bool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Float32. */ + interface IFloat32 { + } + + /** Represents a Float32. */ + class Float32 implements IFloat32 { + + /** + * Constructs a new Float32. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IFloat32); + + /** + * Creates a new Float32 instance using the specified properties. + * @param [properties] Properties to set + * @returns Float32 instance + */ + public static create(properties?: google.bigtable.v2.Type.IFloat32): google.bigtable.v2.Type.Float32; + + /** + * Encodes the specified Float32 message. Does not implicitly {@link google.bigtable.v2.Type.Float32.verify|verify} messages. + * @param message Float32 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IFloat32, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Float32 message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Float32.verify|verify} messages. + * @param message Float32 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IFloat32, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Float32 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Float32 + * @throws {Error} If the payload is not 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.Type.Float32; + + /** + * Decodes a Float32 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Float32 + * @throws {Error} If the payload 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.Type.Float32; + + /** + * Verifies a Float32 message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Float32 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Float32 + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Float32; + + /** + * Creates a plain object from a Float32 message. Also converts values to other types if specified. + * @param message Float32 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Float32, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Float32 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Float32 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Float64. */ + interface IFloat64 { + } + + /** Represents a Float64. */ + class Float64 implements IFloat64 { + + /** + * Constructs a new Float64. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IFloat64); + + /** + * Creates a new Float64 instance using the specified properties. + * @param [properties] Properties to set + * @returns Float64 instance + */ + public static create(properties?: google.bigtable.v2.Type.IFloat64): google.bigtable.v2.Type.Float64; + + /** + * Encodes the specified Float64 message. Does not implicitly {@link google.bigtable.v2.Type.Float64.verify|verify} messages. + * @param message Float64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IFloat64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Float64 message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Float64.verify|verify} messages. + * @param message Float64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IFloat64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Float64 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Float64 + * @throws {Error} If the payload is not 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.Type.Float64; + + /** + * Decodes a Float64 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Float64 + * @throws {Error} If the payload 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.Type.Float64; + + /** + * Verifies a Float64 message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Float64 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Float64 + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Float64; + + /** + * Creates a plain object from a Float64 message. Also converts values to other types if specified. + * @param message Float64 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Float64, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Float64 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Float64 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp encoding */ + encoding?: (google.bigtable.v2.Type.Timestamp.IEncoding|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.ITimestamp); + + /** Timestamp encoding. */ + public encoding?: (google.bigtable.v2.Type.Timestamp.IEncoding|null); + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.bigtable.v2.Type.ITimestamp): google.bigtable.v2.Type.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Timestamp { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding unixMicrosInt64 */ + unixMicrosInt64?: (google.bigtable.v2.Type.Int64.IEncoding|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Timestamp.IEncoding); + + /** Encoding unixMicrosInt64. */ + public unixMicrosInt64?: (google.bigtable.v2.Type.Int64.IEncoding|null); + + /** Encoding encoding. */ + public encoding?: "unixMicrosInt64"; + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.v2.Type.Timestamp.IEncoding): google.bigtable.v2.Type.Timestamp.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Timestamp.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Timestamp.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.Timestamp.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.Timestamp.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Timestamp.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Timestamp.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Date. */ + interface IDate { + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IDate); + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.bigtable.v2.Type.IDate): google.bigtable.v2.Type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.bigtable.v2.Type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: (google.bigtable.v2.Type.Struct.IField[]|null); + + /** Struct encoding */ + encoding?: (google.bigtable.v2.Type.Struct.IEncoding|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IStruct); + + /** Struct fields. */ + public fields: google.bigtable.v2.Type.Struct.IField[]; + + /** Struct encoding. */ + public encoding?: (google.bigtable.v2.Type.Struct.IEncoding|null); + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.bigtable.v2.Type.IStruct): google.bigtable.v2.Type.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.bigtable.v2.Type.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.Type.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.Type.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Struct { + + /** Properties of a Field. */ + interface IField { + + /** Field fieldName */ + fieldName?: (string|null); + + /** Field type */ + type?: (google.bigtable.v2.IType|null); + } + + /** Represents a Field. */ + class Field implements IField { + + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Struct.IField); + + /** Field fieldName. */ + public fieldName: string; + + /** Field type. */ + public type?: (google.bigtable.v2.IType|null); + + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: google.bigtable.v2.Type.Struct.IField): google.bigtable.v2.Type.Struct.Field; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Struct.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Struct.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @throws {Error} If the payload is not 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.Type.Struct.Field; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @throws {Error} If the payload 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.Type.Struct.Field; + + /** + * Verifies a Field message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Struct.Field; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Struct.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding singleton */ + singleton?: (google.bigtable.v2.Type.Struct.Encoding.ISingleton|null); + + /** Encoding delimitedBytes */ + delimitedBytes?: (google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes|null); + + /** Encoding orderedCodeBytes */ + orderedCodeBytes?: (google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Struct.IEncoding); + + /** Encoding singleton. */ + public singleton?: (google.bigtable.v2.Type.Struct.Encoding.ISingleton|null); + + /** Encoding delimitedBytes. */ + public delimitedBytes?: (google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes|null); + + /** Encoding orderedCodeBytes. */ + public orderedCodeBytes?: (google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes|null); + + /** Encoding encoding. */ + public encoding?: ("singleton"|"delimitedBytes"|"orderedCodeBytes"); + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.v2.Type.Struct.IEncoding): google.bigtable.v2.Type.Struct.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Struct.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Struct.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is not 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.Type.Struct.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the payload 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.Type.Struct.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Struct.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Struct.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of a Singleton. */ + interface ISingleton { + } + + /** Represents a Singleton. */ + class Singleton implements ISingleton { + + /** + * Constructs a new Singleton. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Struct.Encoding.ISingleton); + + /** + * Creates a new Singleton instance using the specified properties. + * @param [properties] Properties to set + * @returns Singleton instance + */ + public static create(properties?: google.bigtable.v2.Type.Struct.Encoding.ISingleton): google.bigtable.v2.Type.Struct.Encoding.Singleton; + + /** + * Encodes the specified Singleton message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.Singleton.verify|verify} messages. + * @param message Singleton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Struct.Encoding.ISingleton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Singleton message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.Singleton.verify|verify} messages. + * @param message Singleton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Struct.Encoding.ISingleton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Singleton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Singleton + * @throws {Error} If the payload is not 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.Type.Struct.Encoding.Singleton; + + /** + * Decodes a Singleton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Singleton + * @throws {Error} If the payload 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.Type.Struct.Encoding.Singleton; + + /** + * Verifies a Singleton message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Singleton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Singleton + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Struct.Encoding.Singleton; + + /** + * Creates a plain object from a Singleton message. Also converts values to other types if specified. + * @param message Singleton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Struct.Encoding.Singleton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Singleton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Singleton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DelimitedBytes. */ + interface IDelimitedBytes { + + /** DelimitedBytes delimiter */ + delimiter?: (Uint8Array|Buffer|string|null); + } + + /** Represents a DelimitedBytes. */ + class DelimitedBytes implements IDelimitedBytes { + + /** + * Constructs a new DelimitedBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes); + + /** DelimitedBytes delimiter. */ + public delimiter: (Uint8Array|Buffer|string); + + /** + * Creates a new DelimitedBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns DelimitedBytes instance + */ + public static create(properties?: google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes): google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes; + + /** + * Encodes the specified DelimitedBytes message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.verify|verify} messages. + * @param message DelimitedBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DelimitedBytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.verify|verify} messages. + * @param message DelimitedBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DelimitedBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DelimitedBytes + * @throws {Error} If the payload is not 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.Type.Struct.Encoding.DelimitedBytes; + + /** + * Decodes a DelimitedBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DelimitedBytes + * @throws {Error} If the payload 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.Type.Struct.Encoding.DelimitedBytes; + + /** + * Verifies a DelimitedBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DelimitedBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DelimitedBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes; + + /** + * Creates a plain object from a DelimitedBytes message. Also converts values to other types if specified. + * @param message DelimitedBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DelimitedBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DelimitedBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OrderedCodeBytes. */ + interface IOrderedCodeBytes { + } + + /** Represents an OrderedCodeBytes. */ + class OrderedCodeBytes implements IOrderedCodeBytes { + + /** + * Constructs a new OrderedCodeBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes); + + /** + * Creates a new OrderedCodeBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderedCodeBytes instance + */ + public static create(properties?: google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes): google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes; + + /** + * Encodes the specified OrderedCodeBytes message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.verify|verify} messages. + * @param message OrderedCodeBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderedCodeBytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.verify|verify} messages. + * @param message OrderedCodeBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderedCodeBytes + * @throws {Error} If the payload is not 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.Type.Struct.Encoding.OrderedCodeBytes; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderedCodeBytes + * @throws {Error} If the payload 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.Type.Struct.Encoding.OrderedCodeBytes; + + /** + * Verifies an OrderedCodeBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrderedCodeBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderedCodeBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes; + + /** + * Creates a plain object from an OrderedCodeBytes message. Also converts values to other types if specified. + * @param message OrderedCodeBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderedCodeBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderedCodeBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Proto. */ + interface IProto { + + /** Proto schemaBundleId */ + schemaBundleId?: (string|null); + + /** Proto messageName */ + messageName?: (string|null); + } + + /** Represents a Proto. */ + class Proto implements IProto { + + /** + * Constructs a new Proto. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IProto); + + /** Proto schemaBundleId. */ + public schemaBundleId: string; + + /** Proto messageName. */ + public messageName: string; + + /** + * Creates a new Proto instance using the specified properties. + * @param [properties] Properties to set + * @returns Proto instance + */ + public static create(properties?: google.bigtable.v2.Type.IProto): google.bigtable.v2.Type.Proto; + + /** + * Encodes the specified Proto message. Does not implicitly {@link google.bigtable.v2.Type.Proto.verify|verify} messages. + * @param message Proto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Proto message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Proto.verify|verify} messages. + * @param message Proto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Proto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Proto + * @throws {Error} If the payload is not 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.Type.Proto; + + /** + * Decodes a Proto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Proto + * @throws {Error} If the payload 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.Type.Proto; + + /** + * Verifies a Proto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Proto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Proto + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Proto; + + /** + * Creates a plain object from a Proto message. Also converts values to other types if specified. + * @param message Proto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Proto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Proto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Proto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Enum. */ + interface IEnum { + + /** Enum schemaBundleId */ + schemaBundleId?: (string|null); + + /** Enum enumName */ + enumName?: (string|null); + } + + /** Represents an Enum. */ + class Enum implements IEnum { + + /** + * Constructs a new Enum. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IEnum); + + /** Enum schemaBundleId. */ + public schemaBundleId: string; + + /** Enum enumName. */ + public enumName: string; + + /** + * Creates a new Enum instance using the specified properties. + * @param [properties] Properties to set + * @returns Enum instance + */ + public static create(properties?: google.bigtable.v2.Type.IEnum): google.bigtable.v2.Type.Enum; + + /** + * Encodes the specified Enum message. Does not implicitly {@link google.bigtable.v2.Type.Enum.verify|verify} messages. + * @param message Enum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Enum message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Enum.verify|verify} messages. + * @param message Enum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Enum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Enum + * @throws {Error} If the payload is not 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.Type.Enum; + + /** + * Decodes an Enum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Enum + * @throws {Error} If the payload 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.Type.Enum; + + /** + * Verifies an Enum message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Enum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Enum + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Enum; + + /** + * Creates a plain object from an Enum message. Also converts values to other types if specified. + * @param message Enum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Enum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Enum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Enum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Array. */ + interface IArray { + + /** Array elementType */ + elementType?: (google.bigtable.v2.IType|null); + } + + /** Represents an Array. */ + class Array implements IArray { + + /** + * Constructs a new Array. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IArray); + + /** Array elementType. */ + public elementType?: (google.bigtable.v2.IType|null); + + /** + * Creates a new Array instance using the specified properties. + * @param [properties] Properties to set + * @returns Array instance + */ + public static create(properties?: google.bigtable.v2.Type.IArray): google.bigtable.v2.Type.Array; + + /** + * Encodes the specified Array message. Does not implicitly {@link google.bigtable.v2.Type.Array.verify|verify} messages. + * @param message Array message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IArray, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Array message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Array.verify|verify} messages. + * @param message Array message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IArray, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Array message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Array + * @throws {Error} If the payload is not 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.Type.Array; + + /** + * Decodes an Array message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Array + * @throws {Error} If the payload 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.Type.Array; + + /** + * Verifies an Array message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Array message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Array + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Array; + + /** + * Creates a plain object from an Array message. Also converts values to other types if specified. + * @param message Array + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Array, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Array to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Array + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Map. */ + interface IMap { + + /** Map keyType */ + keyType?: (google.bigtable.v2.IType|null); + + /** Map valueType */ + valueType?: (google.bigtable.v2.IType|null); + } + + /** Represents a Map. */ + class Map implements IMap { + + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IMap); + + /** Map keyType. */ + public keyType?: (google.bigtable.v2.IType|null); + + /** Map valueType. */ + public valueType?: (google.bigtable.v2.IType|null); + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create(properties?: google.bigtable.v2.Type.IMap): google.bigtable.v2.Type.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link google.bigtable.v2.Type.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @throws {Error} If the payload is not 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.Type.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @throws {Error} If the payload 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.Type.Map; + + /** + * Verifies a Map message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Aggregate. */ + interface IAggregate { + + /** Aggregate inputType */ + inputType?: (google.bigtable.v2.IType|null); + + /** Aggregate stateType */ + stateType?: (google.bigtable.v2.IType|null); + + /** Aggregate sum */ + sum?: (google.bigtable.v2.Type.Aggregate.ISum|null); + + /** Aggregate hllppUniqueCount */ + hllppUniqueCount?: (google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null); + + /** Aggregate max */ + max?: (google.bigtable.v2.Type.Aggregate.IMax|null); + + /** Aggregate min */ + min?: (google.bigtable.v2.Type.Aggregate.IMin|null); + } + + /** Represents an Aggregate. */ + class Aggregate implements IAggregate { + + /** + * Constructs a new Aggregate. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.IAggregate); + + /** Aggregate inputType. */ + public inputType?: (google.bigtable.v2.IType|null); + + /** Aggregate stateType. */ + public stateType?: (google.bigtable.v2.IType|null); + + /** Aggregate sum. */ + public sum?: (google.bigtable.v2.Type.Aggregate.ISum|null); + + /** Aggregate hllppUniqueCount. */ + public hllppUniqueCount?: (google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null); + + /** Aggregate max. */ + public max?: (google.bigtable.v2.Type.Aggregate.IMax|null); + + /** Aggregate min. */ + public min?: (google.bigtable.v2.Type.Aggregate.IMin|null); + + /** Aggregate aggregator. */ + public aggregator?: ("sum"|"hllppUniqueCount"|"max"|"min"); + + /** + * Creates a new Aggregate instance using the specified properties. + * @param [properties] Properties to set + * @returns Aggregate instance + */ + public static create(properties?: google.bigtable.v2.Type.IAggregate): google.bigtable.v2.Type.Aggregate; + + /** + * Encodes the specified Aggregate message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.verify|verify} messages. + * @param message Aggregate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Aggregate message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.verify|verify} messages. + * @param message Aggregate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Aggregate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aggregate + * @throws {Error} If the payload is not 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.Type.Aggregate; + + /** + * Decodes an Aggregate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aggregate + * @throws {Error} If the payload 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.Type.Aggregate; + + /** + * Verifies an Aggregate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregate + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Aggregate; + + /** + * Creates a plain object from an Aggregate message. Also converts values to other types if specified. + * @param message Aggregate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Aggregate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aggregate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Aggregate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Aggregate { + + /** Properties of a Sum. */ + interface ISum { + } + + /** Represents a Sum. */ + class Sum implements ISum { + + /** + * Constructs a new Sum. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Aggregate.ISum); + + /** + * Creates a new Sum instance using the specified properties. + * @param [properties] Properties to set + * @returns Sum instance + */ + public static create(properties?: google.bigtable.v2.Type.Aggregate.ISum): google.bigtable.v2.Type.Aggregate.Sum; + + /** + * Encodes the specified Sum message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Sum.verify|verify} messages. + * @param message Sum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Aggregate.ISum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Sum.verify|verify} messages. + * @param message Sum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Aggregate.ISum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sum + * @throws {Error} If the payload is not 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.Type.Aggregate.Sum; + + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sum + * @throws {Error} If the payload 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.Type.Aggregate.Sum; + + /** + * Verifies a Sum message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sum + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Aggregate.Sum; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @param message Sum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Aggregate.Sum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Max. */ + interface IMax { + } + + /** Represents a Max. */ + class Max implements IMax { + + /** + * Constructs a new Max. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Aggregate.IMax); + + /** + * Creates a new Max instance using the specified properties. + * @param [properties] Properties to set + * @returns Max instance + */ + public static create(properties?: google.bigtable.v2.Type.Aggregate.IMax): google.bigtable.v2.Type.Aggregate.Max; + + /** + * Encodes the specified Max message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Max.verify|verify} messages. + * @param message Max message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Aggregate.IMax, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Max message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Max.verify|verify} messages. + * @param message Max message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Aggregate.IMax, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Max message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Max + * @throws {Error} If the payload is not 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.Type.Aggregate.Max; + + /** + * Decodes a Max message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Max + * @throws {Error} If the payload 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.Type.Aggregate.Max; + + /** + * Verifies a Max message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Max message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Max + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Aggregate.Max; + + /** + * Creates a plain object from a Max message. Also converts values to other types if specified. + * @param message Max + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Aggregate.Max, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Max to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Max + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Min. */ + interface IMin { + } + + /** Represents a Min. */ + class Min implements IMin { + + /** + * Constructs a new Min. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Aggregate.IMin); + + /** + * Creates a new Min instance using the specified properties. + * @param [properties] Properties to set + * @returns Min instance + */ + public static create(properties?: google.bigtable.v2.Type.Aggregate.IMin): google.bigtable.v2.Type.Aggregate.Min; + + /** + * Encodes the specified Min message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Min.verify|verify} messages. + * @param message Min message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Aggregate.IMin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Min message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Min.verify|verify} messages. + * @param message Min message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Aggregate.IMin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Min message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Min + * @throws {Error} If the payload is not 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.Type.Aggregate.Min; + + /** + * Decodes a Min message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Min + * @throws {Error} If the payload 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.Type.Aggregate.Min; + + /** + * Verifies a Min message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Min message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Min + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Aggregate.Min; + + /** + * Creates a plain object from a Min message. Also converts values to other types if specified. + * @param message Min + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Aggregate.Min, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Min to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Min + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HyperLogLogPlusPlusUniqueCount. */ + interface IHyperLogLogPlusPlusUniqueCount { + } + + /** Represents a HyperLogLogPlusPlusUniqueCount. */ + class HyperLogLogPlusPlusUniqueCount implements IHyperLogLogPlusPlusUniqueCount { + + /** + * Constructs a new HyperLogLogPlusPlusUniqueCount. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount); + + /** + * Creates a new HyperLogLogPlusPlusUniqueCount instance using the specified properties. + * @param [properties] Properties to set + * @returns HyperLogLogPlusPlusUniqueCount instance + */ + public static create(properties?: google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount): google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount; + + /** + * Encodes the specified HyperLogLogPlusPlusUniqueCount message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify|verify} messages. + * @param message HyperLogLogPlusPlusUniqueCount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HyperLogLogPlusPlusUniqueCount message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify|verify} messages. + * @param message HyperLogLogPlusPlusUniqueCount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HyperLogLogPlusPlusUniqueCount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HyperLogLogPlusPlusUniqueCount + * @throws {Error} If the payload is not 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.Type.Aggregate.HyperLogLogPlusPlusUniqueCount; + + /** + * Decodes a HyperLogLogPlusPlusUniqueCount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HyperLogLogPlusPlusUniqueCount + * @throws {Error} If the payload 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.Type.Aggregate.HyperLogLogPlusPlusUniqueCount; + + /** + * Verifies a HyperLogLogPlusPlusUniqueCount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HyperLogLogPlusPlusUniqueCount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HyperLogLogPlusPlusUniqueCount + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount; + + /** + * Creates a plain object from a HyperLogLogPlusPlusUniqueCount message. Also converts values to other types if specified. + * @param message HyperLogLogPlusPlusUniqueCount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HyperLogLogPlusPlusUniqueCount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HyperLogLogPlusPlusUniqueCount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a ReadIterationStats. */ + interface IReadIterationStats { + + /** ReadIterationStats rowsSeenCount */ + rowsSeenCount?: (number|Long|string|null); + + /** ReadIterationStats rowsReturnedCount */ + rowsReturnedCount?: (number|Long|string|null); + + /** ReadIterationStats cellsSeenCount */ + cellsSeenCount?: (number|Long|string|null); + + /** ReadIterationStats cellsReturnedCount */ + cellsReturnedCount?: (number|Long|string|null); + } + + /** Represents a ReadIterationStats. */ + class ReadIterationStats implements IReadIterationStats { + + /** + * Constructs a new ReadIterationStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IReadIterationStats); + + /** ReadIterationStats rowsSeenCount. */ + public rowsSeenCount: (number|Long|string); + + /** ReadIterationStats rowsReturnedCount. */ + public rowsReturnedCount: (number|Long|string); + + /** ReadIterationStats cellsSeenCount. */ + public cellsSeenCount: (number|Long|string); + + /** ReadIterationStats cellsReturnedCount. */ + public cellsReturnedCount: (number|Long|string); + + /** + * Creates a new ReadIterationStats instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadIterationStats instance + */ + public static create(properties?: google.bigtable.v2.IReadIterationStats): google.bigtable.v2.ReadIterationStats; + + /** + * Encodes the specified ReadIterationStats message. Does not implicitly {@link google.bigtable.v2.ReadIterationStats.verify|verify} messages. + * @param message ReadIterationStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IReadIterationStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadIterationStats message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadIterationStats.verify|verify} messages. + * @param message ReadIterationStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IReadIterationStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadIterationStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadIterationStats + * @throws {Error} If the payload is not 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.ReadIterationStats; + + /** + * Decodes a ReadIterationStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadIterationStats + * @throws {Error} If the payload 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.ReadIterationStats; + + /** + * Verifies a ReadIterationStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadIterationStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadIterationStats + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ReadIterationStats; + + /** + * Creates a plain object from a ReadIterationStats message. Also converts values to other types if specified. + * @param message ReadIterationStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ReadIterationStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadIterationStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadIterationStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RequestLatencyStats. */ + interface IRequestLatencyStats { + + /** RequestLatencyStats frontendServerLatency */ + frontendServerLatency?: (google.protobuf.IDuration|null); + } + + /** Represents a RequestLatencyStats. */ + class RequestLatencyStats implements IRequestLatencyStats { + + /** + * Constructs a new RequestLatencyStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IRequestLatencyStats); + + /** RequestLatencyStats frontendServerLatency. */ + public frontendServerLatency?: (google.protobuf.IDuration|null); + + /** + * Creates a new RequestLatencyStats instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestLatencyStats instance + */ + public static create(properties?: google.bigtable.v2.IRequestLatencyStats): google.bigtable.v2.RequestLatencyStats; + + /** + * Encodes the specified RequestLatencyStats message. Does not implicitly {@link google.bigtable.v2.RequestLatencyStats.verify|verify} messages. + * @param message RequestLatencyStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IRequestLatencyStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestLatencyStats message, length delimited. Does not implicitly {@link google.bigtable.v2.RequestLatencyStats.verify|verify} messages. + * @param message RequestLatencyStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IRequestLatencyStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestLatencyStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestLatencyStats + * @throws {Error} If the payload is not 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.RequestLatencyStats; + + /** + * Decodes a RequestLatencyStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestLatencyStats + * @throws {Error} If the payload 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.RequestLatencyStats; + + /** + * Verifies a RequestLatencyStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestLatencyStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestLatencyStats + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RequestLatencyStats; + + /** + * Creates a plain object from a RequestLatencyStats message. Also converts values to other types if specified. + * @param message RequestLatencyStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RequestLatencyStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestLatencyStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestLatencyStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FullReadStatsView. */ + interface IFullReadStatsView { + + /** FullReadStatsView readIterationStats */ + readIterationStats?: (google.bigtable.v2.IReadIterationStats|null); + + /** FullReadStatsView requestLatencyStats */ + requestLatencyStats?: (google.bigtable.v2.IRequestLatencyStats|null); + } + + /** Represents a FullReadStatsView. */ + class FullReadStatsView implements IFullReadStatsView { + + /** + * Constructs a new FullReadStatsView. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IFullReadStatsView); + + /** FullReadStatsView readIterationStats. */ + public readIterationStats?: (google.bigtable.v2.IReadIterationStats|null); + + /** FullReadStatsView requestLatencyStats. */ + public requestLatencyStats?: (google.bigtable.v2.IRequestLatencyStats|null); + + /** + * Creates a new FullReadStatsView instance using the specified properties. + * @param [properties] Properties to set + * @returns FullReadStatsView instance + */ + public static create(properties?: google.bigtable.v2.IFullReadStatsView): google.bigtable.v2.FullReadStatsView; + + /** + * Encodes the specified FullReadStatsView message. Does not implicitly {@link google.bigtable.v2.FullReadStatsView.verify|verify} messages. + * @param message FullReadStatsView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IFullReadStatsView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FullReadStatsView message, length delimited. Does not implicitly {@link google.bigtable.v2.FullReadStatsView.verify|verify} messages. + * @param message FullReadStatsView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IFullReadStatsView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FullReadStatsView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FullReadStatsView + * @throws {Error} If the payload is not 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.FullReadStatsView; + + /** + * Decodes a FullReadStatsView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FullReadStatsView + * @throws {Error} If the payload 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.FullReadStatsView; + + /** + * Verifies a FullReadStatsView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FullReadStatsView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FullReadStatsView + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.FullReadStatsView; + + /** + * Creates a plain object from a FullReadStatsView message. Also converts values to other types if specified. + * @param message FullReadStatsView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.FullReadStatsView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FullReadStatsView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FullReadStatsView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RequestStats. */ + interface IRequestStats { + + /** RequestStats fullReadStatsView */ + fullReadStatsView?: (google.bigtable.v2.IFullReadStatsView|null); + } + + /** Represents a RequestStats. */ + class RequestStats implements IRequestStats { + + /** + * Constructs a new RequestStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IRequestStats); + + /** RequestStats fullReadStatsView. */ + public fullReadStatsView?: (google.bigtable.v2.IFullReadStatsView|null); + + /** RequestStats statsView. */ + public statsView?: "fullReadStatsView"; + + /** + * Creates a new RequestStats instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestStats instance + */ + public static create(properties?: google.bigtable.v2.IRequestStats): google.bigtable.v2.RequestStats; + + /** + * Encodes the specified RequestStats message. Does not implicitly {@link google.bigtable.v2.RequestStats.verify|verify} messages. + * @param message RequestStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IRequestStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestStats message, length delimited. Does not implicitly {@link google.bigtable.v2.RequestStats.verify|verify} messages. + * @param message RequestStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IRequestStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestStats + * @throws {Error} If the payload is not 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.RequestStats; + + /** + * Decodes a RequestStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestStats + * @throws {Error} If the payload 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.RequestStats; + + /** + * Verifies a RequestStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestStats + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RequestStats; + + /** + * Creates a plain object from a RequestStats message. Also converts values to other types if specified. + * @param message RequestStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RequestStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SessionType enum. */ + enum SessionType { + SESSION_TYPE_UNSET = 0, + SESSION_TYPE_TABLE = 1, + SESSION_TYPE_AUTHORIZED_VIEW = 2, + SESSION_TYPE_MATERIALIZED_VIEW = 3, + SESSION_TYPE_TEST = 9999 + } + + /** Properties of a GetClientConfigurationRequest. */ + interface IGetClientConfigurationRequest { + + /** GetClientConfigurationRequest instanceName */ + instanceName?: (string|null); + + /** GetClientConfigurationRequest appProfileId */ + appProfileId?: (string|null); + } + + /** Represents a GetClientConfigurationRequest. */ + class GetClientConfigurationRequest implements IGetClientConfigurationRequest { + + /** + * Constructs a new GetClientConfigurationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IGetClientConfigurationRequest); + + /** GetClientConfigurationRequest instanceName. */ + public instanceName: string; + + /** GetClientConfigurationRequest appProfileId. */ + public appProfileId: string; + + /** + * Creates a new GetClientConfigurationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetClientConfigurationRequest instance + */ + public static create(properties?: google.bigtable.v2.IGetClientConfigurationRequest): google.bigtable.v2.GetClientConfigurationRequest; + + /** + * Encodes the specified GetClientConfigurationRequest message. Does not implicitly {@link google.bigtable.v2.GetClientConfigurationRequest.verify|verify} messages. + * @param message GetClientConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IGetClientConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetClientConfigurationRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.GetClientConfigurationRequest.verify|verify} messages. + * @param message GetClientConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IGetClientConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetClientConfigurationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetClientConfigurationRequest + * @throws {Error} If the payload is not 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.GetClientConfigurationRequest; + + /** + * Decodes a GetClientConfigurationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetClientConfigurationRequest + * @throws {Error} If the payload 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.GetClientConfigurationRequest; + + /** + * Verifies a GetClientConfigurationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetClientConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetClientConfigurationRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.GetClientConfigurationRequest; + + /** + * Creates a plain object from a GetClientConfigurationRequest message. Also converts values to other types if specified. + * @param message GetClientConfigurationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.GetClientConfigurationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetClientConfigurationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetClientConfigurationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancingOptions. */ + interface ILoadBalancingOptions { + + /** LoadBalancingOptions leastInFlight */ + leastInFlight?: (google.bigtable.v2.LoadBalancingOptions.ILeastInFlight|null); + + /** LoadBalancingOptions peakEwma */ + peakEwma?: (google.bigtable.v2.LoadBalancingOptions.IPeakEwma|null); + + /** LoadBalancingOptions random */ + random?: (google.bigtable.v2.LoadBalancingOptions.IRandom|null); + } + + /** Represents a LoadBalancingOptions. */ + class LoadBalancingOptions implements ILoadBalancingOptions { + + /** + * Constructs a new LoadBalancingOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ILoadBalancingOptions); + + /** LoadBalancingOptions leastInFlight. */ + public leastInFlight?: (google.bigtable.v2.LoadBalancingOptions.ILeastInFlight|null); + + /** LoadBalancingOptions peakEwma. */ + public peakEwma?: (google.bigtable.v2.LoadBalancingOptions.IPeakEwma|null); + + /** LoadBalancingOptions random. */ + public random?: (google.bigtable.v2.LoadBalancingOptions.IRandom|null); + + /** LoadBalancingOptions loadBalancingStrategy. */ + public loadBalancingStrategy?: ("leastInFlight"|"peakEwma"|"random"); + + /** + * Creates a new LoadBalancingOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancingOptions instance + */ + public static create(properties?: google.bigtable.v2.ILoadBalancingOptions): google.bigtable.v2.LoadBalancingOptions; + + /** + * Encodes the specified LoadBalancingOptions message. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.verify|verify} messages. + * @param message LoadBalancingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ILoadBalancingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancingOptions message, length delimited. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.verify|verify} messages. + * @param message LoadBalancingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ILoadBalancingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancingOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancingOptions + * @throws {Error} If the payload is not 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.LoadBalancingOptions; + + /** + * Decodes a LoadBalancingOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancingOptions + * @throws {Error} If the payload 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.LoadBalancingOptions; + + /** + * Verifies a LoadBalancingOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancingOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancingOptions + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.LoadBalancingOptions; + + /** + * Creates a plain object from a LoadBalancingOptions message. Also converts values to other types if specified. + * @param message LoadBalancingOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.LoadBalancingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancingOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancingOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancingOptions { + + /** Properties of a LeastInFlight. */ + interface ILeastInFlight { + + /** LeastInFlight randomSubsetSize */ + randomSubsetSize?: (number|Long|string|null); + } + + /** Represents a LeastInFlight. */ + class LeastInFlight implements ILeastInFlight { + + /** + * Constructs a new LeastInFlight. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.LoadBalancingOptions.ILeastInFlight); + + /** LeastInFlight randomSubsetSize. */ + public randomSubsetSize: (number|Long|string); + + /** + * Creates a new LeastInFlight instance using the specified properties. + * @param [properties] Properties to set + * @returns LeastInFlight instance + */ + public static create(properties?: google.bigtable.v2.LoadBalancingOptions.ILeastInFlight): google.bigtable.v2.LoadBalancingOptions.LeastInFlight; + + /** + * Encodes the specified LeastInFlight message. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.LeastInFlight.verify|verify} messages. + * @param message LeastInFlight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.LoadBalancingOptions.ILeastInFlight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LeastInFlight message, length delimited. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.LeastInFlight.verify|verify} messages. + * @param message LeastInFlight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.LoadBalancingOptions.ILeastInFlight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LeastInFlight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LeastInFlight + * @throws {Error} If the payload is not 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.LoadBalancingOptions.LeastInFlight; + + /** + * Decodes a LeastInFlight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LeastInFlight + * @throws {Error} If the payload 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.LoadBalancingOptions.LeastInFlight; + + /** + * Verifies a LeastInFlight message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LeastInFlight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LeastInFlight + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.LoadBalancingOptions.LeastInFlight; + + /** + * Creates a plain object from a LeastInFlight message. Also converts values to other types if specified. + * @param message LeastInFlight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.LoadBalancingOptions.LeastInFlight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LeastInFlight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LeastInFlight + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PeakEwma. */ + interface IPeakEwma { + + /** PeakEwma randomSubsetSize */ + randomSubsetSize?: (number|Long|string|null); + } + + /** Represents a PeakEwma. */ + class PeakEwma implements IPeakEwma { + + /** + * Constructs a new PeakEwma. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.LoadBalancingOptions.IPeakEwma); + + /** PeakEwma randomSubsetSize. */ + public randomSubsetSize: (number|Long|string); + + /** + * Creates a new PeakEwma instance using the specified properties. + * @param [properties] Properties to set + * @returns PeakEwma instance + */ + public static create(properties?: google.bigtable.v2.LoadBalancingOptions.IPeakEwma): google.bigtable.v2.LoadBalancingOptions.PeakEwma; + + /** + * Encodes the specified PeakEwma message. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.PeakEwma.verify|verify} messages. + * @param message PeakEwma message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.LoadBalancingOptions.IPeakEwma, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PeakEwma message, length delimited. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.PeakEwma.verify|verify} messages. + * @param message PeakEwma message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.LoadBalancingOptions.IPeakEwma, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PeakEwma message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PeakEwma + * @throws {Error} If the payload is not 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.LoadBalancingOptions.PeakEwma; + + /** + * Decodes a PeakEwma message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PeakEwma + * @throws {Error} If the payload 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.LoadBalancingOptions.PeakEwma; + + /** + * Verifies a PeakEwma message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PeakEwma message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PeakEwma + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.LoadBalancingOptions.PeakEwma; + + /** + * Creates a plain object from a PeakEwma message. Also converts values to other types if specified. + * @param message PeakEwma + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.LoadBalancingOptions.PeakEwma, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PeakEwma to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PeakEwma + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Random. */ + interface IRandom { + } + + /** Represents a Random. */ + class Random implements IRandom { + + /** + * Constructs a new Random. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.LoadBalancingOptions.IRandom); + + /** + * Creates a new Random instance using the specified properties. + * @param [properties] Properties to set + * @returns Random instance + */ + public static create(properties?: google.bigtable.v2.LoadBalancingOptions.IRandom): google.bigtable.v2.LoadBalancingOptions.Random; + + /** + * Encodes the specified Random message. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.Random.verify|verify} messages. + * @param message Random message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.LoadBalancingOptions.IRandom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Random message, length delimited. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.Random.verify|verify} messages. + * @param message Random message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.LoadBalancingOptions.IRandom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Random message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Random + * @throws {Error} If the payload is not 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.LoadBalancingOptions.Random; + + /** + * Decodes a Random message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Random + * @throws {Error} If the payload 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.LoadBalancingOptions.Random; + + /** + * Verifies a Random message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Random message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Random + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.LoadBalancingOptions.Random; + + /** + * Creates a plain object from a Random message. Also converts values to other types if specified. + * @param message Random + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.LoadBalancingOptions.Random, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Random to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Random + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SessionClientConfiguration. */ + interface ISessionClientConfiguration { + + /** SessionClientConfiguration sessionLoad */ + sessionLoad?: (number|null); + + /** SessionClientConfiguration loadBalancingOptions */ + loadBalancingOptions?: (google.bigtable.v2.ILoadBalancingOptions|null); + + /** SessionClientConfiguration channelConfiguration */ + channelConfiguration?: (google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration|null); + + /** SessionClientConfiguration sessionPoolConfiguration */ + sessionPoolConfiguration?: (google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration|null); + } + + /** Represents a SessionClientConfiguration. */ + class SessionClientConfiguration implements ISessionClientConfiguration { + + /** + * Constructs a new SessionClientConfiguration. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionClientConfiguration); + + /** SessionClientConfiguration sessionLoad. */ + public sessionLoad: number; + + /** SessionClientConfiguration loadBalancingOptions. */ + public loadBalancingOptions?: (google.bigtable.v2.ILoadBalancingOptions|null); + + /** SessionClientConfiguration channelConfiguration. */ + public channelConfiguration?: (google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration|null); + + /** SessionClientConfiguration sessionPoolConfiguration. */ + public sessionPoolConfiguration?: (google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration|null); + + /** + * Creates a new SessionClientConfiguration instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionClientConfiguration instance + */ + public static create(properties?: google.bigtable.v2.ISessionClientConfiguration): google.bigtable.v2.SessionClientConfiguration; + + /** + * Encodes the specified SessionClientConfiguration message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.verify|verify} messages. + * @param message SessionClientConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionClientConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionClientConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.verify|verify} messages. + * @param message SessionClientConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionClientConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionClientConfiguration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionClientConfiguration + * @throws {Error} If the payload is not 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.SessionClientConfiguration; + + /** + * Decodes a SessionClientConfiguration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionClientConfiguration + * @throws {Error} If the payload 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.SessionClientConfiguration; + + /** + * Verifies a SessionClientConfiguration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionClientConfiguration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionClientConfiguration + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionClientConfiguration; + + /** + * Creates a plain object from a SessionClientConfiguration message. Also converts values to other types if specified. + * @param message SessionClientConfiguration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionClientConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionClientConfiguration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionClientConfiguration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SessionClientConfiguration { + + /** Properties of a ChannelPoolConfiguration. */ + interface IChannelPoolConfiguration { + + /** ChannelPoolConfiguration minServerCount */ + minServerCount?: (number|null); + + /** ChannelPoolConfiguration maxServerCount */ + maxServerCount?: (number|null); + + /** ChannelPoolConfiguration perServerSessionCount */ + perServerSessionCount?: (number|null); + + /** ChannelPoolConfiguration directAccessWithFallback */ + directAccessWithFallback?: (google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback|null); + + /** ChannelPoolConfiguration directAccessOnly */ + directAccessOnly?: (google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly|null); + + /** ChannelPoolConfiguration cloudPathOnly */ + cloudPathOnly?: (google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly|null); + } + + /** Represents a ChannelPoolConfiguration. */ + class ChannelPoolConfiguration implements IChannelPoolConfiguration { + + /** + * Constructs a new ChannelPoolConfiguration. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration); + + /** ChannelPoolConfiguration minServerCount. */ + public minServerCount: number; + + /** ChannelPoolConfiguration maxServerCount. */ + public maxServerCount: number; + + /** ChannelPoolConfiguration perServerSessionCount. */ + public perServerSessionCount: number; + + /** ChannelPoolConfiguration directAccessWithFallback. */ + public directAccessWithFallback?: (google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback|null); + + /** ChannelPoolConfiguration directAccessOnly. */ + public directAccessOnly?: (google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly|null); + + /** ChannelPoolConfiguration cloudPathOnly. */ + public cloudPathOnly?: (google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly|null); + + /** ChannelPoolConfiguration mode. */ + public mode?: ("directAccessWithFallback"|"directAccessOnly"|"cloudPathOnly"); + + /** + * Creates a new ChannelPoolConfiguration instance using the specified properties. + * @param [properties] Properties to set + * @returns ChannelPoolConfiguration instance + */ + public static create(properties?: google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration): google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration; + + /** + * Encodes the specified ChannelPoolConfiguration message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.verify|verify} messages. + * @param message ChannelPoolConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChannelPoolConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.verify|verify} messages. + * @param message ChannelPoolConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChannelPoolConfiguration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChannelPoolConfiguration + * @throws {Error} If the payload is not 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.SessionClientConfiguration.ChannelPoolConfiguration; + + /** + * Decodes a ChannelPoolConfiguration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChannelPoolConfiguration + * @throws {Error} If the payload 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.SessionClientConfiguration.ChannelPoolConfiguration; + + /** + * Verifies a ChannelPoolConfiguration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChannelPoolConfiguration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChannelPoolConfiguration + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration; + + /** + * Creates a plain object from a ChannelPoolConfiguration message. Also converts values to other types if specified. + * @param message ChannelPoolConfiguration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChannelPoolConfiguration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChannelPoolConfiguration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ChannelPoolConfiguration { + + /** Properties of a DirectAccessWithFallback. */ + interface IDirectAccessWithFallback { + + /** DirectAccessWithFallback errorRateThreshold */ + errorRateThreshold?: (number|null); + + /** DirectAccessWithFallback checkInterval */ + checkInterval?: (google.protobuf.IDuration|null); + } + + /** Represents a DirectAccessWithFallback. */ + class DirectAccessWithFallback implements IDirectAccessWithFallback { + + /** + * Constructs a new DirectAccessWithFallback. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback); + + /** DirectAccessWithFallback errorRateThreshold. */ + public errorRateThreshold: number; + + /** DirectAccessWithFallback checkInterval. */ + public checkInterval?: (google.protobuf.IDuration|null); + + /** + * Creates a new DirectAccessWithFallback instance using the specified properties. + * @param [properties] Properties to set + * @returns DirectAccessWithFallback instance + */ + public static create(properties?: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback): google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback; + + /** + * Encodes the specified DirectAccessWithFallback message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.verify|verify} messages. + * @param message DirectAccessWithFallback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DirectAccessWithFallback message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.verify|verify} messages. + * @param message DirectAccessWithFallback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DirectAccessWithFallback message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DirectAccessWithFallback + * @throws {Error} If the payload is not 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.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback; + + /** + * Decodes a DirectAccessWithFallback message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DirectAccessWithFallback + * @throws {Error} If the payload 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.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback; + + /** + * Verifies a DirectAccessWithFallback message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DirectAccessWithFallback message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DirectAccessWithFallback + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback; + + /** + * Creates a plain object from a DirectAccessWithFallback message. Also converts values to other types if specified. + * @param message DirectAccessWithFallback + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DirectAccessWithFallback to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DirectAccessWithFallback + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DirectAccessOnly. */ + interface IDirectAccessOnly { + } + + /** Represents a DirectAccessOnly. */ + class DirectAccessOnly implements IDirectAccessOnly { + + /** + * Constructs a new DirectAccessOnly. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly); + + /** + * Creates a new DirectAccessOnly instance using the specified properties. + * @param [properties] Properties to set + * @returns DirectAccessOnly instance + */ + public static create(properties?: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly): google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly; + + /** + * Encodes the specified DirectAccessOnly message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.verify|verify} messages. + * @param message DirectAccessOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DirectAccessOnly message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.verify|verify} messages. + * @param message DirectAccessOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DirectAccessOnly message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DirectAccessOnly + * @throws {Error} If the payload is not 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.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly; + + /** + * Decodes a DirectAccessOnly message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DirectAccessOnly + * @throws {Error} If the payload 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.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly; + + /** + * Verifies a DirectAccessOnly message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DirectAccessOnly message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DirectAccessOnly + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly; + + /** + * Creates a plain object from a DirectAccessOnly message. Also converts values to other types if specified. + * @param message DirectAccessOnly + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DirectAccessOnly to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DirectAccessOnly + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudPathOnly. */ + interface ICloudPathOnly { + } + + /** Represents a CloudPathOnly. */ + class CloudPathOnly implements ICloudPathOnly { + + /** + * Constructs a new CloudPathOnly. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly); + + /** + * Creates a new CloudPathOnly instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudPathOnly instance + */ + public static create(properties?: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly): google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly; + + /** + * Encodes the specified CloudPathOnly message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.verify|verify} messages. + * @param message CloudPathOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudPathOnly message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.verify|verify} messages. + * @param message CloudPathOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudPathOnly message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudPathOnly + * @throws {Error} If the payload is not 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.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly; + + /** + * Decodes a CloudPathOnly message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudPathOnly + * @throws {Error} If the payload 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.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly; + + /** + * Verifies a CloudPathOnly message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudPathOnly message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudPathOnly + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly; + + /** + * Creates a plain object from a CloudPathOnly message. Also converts values to other types if specified. + * @param message CloudPathOnly + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudPathOnly to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudPathOnly + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SessionPoolConfiguration. */ + interface ISessionPoolConfiguration { + + /** SessionPoolConfiguration headroom */ + headroom?: (number|null); + + /** SessionPoolConfiguration minSessionCount */ + minSessionCount?: (number|null); + + /** SessionPoolConfiguration maxSessionCount */ + maxSessionCount?: (number|null); + + /** SessionPoolConfiguration newSessionQueueLength */ + newSessionQueueLength?: (number|null); + + /** SessionPoolConfiguration newSessionCreationBudget */ + newSessionCreationBudget?: (number|null); + + /** SessionPoolConfiguration newSessionCreationPenalty */ + newSessionCreationPenalty?: (google.protobuf.IDuration|null); + + /** SessionPoolConfiguration consecutiveSessionFailureThreshold */ + consecutiveSessionFailureThreshold?: (number|null); + + /** SessionPoolConfiguration loadBalancingOptions */ + loadBalancingOptions?: (google.bigtable.v2.ILoadBalancingOptions|null); + } + + /** Represents a SessionPoolConfiguration. */ + class SessionPoolConfiguration implements ISessionPoolConfiguration { + + /** + * Constructs a new SessionPoolConfiguration. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration); + + /** SessionPoolConfiguration headroom. */ + public headroom: number; + + /** SessionPoolConfiguration minSessionCount. */ + public minSessionCount: number; + + /** SessionPoolConfiguration maxSessionCount. */ + public maxSessionCount: number; + + /** SessionPoolConfiguration newSessionQueueLength. */ + public newSessionQueueLength: number; + + /** SessionPoolConfiguration newSessionCreationBudget. */ + public newSessionCreationBudget: number; + + /** SessionPoolConfiguration newSessionCreationPenalty. */ + public newSessionCreationPenalty?: (google.protobuf.IDuration|null); + + /** SessionPoolConfiguration consecutiveSessionFailureThreshold. */ + public consecutiveSessionFailureThreshold: number; + + /** SessionPoolConfiguration loadBalancingOptions. */ + public loadBalancingOptions?: (google.bigtable.v2.ILoadBalancingOptions|null); + + /** + * Creates a new SessionPoolConfiguration instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionPoolConfiguration instance + */ + public static create(properties?: google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration): google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration; + + /** + * Encodes the specified SessionPoolConfiguration message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.verify|verify} messages. + * @param message SessionPoolConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionPoolConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.verify|verify} messages. + * @param message SessionPoolConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionPoolConfiguration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionPoolConfiguration + * @throws {Error} If the payload is not 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.SessionClientConfiguration.SessionPoolConfiguration; + + /** + * Decodes a SessionPoolConfiguration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionPoolConfiguration + * @throws {Error} If the payload 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.SessionClientConfiguration.SessionPoolConfiguration; + + /** + * Verifies a SessionPoolConfiguration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionPoolConfiguration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionPoolConfiguration + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration; + + /** + * Creates a plain object from a SessionPoolConfiguration message. Also converts values to other types if specified. + * @param message SessionPoolConfiguration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionPoolConfiguration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionPoolConfiguration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a TelemetryConfiguration. */ + interface ITelemetryConfiguration { + + /** TelemetryConfiguration debugTagLevel */ + debugTagLevel?: (google.bigtable.v2.TelemetryConfiguration.Level|keyof typeof google.bigtable.v2.TelemetryConfiguration.Level|null); + } + + /** Represents a TelemetryConfiguration. */ + class TelemetryConfiguration implements ITelemetryConfiguration { + + /** + * Constructs a new TelemetryConfiguration. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ITelemetryConfiguration); + + /** TelemetryConfiguration debugTagLevel. */ + public debugTagLevel: (google.bigtable.v2.TelemetryConfiguration.Level|keyof typeof google.bigtable.v2.TelemetryConfiguration.Level); + + /** + * Creates a new TelemetryConfiguration instance using the specified properties. + * @param [properties] Properties to set + * @returns TelemetryConfiguration instance + */ + public static create(properties?: google.bigtable.v2.ITelemetryConfiguration): google.bigtable.v2.TelemetryConfiguration; + + /** + * Encodes the specified TelemetryConfiguration message. Does not implicitly {@link google.bigtable.v2.TelemetryConfiguration.verify|verify} messages. + * @param message TelemetryConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ITelemetryConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TelemetryConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.TelemetryConfiguration.verify|verify} messages. + * @param message TelemetryConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ITelemetryConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TelemetryConfiguration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TelemetryConfiguration + * @throws {Error} If the payload is not 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.TelemetryConfiguration; + + /** + * Decodes a TelemetryConfiguration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TelemetryConfiguration + * @throws {Error} If the payload 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.TelemetryConfiguration; + + /** + * Verifies a TelemetryConfiguration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TelemetryConfiguration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TelemetryConfiguration + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.TelemetryConfiguration; + + /** + * Creates a plain object from a TelemetryConfiguration message. Also converts values to other types if specified. + * @param message TelemetryConfiguration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.TelemetryConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TelemetryConfiguration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TelemetryConfiguration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TelemetryConfiguration { + + /** Level enum. */ + enum Level { + LEVEL_UNSPECIFIED = 0, + DEBUG = 1, + INFO = 2, + WARN = 3, + ERROR = 4 + } + } + + /** Properties of a ClientConfiguration. */ + interface IClientConfiguration { + + /** ClientConfiguration sessionConfiguration */ + sessionConfiguration?: (google.bigtable.v2.ISessionClientConfiguration|null); + + /** ClientConfiguration stopPolling */ + stopPolling?: (boolean|null); + + /** ClientConfiguration pollingInterval */ + pollingInterval?: (google.protobuf.IDuration|null); + + /** ClientConfiguration pollingConfiguration */ + pollingConfiguration?: (google.bigtable.v2.ClientConfiguration.IPollingConfiguration|null); + + /** ClientConfiguration telemetryConfiguration */ + telemetryConfiguration?: (google.bigtable.v2.ITelemetryConfiguration|null); + } + + /** Represents a ClientConfiguration. */ + class ClientConfiguration implements IClientConfiguration { + + /** + * Constructs a new ClientConfiguration. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IClientConfiguration); + + /** ClientConfiguration sessionConfiguration. */ + public sessionConfiguration?: (google.bigtable.v2.ISessionClientConfiguration|null); + + /** ClientConfiguration stopPolling. */ + public stopPolling?: (boolean|null); + + /** ClientConfiguration pollingInterval. */ + public pollingInterval?: (google.protobuf.IDuration|null); + + /** ClientConfiguration pollingConfiguration. */ + public pollingConfiguration?: (google.bigtable.v2.ClientConfiguration.IPollingConfiguration|null); + + /** ClientConfiguration telemetryConfiguration. */ + public telemetryConfiguration?: (google.bigtable.v2.ITelemetryConfiguration|null); + + /** ClientConfiguration polling. */ + public polling?: ("stopPolling"|"pollingInterval"|"pollingConfiguration"); + + /** + * Creates a new ClientConfiguration instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientConfiguration instance + */ + public static create(properties?: google.bigtable.v2.IClientConfiguration): google.bigtable.v2.ClientConfiguration; + + /** + * Encodes the specified ClientConfiguration message. Does not implicitly {@link google.bigtable.v2.ClientConfiguration.verify|verify} messages. + * @param message ClientConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IClientConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.ClientConfiguration.verify|verify} messages. + * @param message ClientConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IClientConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientConfiguration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientConfiguration + * @throws {Error} If the payload is not 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.ClientConfiguration; + + /** + * Decodes a ClientConfiguration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientConfiguration + * @throws {Error} If the payload 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.ClientConfiguration; + + /** + * Verifies a ClientConfiguration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientConfiguration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientConfiguration + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ClientConfiguration; + + /** + * Creates a plain object from a ClientConfiguration message. Also converts values to other types if specified. + * @param message ClientConfiguration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ClientConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientConfiguration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientConfiguration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClientConfiguration { + + /** Properties of a PollingConfiguration. */ + interface IPollingConfiguration { + + /** PollingConfiguration pollingInterval */ + pollingInterval?: (google.protobuf.IDuration|null); + + /** PollingConfiguration validityDuration */ + validityDuration?: (google.protobuf.IDuration|null); + + /** PollingConfiguration maxRpcRetryCount */ + maxRpcRetryCount?: (number|null); + } + + /** Represents a PollingConfiguration. */ + class PollingConfiguration implements IPollingConfiguration { + + /** + * Constructs a new PollingConfiguration. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ClientConfiguration.IPollingConfiguration); + + /** PollingConfiguration pollingInterval. */ + public pollingInterval?: (google.protobuf.IDuration|null); + + /** PollingConfiguration validityDuration. */ + public validityDuration?: (google.protobuf.IDuration|null); + + /** PollingConfiguration maxRpcRetryCount. */ + public maxRpcRetryCount: number; + + /** + * Creates a new PollingConfiguration instance using the specified properties. + * @param [properties] Properties to set + * @returns PollingConfiguration instance + */ + public static create(properties?: google.bigtable.v2.ClientConfiguration.IPollingConfiguration): google.bigtable.v2.ClientConfiguration.PollingConfiguration; + + /** + * Encodes the specified PollingConfiguration message. Does not implicitly {@link google.bigtable.v2.ClientConfiguration.PollingConfiguration.verify|verify} messages. + * @param message PollingConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ClientConfiguration.IPollingConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollingConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.ClientConfiguration.PollingConfiguration.verify|verify} messages. + * @param message PollingConfiguration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ClientConfiguration.IPollingConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollingConfiguration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollingConfiguration + * @throws {Error} If the payload is not 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.ClientConfiguration.PollingConfiguration; + + /** + * Decodes a PollingConfiguration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollingConfiguration + * @throws {Error} If the payload 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.ClientConfiguration.PollingConfiguration; + + /** + * Verifies a PollingConfiguration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollingConfiguration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollingConfiguration + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ClientConfiguration.PollingConfiguration; + + /** + * Creates a plain object from a PollingConfiguration message. Also converts values to other types if specified. + * @param message PollingConfiguration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ClientConfiguration.PollingConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollingConfiguration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollingConfiguration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SessionRequest. */ + interface ISessionRequest { + + /** SessionRequest openSession */ + openSession?: (google.bigtable.v2.IOpenSessionRequest|null); + + /** SessionRequest closeSession */ + closeSession?: (google.bigtable.v2.ICloseSessionRequest|null); + + /** SessionRequest virtualRpc */ + virtualRpc?: (google.bigtable.v2.IVirtualRpcRequest|null); + } + + /** Represents a SessionRequest. */ + class SessionRequest implements ISessionRequest { + + /** + * Constructs a new SessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionRequest); + + /** SessionRequest openSession. */ + public openSession?: (google.bigtable.v2.IOpenSessionRequest|null); + + /** SessionRequest closeSession. */ + public closeSession?: (google.bigtable.v2.ICloseSessionRequest|null); + + /** SessionRequest virtualRpc. */ + public virtualRpc?: (google.bigtable.v2.IVirtualRpcRequest|null); + + /** SessionRequest payload. */ + public payload?: ("openSession"|"closeSession"|"virtualRpc"); + + /** + * Creates a new SessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionRequest instance + */ + public static create(properties?: google.bigtable.v2.ISessionRequest): google.bigtable.v2.SessionRequest; + + /** + * Encodes the specified SessionRequest message. Does not implicitly {@link google.bigtable.v2.SessionRequest.verify|verify} messages. + * @param message SessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionRequest.verify|verify} messages. + * @param message SessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionRequest + * @throws {Error} If the payload is not 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.SessionRequest; + + /** + * Decodes a SessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionRequest + * @throws {Error} If the payload 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.SessionRequest; + + /** + * Verifies a SessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionRequest; + + /** + * Creates a plain object from a SessionRequest message. Also converts values to other types if specified. + * @param message SessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionResponse. */ + interface ISessionResponse { + + /** SessionResponse openSession */ + openSession?: (google.bigtable.v2.IOpenSessionResponse|null); + + /** SessionResponse virtualRpc */ + virtualRpc?: (google.bigtable.v2.IVirtualRpcResponse|null); + + /** SessionResponse error */ + error?: (google.bigtable.v2.IErrorResponse|null); + + /** SessionResponse sessionParameters */ + sessionParameters?: (google.bigtable.v2.ISessionParametersResponse|null); + + /** SessionResponse heartbeat */ + heartbeat?: (google.bigtable.v2.IHeartbeatResponse|null); + + /** SessionResponse goAway */ + goAway?: (google.bigtable.v2.IGoAwayResponse|null); + + /** SessionResponse sessionRefreshConfig */ + sessionRefreshConfig?: (google.bigtable.v2.ISessionRefreshConfig|null); + } + + /** Represents a SessionResponse. */ + class SessionResponse implements ISessionResponse { + + /** + * Constructs a new SessionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionResponse); + + /** SessionResponse openSession. */ + public openSession?: (google.bigtable.v2.IOpenSessionResponse|null); + + /** SessionResponse virtualRpc. */ + public virtualRpc?: (google.bigtable.v2.IVirtualRpcResponse|null); + + /** SessionResponse error. */ + public error?: (google.bigtable.v2.IErrorResponse|null); + + /** SessionResponse sessionParameters. */ + public sessionParameters?: (google.bigtable.v2.ISessionParametersResponse|null); + + /** SessionResponse heartbeat. */ + public heartbeat?: (google.bigtable.v2.IHeartbeatResponse|null); + + /** SessionResponse goAway. */ + public goAway?: (google.bigtable.v2.IGoAwayResponse|null); + + /** SessionResponse sessionRefreshConfig. */ + public sessionRefreshConfig?: (google.bigtable.v2.ISessionRefreshConfig|null); + + /** SessionResponse payload. */ + public payload?: ("openSession"|"virtualRpc"|"error"|"sessionParameters"|"heartbeat"|"goAway"|"sessionRefreshConfig"); + + /** + * Creates a new SessionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionResponse instance + */ + public static create(properties?: google.bigtable.v2.ISessionResponse): google.bigtable.v2.SessionResponse; + + /** + * Encodes the specified SessionResponse message. Does not implicitly {@link google.bigtable.v2.SessionResponse.verify|verify} messages. + * @param message SessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionResponse.verify|verify} messages. + * @param message SessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionResponse + * @throws {Error} If the payload is not 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.SessionResponse; + + /** + * Decodes a SessionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionResponse + * @throws {Error} If the payload 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.SessionResponse; + + /** + * Verifies a SessionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionResponse; + + /** + * Creates a plain object from a SessionResponse message. Also converts values to other types if specified. + * @param message SessionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpenSessionRequest. */ + interface IOpenSessionRequest { + + /** OpenSessionRequest protocolVersion */ + protocolVersion?: (number|Long|string|null); + + /** OpenSessionRequest flags */ + flags?: (google.bigtable.v2.IFeatureFlags|null); + + /** OpenSessionRequest consecutiveFailedConnectionAttempts */ + consecutiveFailedConnectionAttempts?: (number|Long|string|null); + + /** OpenSessionRequest routingCookie */ + routingCookie?: (Uint8Array|Buffer|string|null); + + /** OpenSessionRequest payload */ + payload?: (Uint8Array|Buffer|string|null); + } + + /** Represents an OpenSessionRequest. */ + class OpenSessionRequest implements IOpenSessionRequest { + + /** + * Constructs a new OpenSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IOpenSessionRequest); + + /** OpenSessionRequest protocolVersion. */ + public protocolVersion: (number|Long|string); + + /** OpenSessionRequest flags. */ + public flags?: (google.bigtable.v2.IFeatureFlags|null); + + /** OpenSessionRequest consecutiveFailedConnectionAttempts. */ + public consecutiveFailedConnectionAttempts: (number|Long|string); + + /** OpenSessionRequest routingCookie. */ + public routingCookie: (Uint8Array|Buffer|string); + + /** OpenSessionRequest payload. */ + public payload: (Uint8Array|Buffer|string); + + /** + * Creates a new OpenSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenSessionRequest instance + */ + public static create(properties?: google.bigtable.v2.IOpenSessionRequest): google.bigtable.v2.OpenSessionRequest; + + /** + * Encodes the specified OpenSessionRequest message. Does not implicitly {@link google.bigtable.v2.OpenSessionRequest.verify|verify} messages. + * @param message OpenSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IOpenSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenSessionRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenSessionRequest.verify|verify} messages. + * @param message OpenSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IOpenSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenSessionRequest + * @throws {Error} If the payload is not 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.OpenSessionRequest; + + /** + * Decodes an OpenSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenSessionRequest + * @throws {Error} If the payload 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.OpenSessionRequest; + + /** + * Verifies an OpenSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpenSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenSessionRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.OpenSessionRequest; + + /** + * Creates a plain object from an OpenSessionRequest message. Also converts values to other types if specified. + * @param message OpenSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.OpenSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackendIdentifier. */ + interface IBackendIdentifier { + + /** BackendIdentifier googleFrontendId */ + googleFrontendId?: (number|Long|string|null); + + /** BackendIdentifier applicationFrontendId */ + applicationFrontendId?: (number|Long|string|null); + + /** BackendIdentifier applicationFrontendZone */ + applicationFrontendZone?: (string|null); + } + + /** Represents a BackendIdentifier. */ + class BackendIdentifier implements IBackendIdentifier { + + /** + * Constructs a new BackendIdentifier. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IBackendIdentifier); + + /** BackendIdentifier googleFrontendId. */ + public googleFrontendId: (number|Long|string); + + /** BackendIdentifier applicationFrontendId. */ + public applicationFrontendId: (number|Long|string); + + /** BackendIdentifier applicationFrontendZone. */ + public applicationFrontendZone: string; + + /** + * Creates a new BackendIdentifier instance using the specified properties. + * @param [properties] Properties to set + * @returns BackendIdentifier instance + */ + public static create(properties?: google.bigtable.v2.IBackendIdentifier): google.bigtable.v2.BackendIdentifier; + + /** + * Encodes the specified BackendIdentifier message. Does not implicitly {@link google.bigtable.v2.BackendIdentifier.verify|verify} messages. + * @param message BackendIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IBackendIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackendIdentifier message, length delimited. Does not implicitly {@link google.bigtable.v2.BackendIdentifier.verify|verify} messages. + * @param message BackendIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IBackendIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackendIdentifier message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackendIdentifier + * @throws {Error} If the payload is not 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.BackendIdentifier; + + /** + * Decodes a BackendIdentifier message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackendIdentifier + * @throws {Error} If the payload 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.BackendIdentifier; + + /** + * Verifies a BackendIdentifier message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackendIdentifier message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackendIdentifier + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.BackendIdentifier; + + /** + * Creates a plain object from a BackendIdentifier message. Also converts values to other types if specified. + * @param message BackendIdentifier + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.BackendIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackendIdentifier to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackendIdentifier + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpenSessionResponse. */ + interface IOpenSessionResponse { + + /** OpenSessionResponse backend */ + backend?: (google.bigtable.v2.IBackendIdentifier|null); + + /** OpenSessionResponse payload */ + payload?: (Uint8Array|Buffer|string|null); + } + + /** Represents an OpenSessionResponse. */ + class OpenSessionResponse implements IOpenSessionResponse { + + /** + * Constructs a new OpenSessionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IOpenSessionResponse); + + /** OpenSessionResponse backend. */ + public backend?: (google.bigtable.v2.IBackendIdentifier|null); + + /** OpenSessionResponse payload. */ + public payload: (Uint8Array|Buffer|string); + + /** + * Creates a new OpenSessionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenSessionResponse instance + */ + public static create(properties?: google.bigtable.v2.IOpenSessionResponse): google.bigtable.v2.OpenSessionResponse; + + /** + * Encodes the specified OpenSessionResponse message. Does not implicitly {@link google.bigtable.v2.OpenSessionResponse.verify|verify} messages. + * @param message OpenSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IOpenSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenSessionResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenSessionResponse.verify|verify} messages. + * @param message OpenSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IOpenSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenSessionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenSessionResponse + * @throws {Error} If the payload is not 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.OpenSessionResponse; + + /** + * Decodes an OpenSessionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenSessionResponse + * @throws {Error} If the payload 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.OpenSessionResponse; + + /** + * Verifies an OpenSessionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpenSessionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenSessionResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.OpenSessionResponse; + + /** + * Creates a plain object from an OpenSessionResponse message. Also converts values to other types if specified. + * @param message OpenSessionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.OpenSessionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenSessionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenSessionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloseSessionRequest. */ + interface ICloseSessionRequest { + + /** CloseSessionRequest reason */ + reason?: (google.bigtable.v2.CloseSessionRequest.CloseSessionReason|keyof typeof google.bigtable.v2.CloseSessionRequest.CloseSessionReason|null); + + /** CloseSessionRequest description */ + description?: (string|null); + } + + /** Represents a CloseSessionRequest. */ + class CloseSessionRequest implements ICloseSessionRequest { + + /** + * Constructs a new CloseSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ICloseSessionRequest); + + /** CloseSessionRequest reason. */ + public reason: (google.bigtable.v2.CloseSessionRequest.CloseSessionReason|keyof typeof google.bigtable.v2.CloseSessionRequest.CloseSessionReason); + + /** CloseSessionRequest description. */ + public description: string; + + /** + * Creates a new CloseSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CloseSessionRequest instance + */ + public static create(properties?: google.bigtable.v2.ICloseSessionRequest): google.bigtable.v2.CloseSessionRequest; + + /** + * Encodes the specified CloseSessionRequest message. Does not implicitly {@link google.bigtable.v2.CloseSessionRequest.verify|verify} messages. + * @param message CloseSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ICloseSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloseSessionRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.CloseSessionRequest.verify|verify} messages. + * @param message CloseSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ICloseSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloseSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloseSessionRequest + * @throws {Error} If the payload is not 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.CloseSessionRequest; + + /** + * Decodes a CloseSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloseSessionRequest + * @throws {Error} If the payload 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.CloseSessionRequest; + + /** + * Verifies a CloseSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloseSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloseSessionRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.CloseSessionRequest; + + /** + * Creates a plain object from a CloseSessionRequest message. Also converts values to other types if specified. + * @param message CloseSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.CloseSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloseSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloseSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloseSessionRequest { + + /** CloseSessionReason enum. */ + enum CloseSessionReason { + CLOSE_SESSION_REASON_UNSET = 0, + CLOSE_SESSION_REASON_GOAWAY = 1, + CLOSE_SESSION_REASON_ERROR = 2, + CLOSE_SESSION_REASON_USER = 3, + CLOSE_SESSION_REASON_DOWNSIZE = 4, + CLOSE_SESSION_REASON_MISSED_HEARTBEAT = 5 + } + } + + /** Properties of an OpenTableRequest. */ + interface IOpenTableRequest { + + /** OpenTableRequest tableName */ + tableName?: (string|null); + + /** OpenTableRequest appProfileId */ + appProfileId?: (string|null); + + /** OpenTableRequest permission */ + permission?: (google.bigtable.v2.OpenTableRequest.Permission|keyof typeof google.bigtable.v2.OpenTableRequest.Permission|null); + } + + /** Represents an OpenTableRequest. */ + class OpenTableRequest implements IOpenTableRequest { + + /** + * Constructs a new OpenTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IOpenTableRequest); + + /** OpenTableRequest tableName. */ + public tableName: string; + + /** OpenTableRequest appProfileId. */ + public appProfileId: string; + + /** OpenTableRequest permission. */ + public permission: (google.bigtable.v2.OpenTableRequest.Permission|keyof typeof google.bigtable.v2.OpenTableRequest.Permission); + + /** + * Creates a new OpenTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenTableRequest instance + */ + public static create(properties?: google.bigtable.v2.IOpenTableRequest): google.bigtable.v2.OpenTableRequest; + + /** + * Encodes the specified OpenTableRequest message. Does not implicitly {@link google.bigtable.v2.OpenTableRequest.verify|verify} messages. + * @param message OpenTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IOpenTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenTableRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenTableRequest.verify|verify} messages. + * @param message OpenTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IOpenTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenTableRequest + * @throws {Error} If the payload is not 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.OpenTableRequest; + + /** + * Decodes an OpenTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenTableRequest + * @throws {Error} If the payload 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.OpenTableRequest; + + /** + * Verifies an OpenTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpenTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.OpenTableRequest; + + /** + * Creates a plain object from an OpenTableRequest message. Also converts values to other types if specified. + * @param message OpenTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.OpenTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OpenTableRequest { + + /** Permission enum. */ + enum Permission { + PERMISSION_UNSET = 0, + PERMISSION_READ = 1, + PERMISSION_WRITE = 2, + PERMISSION_READ_WRITE = 3 + } + } + + /** Properties of an OpenTableResponse. */ + interface IOpenTableResponse { + } + + /** Represents an OpenTableResponse. */ + class OpenTableResponse implements IOpenTableResponse { + + /** + * Constructs a new OpenTableResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IOpenTableResponse); + + /** + * Creates a new OpenTableResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenTableResponse instance + */ + public static create(properties?: google.bigtable.v2.IOpenTableResponse): google.bigtable.v2.OpenTableResponse; + + /** + * Encodes the specified OpenTableResponse message. Does not implicitly {@link google.bigtable.v2.OpenTableResponse.verify|verify} messages. + * @param message OpenTableResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IOpenTableResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenTableResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenTableResponse.verify|verify} messages. + * @param message OpenTableResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IOpenTableResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenTableResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenTableResponse + * @throws {Error} If the payload is not 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.OpenTableResponse; + + /** + * Decodes an OpenTableResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenTableResponse + * @throws {Error} If the payload 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.OpenTableResponse; + + /** + * Verifies an OpenTableResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpenTableResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenTableResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.OpenTableResponse; + + /** + * Creates a plain object from an OpenTableResponse message. Also converts values to other types if specified. + * @param message OpenTableResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.OpenTableResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenTableResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenTableResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpenAuthorizedViewRequest. */ + interface IOpenAuthorizedViewRequest { + + /** OpenAuthorizedViewRequest authorizedViewName */ + authorizedViewName?: (string|null); + + /** OpenAuthorizedViewRequest appProfileId */ + appProfileId?: (string|null); + + /** OpenAuthorizedViewRequest permission */ + permission?: (google.bigtable.v2.OpenAuthorizedViewRequest.Permission|keyof typeof google.bigtable.v2.OpenAuthorizedViewRequest.Permission|null); + } + + /** Represents an OpenAuthorizedViewRequest. */ + class OpenAuthorizedViewRequest implements IOpenAuthorizedViewRequest { + + /** + * Constructs a new OpenAuthorizedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IOpenAuthorizedViewRequest); + + /** OpenAuthorizedViewRequest authorizedViewName. */ + public authorizedViewName: string; + + /** OpenAuthorizedViewRequest appProfileId. */ + public appProfileId: string; + + /** OpenAuthorizedViewRequest permission. */ + public permission: (google.bigtable.v2.OpenAuthorizedViewRequest.Permission|keyof typeof google.bigtable.v2.OpenAuthorizedViewRequest.Permission); + + /** + * Creates a new OpenAuthorizedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenAuthorizedViewRequest instance + */ + public static create(properties?: google.bigtable.v2.IOpenAuthorizedViewRequest): google.bigtable.v2.OpenAuthorizedViewRequest; + + /** + * Encodes the specified OpenAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.v2.OpenAuthorizedViewRequest.verify|verify} messages. + * @param message OpenAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IOpenAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenAuthorizedViewRequest.verify|verify} messages. + * @param message OpenAuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IOpenAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenAuthorizedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenAuthorizedViewRequest + * @throws {Error} If the payload is not 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.OpenAuthorizedViewRequest; + + /** + * Decodes an OpenAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenAuthorizedViewRequest + * @throws {Error} If the payload 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.OpenAuthorizedViewRequest; + + /** + * Verifies an OpenAuthorizedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpenAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenAuthorizedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.OpenAuthorizedViewRequest; + + /** + * Creates a plain object from an OpenAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message OpenAuthorizedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.OpenAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenAuthorizedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenAuthorizedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OpenAuthorizedViewRequest { + + /** Permission enum. */ + enum Permission { + PERMISSION_UNSET = 0, + PERMISSION_READ = 1, + PERMISSION_WRITE = 2, + PERMISSION_READ_WRITE = 3 + } + } + + /** Properties of an OpenAuthorizedViewResponse. */ + interface IOpenAuthorizedViewResponse { + } + + /** Represents an OpenAuthorizedViewResponse. */ + class OpenAuthorizedViewResponse implements IOpenAuthorizedViewResponse { + + /** + * Constructs a new OpenAuthorizedViewResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IOpenAuthorizedViewResponse); + + /** + * Creates a new OpenAuthorizedViewResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenAuthorizedViewResponse instance + */ + public static create(properties?: google.bigtable.v2.IOpenAuthorizedViewResponse): google.bigtable.v2.OpenAuthorizedViewResponse; + + /** + * Encodes the specified OpenAuthorizedViewResponse message. Does not implicitly {@link google.bigtable.v2.OpenAuthorizedViewResponse.verify|verify} messages. + * @param message OpenAuthorizedViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IOpenAuthorizedViewResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenAuthorizedViewResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenAuthorizedViewResponse.verify|verify} messages. + * @param message OpenAuthorizedViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IOpenAuthorizedViewResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenAuthorizedViewResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenAuthorizedViewResponse + * @throws {Error} If the payload is not 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.OpenAuthorizedViewResponse; + + /** + * Decodes an OpenAuthorizedViewResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenAuthorizedViewResponse + * @throws {Error} If the payload 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.OpenAuthorizedViewResponse; + + /** + * Verifies an OpenAuthorizedViewResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpenAuthorizedViewResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenAuthorizedViewResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.OpenAuthorizedViewResponse; + + /** + * Creates a plain object from an OpenAuthorizedViewResponse message. Also converts values to other types if specified. + * @param message OpenAuthorizedViewResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.OpenAuthorizedViewResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenAuthorizedViewResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenAuthorizedViewResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpenMaterializedViewRequest. */ + interface IOpenMaterializedViewRequest { + + /** OpenMaterializedViewRequest materializedViewName */ + materializedViewName?: (string|null); + + /** OpenMaterializedViewRequest appProfileId */ + appProfileId?: (string|null); + + /** OpenMaterializedViewRequest permission */ + permission?: (google.bigtable.v2.OpenMaterializedViewRequest.Permission|keyof typeof google.bigtable.v2.OpenMaterializedViewRequest.Permission|null); + } + + /** Represents an OpenMaterializedViewRequest. */ + class OpenMaterializedViewRequest implements IOpenMaterializedViewRequest { + + /** + * Constructs a new OpenMaterializedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IOpenMaterializedViewRequest); + + /** OpenMaterializedViewRequest materializedViewName. */ + public materializedViewName: string; + + /** OpenMaterializedViewRequest appProfileId. */ + public appProfileId: string; + + /** OpenMaterializedViewRequest permission. */ + public permission: (google.bigtable.v2.OpenMaterializedViewRequest.Permission|keyof typeof google.bigtable.v2.OpenMaterializedViewRequest.Permission); + + /** + * Creates a new OpenMaterializedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenMaterializedViewRequest instance + */ + public static create(properties?: google.bigtable.v2.IOpenMaterializedViewRequest): google.bigtable.v2.OpenMaterializedViewRequest; + + /** + * Encodes the specified OpenMaterializedViewRequest message. Does not implicitly {@link google.bigtable.v2.OpenMaterializedViewRequest.verify|verify} messages. + * @param message OpenMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IOpenMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenMaterializedViewRequest.verify|verify} messages. + * @param message OpenMaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IOpenMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenMaterializedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenMaterializedViewRequest + * @throws {Error} If the payload is not 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.OpenMaterializedViewRequest; + + /** + * Decodes an OpenMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenMaterializedViewRequest + * @throws {Error} If the payload 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.OpenMaterializedViewRequest; + + /** + * Verifies an OpenMaterializedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpenMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenMaterializedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.OpenMaterializedViewRequest; + + /** + * Creates a plain object from an OpenMaterializedViewRequest message. Also converts values to other types if specified. + * @param message OpenMaterializedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.OpenMaterializedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenMaterializedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenMaterializedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OpenMaterializedViewRequest { + + /** Permission enum. */ + enum Permission { + PERMISSION_UNSET = 0, + PERMISSION_READ = 1 + } + } + + /** Properties of an OpenMaterializedViewResponse. */ + interface IOpenMaterializedViewResponse { + } + + /** Represents an OpenMaterializedViewResponse. */ + class OpenMaterializedViewResponse implements IOpenMaterializedViewResponse { + + /** + * Constructs a new OpenMaterializedViewResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IOpenMaterializedViewResponse); + + /** + * Creates a new OpenMaterializedViewResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenMaterializedViewResponse instance + */ + public static create(properties?: google.bigtable.v2.IOpenMaterializedViewResponse): google.bigtable.v2.OpenMaterializedViewResponse; + + /** + * Encodes the specified OpenMaterializedViewResponse message. Does not implicitly {@link google.bigtable.v2.OpenMaterializedViewResponse.verify|verify} messages. + * @param message OpenMaterializedViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IOpenMaterializedViewResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenMaterializedViewResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenMaterializedViewResponse.verify|verify} messages. + * @param message OpenMaterializedViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IOpenMaterializedViewResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenMaterializedViewResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenMaterializedViewResponse + * @throws {Error} If the payload is not 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.OpenMaterializedViewResponse; + + /** + * Decodes an OpenMaterializedViewResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenMaterializedViewResponse + * @throws {Error} If the payload 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.OpenMaterializedViewResponse; + + /** + * Verifies an OpenMaterializedViewResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpenMaterializedViewResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenMaterializedViewResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.OpenMaterializedViewResponse; + + /** + * Creates a plain object from an OpenMaterializedViewResponse message. Also converts values to other types if specified. + * @param message OpenMaterializedViewResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.OpenMaterializedViewResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenMaterializedViewResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenMaterializedViewResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VirtualRpcRequest. */ + interface IVirtualRpcRequest { + + /** VirtualRpcRequest rpcId */ + rpcId?: (number|Long|string|null); + + /** VirtualRpcRequest deadline */ + deadline?: (google.protobuf.IDuration|null); + + /** VirtualRpcRequest metadata */ + metadata?: (google.bigtable.v2.VirtualRpcRequest.IMetadata|null); + + /** VirtualRpcRequest payload */ + payload?: (Uint8Array|Buffer|string|null); + } + + /** Represents a VirtualRpcRequest. */ + class VirtualRpcRequest implements IVirtualRpcRequest { + + /** + * Constructs a new VirtualRpcRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IVirtualRpcRequest); + + /** VirtualRpcRequest rpcId. */ + public rpcId: (number|Long|string); + + /** VirtualRpcRequest deadline. */ + public deadline?: (google.protobuf.IDuration|null); + + /** VirtualRpcRequest metadata. */ + public metadata?: (google.bigtable.v2.VirtualRpcRequest.IMetadata|null); + + /** VirtualRpcRequest payload. */ + public payload: (Uint8Array|Buffer|string); + + /** + * Creates a new VirtualRpcRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VirtualRpcRequest instance + */ + public static create(properties?: google.bigtable.v2.IVirtualRpcRequest): google.bigtable.v2.VirtualRpcRequest; + + /** + * Encodes the specified VirtualRpcRequest message. Does not implicitly {@link google.bigtable.v2.VirtualRpcRequest.verify|verify} messages. + * @param message VirtualRpcRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IVirtualRpcRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VirtualRpcRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.VirtualRpcRequest.verify|verify} messages. + * @param message VirtualRpcRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IVirtualRpcRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VirtualRpcRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VirtualRpcRequest + * @throws {Error} If the payload is not 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.VirtualRpcRequest; + + /** + * Decodes a VirtualRpcRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VirtualRpcRequest + * @throws {Error} If the payload 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.VirtualRpcRequest; + + /** + * Verifies a VirtualRpcRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VirtualRpcRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VirtualRpcRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.VirtualRpcRequest; + + /** + * Creates a plain object from a VirtualRpcRequest message. Also converts values to other types if specified. + * @param message VirtualRpcRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.VirtualRpcRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VirtualRpcRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VirtualRpcRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VirtualRpcRequest { + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata attemptNumber */ + attemptNumber?: (number|Long|string|null); + + /** Metadata attemptStart */ + attemptStart?: (google.protobuf.ITimestamp|null); + + /** Metadata traceparent */ + traceparent?: (string|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.VirtualRpcRequest.IMetadata); + + /** Metadata attemptNumber. */ + public attemptNumber: (number|Long|string); + + /** Metadata attemptStart. */ + public attemptStart?: (google.protobuf.ITimestamp|null); + + /** Metadata traceparent. */ + public traceparent: string; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.bigtable.v2.VirtualRpcRequest.IMetadata): google.bigtable.v2.VirtualRpcRequest.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.bigtable.v2.VirtualRpcRequest.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.VirtualRpcRequest.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.bigtable.v2.VirtualRpcRequest.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.VirtualRpcRequest.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not 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.VirtualRpcRequest.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload 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.VirtualRpcRequest.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.VirtualRpcRequest.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.VirtualRpcRequest.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ClusterInformation. */ + interface IClusterInformation { + + /** ClusterInformation clusterId */ + clusterId?: (string|null); + + /** ClusterInformation zoneId */ + zoneId?: (string|null); + } + + /** Represents a ClusterInformation. */ + class ClusterInformation implements IClusterInformation { + + /** + * Constructs a new ClusterInformation. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IClusterInformation); + + /** ClusterInformation clusterId. */ + public clusterId: string; + + /** ClusterInformation zoneId. */ + public zoneId: string; + + /** + * Creates a new ClusterInformation instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterInformation instance + */ + public static create(properties?: google.bigtable.v2.IClusterInformation): google.bigtable.v2.ClusterInformation; + + /** + * Encodes the specified ClusterInformation message. Does not implicitly {@link google.bigtable.v2.ClusterInformation.verify|verify} messages. + * @param message ClusterInformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IClusterInformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterInformation message, length delimited. Does not implicitly {@link google.bigtable.v2.ClusterInformation.verify|verify} messages. + * @param message ClusterInformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IClusterInformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterInformation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterInformation + * @throws {Error} If the payload is not 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.ClusterInformation; + + /** + * Decodes a ClusterInformation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterInformation + * @throws {Error} If the payload 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.ClusterInformation; + + /** + * Verifies a ClusterInformation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterInformation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterInformation + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ClusterInformation; + + /** + * Creates a plain object from a ClusterInformation message. Also converts values to other types if specified. + * @param message ClusterInformation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ClusterInformation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterInformation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterInformation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionRequestStats. */ + interface ISessionRequestStats { + + /** SessionRequestStats backendLatency */ + backendLatency?: (google.protobuf.IDuration|null); + } + + /** Represents a SessionRequestStats. */ + class SessionRequestStats implements ISessionRequestStats { + + /** + * Constructs a new SessionRequestStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionRequestStats); + + /** SessionRequestStats backendLatency. */ + public backendLatency?: (google.protobuf.IDuration|null); + + /** + * Creates a new SessionRequestStats instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionRequestStats instance + */ + public static create(properties?: google.bigtable.v2.ISessionRequestStats): google.bigtable.v2.SessionRequestStats; + + /** + * Encodes the specified SessionRequestStats message. Does not implicitly {@link google.bigtable.v2.SessionRequestStats.verify|verify} messages. + * @param message SessionRequestStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionRequestStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionRequestStats message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionRequestStats.verify|verify} messages. + * @param message SessionRequestStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionRequestStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionRequestStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionRequestStats + * @throws {Error} If the payload is not 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.SessionRequestStats; + + /** + * Decodes a SessionRequestStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionRequestStats + * @throws {Error} If the payload 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.SessionRequestStats; + + /** + * Verifies a SessionRequestStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionRequestStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionRequestStats + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionRequestStats; + + /** + * Creates a plain object from a SessionRequestStats message. Also converts values to other types if specified. + * @param message SessionRequestStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionRequestStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionRequestStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionRequestStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VirtualRpcResponse. */ + interface IVirtualRpcResponse { + + /** VirtualRpcResponse rpcId */ + rpcId?: (number|Long|string|null); + + /** VirtualRpcResponse clusterInfo */ + clusterInfo?: (google.bigtable.v2.IClusterInformation|null); + + /** VirtualRpcResponse stats */ + stats?: (google.bigtable.v2.ISessionRequestStats|null); + + /** VirtualRpcResponse payload */ + payload?: (Uint8Array|Buffer|string|null); + } + + /** Represents a VirtualRpcResponse. */ + class VirtualRpcResponse implements IVirtualRpcResponse { + + /** + * Constructs a new VirtualRpcResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IVirtualRpcResponse); + + /** VirtualRpcResponse rpcId. */ + public rpcId: (number|Long|string); + + /** VirtualRpcResponse clusterInfo. */ + public clusterInfo?: (google.bigtable.v2.IClusterInformation|null); + + /** VirtualRpcResponse stats. */ + public stats?: (google.bigtable.v2.ISessionRequestStats|null); + + /** VirtualRpcResponse payload. */ + public payload: (Uint8Array|Buffer|string); + + /** + * Creates a new VirtualRpcResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns VirtualRpcResponse instance + */ + public static create(properties?: google.bigtable.v2.IVirtualRpcResponse): google.bigtable.v2.VirtualRpcResponse; + + /** + * Encodes the specified VirtualRpcResponse message. Does not implicitly {@link google.bigtable.v2.VirtualRpcResponse.verify|verify} messages. + * @param message VirtualRpcResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IVirtualRpcResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VirtualRpcResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.VirtualRpcResponse.verify|verify} messages. + * @param message VirtualRpcResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IVirtualRpcResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VirtualRpcResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VirtualRpcResponse + * @throws {Error} If the payload is not 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.VirtualRpcResponse; + + /** + * Decodes a VirtualRpcResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VirtualRpcResponse + * @throws {Error} If the payload 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.VirtualRpcResponse; + + /** + * Verifies a VirtualRpcResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VirtualRpcResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VirtualRpcResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.VirtualRpcResponse; + + /** + * Creates a plain object from a VirtualRpcResponse message. Also converts values to other types if specified. + * @param message VirtualRpcResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.VirtualRpcResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VirtualRpcResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VirtualRpcResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorResponse. */ + interface IErrorResponse { + + /** ErrorResponse rpcId */ + rpcId?: (number|Long|string|null); + + /** ErrorResponse clusterInfo */ + clusterInfo?: (google.bigtable.v2.IClusterInformation|null); + + /** ErrorResponse status */ + status?: (google.rpc.IStatus|null); + + /** ErrorResponse retryInfo */ + retryInfo?: (google.rpc.IRetryInfo|null); + } + + /** Represents an ErrorResponse. */ + class ErrorResponse implements IErrorResponse { + + /** + * Constructs a new ErrorResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IErrorResponse); + + /** ErrorResponse rpcId. */ + public rpcId: (number|Long|string); + + /** ErrorResponse clusterInfo. */ + public clusterInfo?: (google.bigtable.v2.IClusterInformation|null); + + /** ErrorResponse status. */ + public status?: (google.rpc.IStatus|null); + + /** ErrorResponse retryInfo. */ + public retryInfo?: (google.rpc.IRetryInfo|null); + + /** + * Creates a new ErrorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorResponse instance + */ + public static create(properties?: google.bigtable.v2.IErrorResponse): google.bigtable.v2.ErrorResponse; + + /** + * Encodes the specified ErrorResponse message. Does not implicitly {@link google.bigtable.v2.ErrorResponse.verify|verify} messages. + * @param message ErrorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IErrorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ErrorResponse.verify|verify} messages. + * @param message ErrorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IErrorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorResponse + * @throws {Error} If the payload is not 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.ErrorResponse; + + /** + * Decodes an ErrorResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorResponse + * @throws {Error} If the payload 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.ErrorResponse; + + /** + * Verifies an ErrorResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ErrorResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ErrorResponse; + + /** + * Creates a plain object from an ErrorResponse message. Also converts values to other types if specified. + * @param message ErrorResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ErrorResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableRequest. */ + interface ITableRequest { + + /** TableRequest readRow */ + readRow?: (google.bigtable.v2.ISessionReadRowRequest|null); + + /** TableRequest mutateRow */ + mutateRow?: (google.bigtable.v2.ISessionMutateRowRequest|null); + } + + /** Represents a TableRequest. */ + class TableRequest implements ITableRequest { + + /** + * Constructs a new TableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ITableRequest); + + /** TableRequest readRow. */ + public readRow?: (google.bigtable.v2.ISessionReadRowRequest|null); + + /** TableRequest mutateRow. */ + public mutateRow?: (google.bigtable.v2.ISessionMutateRowRequest|null); + + /** TableRequest payload. */ + public payload?: ("readRow"|"mutateRow"); + + /** + * Creates a new TableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TableRequest instance + */ + public static create(properties?: google.bigtable.v2.ITableRequest): google.bigtable.v2.TableRequest; + + /** + * Encodes the specified TableRequest message. Does not implicitly {@link google.bigtable.v2.TableRequest.verify|verify} messages. + * @param message TableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ITableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.TableRequest.verify|verify} messages. + * @param message TableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ITableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableRequest + * @throws {Error} If the payload is not 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.TableRequest; + + /** + * Decodes a TableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableRequest + * @throws {Error} If the payload 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.TableRequest; + + /** + * Verifies a TableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.TableRequest; + + /** + * Creates a plain object from a TableRequest message. Also converts values to other types if specified. + * @param message TableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.TableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableResponse. */ + interface ITableResponse { + + /** TableResponse readRow */ + readRow?: (google.bigtable.v2.ISessionReadRowResponse|null); + + /** TableResponse mutateRow */ + mutateRow?: (google.bigtable.v2.ISessionMutateRowResponse|null); + } + + /** Represents a TableResponse. */ + class TableResponse implements ITableResponse { + + /** + * Constructs a new TableResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ITableResponse); + + /** TableResponse readRow. */ + public readRow?: (google.bigtable.v2.ISessionReadRowResponse|null); + + /** TableResponse mutateRow. */ + public mutateRow?: (google.bigtable.v2.ISessionMutateRowResponse|null); + + /** TableResponse payload. */ + public payload?: ("readRow"|"mutateRow"); + + /** + * Creates a new TableResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TableResponse instance + */ + public static create(properties?: google.bigtable.v2.ITableResponse): google.bigtable.v2.TableResponse; + + /** + * Encodes the specified TableResponse message. Does not implicitly {@link google.bigtable.v2.TableResponse.verify|verify} messages. + * @param message TableResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ITableResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.TableResponse.verify|verify} messages. + * @param message TableResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ITableResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableResponse + * @throws {Error} If the payload is not 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.TableResponse; + + /** + * Decodes a TableResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableResponse + * @throws {Error} If the payload 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.TableResponse; + + /** + * Verifies a TableResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.TableResponse; + + /** + * Creates a plain object from a TableResponse message. Also converts values to other types if specified. + * @param message TableResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.TableResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuthorizedViewRequest. */ + interface IAuthorizedViewRequest { + + /** AuthorizedViewRequest readRow */ + readRow?: (google.bigtable.v2.ISessionReadRowRequest|null); + + /** AuthorizedViewRequest mutateRow */ + mutateRow?: (google.bigtable.v2.ISessionMutateRowRequest|null); + } + + /** Represents an AuthorizedViewRequest. */ + class AuthorizedViewRequest implements IAuthorizedViewRequest { + + /** + * Constructs a new AuthorizedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IAuthorizedViewRequest); + + /** AuthorizedViewRequest readRow. */ + public readRow?: (google.bigtable.v2.ISessionReadRowRequest|null); + + /** AuthorizedViewRequest mutateRow. */ + public mutateRow?: (google.bigtable.v2.ISessionMutateRowRequest|null); + + /** AuthorizedViewRequest payload. */ + public payload?: ("readRow"|"mutateRow"); + + /** + * Creates a new AuthorizedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorizedViewRequest instance + */ + public static create(properties?: google.bigtable.v2.IAuthorizedViewRequest): google.bigtable.v2.AuthorizedViewRequest; + + /** + * Encodes the specified AuthorizedViewRequest message. Does not implicitly {@link google.bigtable.v2.AuthorizedViewRequest.verify|verify} messages. + * @param message AuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.AuthorizedViewRequest.verify|verify} messages. + * @param message AuthorizedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthorizedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorizedViewRequest + * @throws {Error} If the payload is not 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.AuthorizedViewRequest; + + /** + * Decodes an AuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorizedViewRequest + * @throws {Error} If the payload 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.AuthorizedViewRequest; + + /** + * Verifies an AuthorizedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorizedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.AuthorizedViewRequest; + + /** + * Creates a plain object from an AuthorizedViewRequest message. Also converts values to other types if specified. + * @param message AuthorizedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.AuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthorizedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthorizedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuthorizedViewResponse. */ + interface IAuthorizedViewResponse { + + /** AuthorizedViewResponse readRow */ + readRow?: (google.bigtable.v2.ISessionReadRowResponse|null); + + /** AuthorizedViewResponse mutateRow */ + mutateRow?: (google.bigtable.v2.ISessionMutateRowResponse|null); + } + + /** Represents an AuthorizedViewResponse. */ + class AuthorizedViewResponse implements IAuthorizedViewResponse { + + /** + * Constructs a new AuthorizedViewResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IAuthorizedViewResponse); + + /** AuthorizedViewResponse readRow. */ + public readRow?: (google.bigtable.v2.ISessionReadRowResponse|null); + + /** AuthorizedViewResponse mutateRow. */ + public mutateRow?: (google.bigtable.v2.ISessionMutateRowResponse|null); + + /** AuthorizedViewResponse payload. */ + public payload?: ("readRow"|"mutateRow"); + + /** + * Creates a new AuthorizedViewResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorizedViewResponse instance + */ + public static create(properties?: google.bigtable.v2.IAuthorizedViewResponse): google.bigtable.v2.AuthorizedViewResponse; + + /** + * Encodes the specified AuthorizedViewResponse message. Does not implicitly {@link google.bigtable.v2.AuthorizedViewResponse.verify|verify} messages. + * @param message AuthorizedViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IAuthorizedViewResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthorizedViewResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.AuthorizedViewResponse.verify|verify} messages. + * @param message AuthorizedViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IAuthorizedViewResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthorizedViewResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorizedViewResponse + * @throws {Error} If the payload is not 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.AuthorizedViewResponse; + + /** + * Decodes an AuthorizedViewResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorizedViewResponse + * @throws {Error} If the payload 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.AuthorizedViewResponse; + + /** + * Verifies an AuthorizedViewResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuthorizedViewResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorizedViewResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.AuthorizedViewResponse; + + /** + * Creates a plain object from an AuthorizedViewResponse message. Also converts values to other types if specified. + * @param message AuthorizedViewResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.AuthorizedViewResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthorizedViewResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthorizedViewResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaterializedViewRequest. */ + interface IMaterializedViewRequest { + + /** MaterializedViewRequest readRow */ + readRow?: (google.bigtable.v2.ISessionReadRowRequest|null); + } + + /** Represents a MaterializedViewRequest. */ + class MaterializedViewRequest implements IMaterializedViewRequest { + + /** + * Constructs a new MaterializedViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IMaterializedViewRequest); + + /** MaterializedViewRequest readRow. */ + public readRow?: (google.bigtable.v2.ISessionReadRowRequest|null); + + /** MaterializedViewRequest payload. */ + public payload?: "readRow"; + + /** + * Creates a new MaterializedViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MaterializedViewRequest instance + */ + public static create(properties?: google.bigtable.v2.IMaterializedViewRequest): google.bigtable.v2.MaterializedViewRequest; + + /** + * Encodes the specified MaterializedViewRequest message. Does not implicitly {@link google.bigtable.v2.MaterializedViewRequest.verify|verify} messages. + * @param message MaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MaterializedViewRequest.verify|verify} messages. + * @param message MaterializedViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IMaterializedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaterializedViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaterializedViewRequest + * @throws {Error} If the payload is not 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.MaterializedViewRequest; + + /** + * Decodes a MaterializedViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaterializedViewRequest + * @throws {Error} If the payload 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.MaterializedViewRequest; + + /** + * Verifies a MaterializedViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaterializedViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MaterializedViewRequest; + + /** + * Creates a plain object from a MaterializedViewRequest message. Also converts values to other types if specified. + * @param message MaterializedViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.MaterializedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaterializedViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaterializedViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaterializedViewResponse. */ + interface IMaterializedViewResponse { + + /** MaterializedViewResponse readRow */ + readRow?: (google.bigtable.v2.ISessionReadRowResponse|null); + } + + /** Represents a MaterializedViewResponse. */ + class MaterializedViewResponse implements IMaterializedViewResponse { + + /** + * Constructs a new MaterializedViewResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IMaterializedViewResponse); + + /** MaterializedViewResponse readRow. */ + public readRow?: (google.bigtable.v2.ISessionReadRowResponse|null); + + /** MaterializedViewResponse payload. */ + public payload?: "readRow"; + + /** + * Creates a new MaterializedViewResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MaterializedViewResponse instance + */ + public static create(properties?: google.bigtable.v2.IMaterializedViewResponse): google.bigtable.v2.MaterializedViewResponse; + + /** + * Encodes the specified MaterializedViewResponse message. Does not implicitly {@link google.bigtable.v2.MaterializedViewResponse.verify|verify} messages. + * @param message MaterializedViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IMaterializedViewResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaterializedViewResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MaterializedViewResponse.verify|verify} messages. + * @param message MaterializedViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IMaterializedViewResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaterializedViewResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaterializedViewResponse + * @throws {Error} If the payload is not 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.MaterializedViewResponse; + + /** + * Decodes a MaterializedViewResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaterializedViewResponse + * @throws {Error} If the payload 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.MaterializedViewResponse; + + /** + * Verifies a MaterializedViewResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaterializedViewResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaterializedViewResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.MaterializedViewResponse; + + /** + * Creates a plain object from a MaterializedViewResponse message. Also converts values to other types if specified. + * @param message MaterializedViewResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.MaterializedViewResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaterializedViewResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaterializedViewResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionReadRowRequest. */ + interface ISessionReadRowRequest { + + /** SessionReadRowRequest key */ + key?: (Uint8Array|Buffer|string|null); + + /** SessionReadRowRequest filter */ + filter?: (google.bigtable.v2.IRowFilter|null); + } + + /** Represents a SessionReadRowRequest. */ + class SessionReadRowRequest implements ISessionReadRowRequest { + + /** + * Constructs a new SessionReadRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionReadRowRequest); + + /** SessionReadRowRequest key. */ + public key: (Uint8Array|Buffer|string); + + /** SessionReadRowRequest filter. */ + public filter?: (google.bigtable.v2.IRowFilter|null); + + /** + * Creates a new SessionReadRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionReadRowRequest instance + */ + public static create(properties?: google.bigtable.v2.ISessionReadRowRequest): google.bigtable.v2.SessionReadRowRequest; + + /** + * Encodes the specified SessionReadRowRequest message. Does not implicitly {@link google.bigtable.v2.SessionReadRowRequest.verify|verify} messages. + * @param message SessionReadRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionReadRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionReadRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionReadRowRequest.verify|verify} messages. + * @param message SessionReadRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionReadRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionReadRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionReadRowRequest + * @throws {Error} If the payload is not 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.SessionReadRowRequest; + + /** + * Decodes a SessionReadRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionReadRowRequest + * @throws {Error} If the payload 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.SessionReadRowRequest; + + /** + * Verifies a SessionReadRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionReadRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionReadRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionReadRowRequest; + + /** + * Creates a plain object from a SessionReadRowRequest message. Also converts values to other types if specified. + * @param message SessionReadRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionReadRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionReadRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionReadRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionReadRowResponse. */ + interface ISessionReadRowResponse { + + /** SessionReadRowResponse row */ + row?: (google.bigtable.v2.IRow|null); + + /** SessionReadRowResponse stats */ + stats?: (google.bigtable.v2.IRequestStats|null); + } + + /** Represents a SessionReadRowResponse. */ + class SessionReadRowResponse implements ISessionReadRowResponse { + + /** + * Constructs a new SessionReadRowResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionReadRowResponse); + + /** SessionReadRowResponse row. */ + public row?: (google.bigtable.v2.IRow|null); + + /** SessionReadRowResponse stats. */ + public stats?: (google.bigtable.v2.IRequestStats|null); + + /** + * Creates a new SessionReadRowResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionReadRowResponse instance + */ + public static create(properties?: google.bigtable.v2.ISessionReadRowResponse): google.bigtable.v2.SessionReadRowResponse; + + /** + * Encodes the specified SessionReadRowResponse message. Does not implicitly {@link google.bigtable.v2.SessionReadRowResponse.verify|verify} messages. + * @param message SessionReadRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionReadRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionReadRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionReadRowResponse.verify|verify} messages. + * @param message SessionReadRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionReadRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionReadRowResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionReadRowResponse + * @throws {Error} If the payload is not 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.SessionReadRowResponse; + + /** + * Decodes a SessionReadRowResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionReadRowResponse + * @throws {Error} If the payload 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.SessionReadRowResponse; + + /** + * Verifies a SessionReadRowResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionReadRowResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionReadRowResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionReadRowResponse; + + /** + * Creates a plain object from a SessionReadRowResponse message. Also converts values to other types if specified. + * @param message SessionReadRowResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionReadRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionReadRowResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionReadRowResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionMutateRowRequest. */ + interface ISessionMutateRowRequest { + + /** SessionMutateRowRequest key */ + key?: (Uint8Array|Buffer|string|null); + + /** SessionMutateRowRequest mutations */ + mutations?: (google.bigtable.v2.IMutation[]|null); + } + + /** Represents a SessionMutateRowRequest. */ + class SessionMutateRowRequest implements ISessionMutateRowRequest { + + /** + * Constructs a new SessionMutateRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionMutateRowRequest); + + /** SessionMutateRowRequest key. */ + public key: (Uint8Array|Buffer|string); + + /** SessionMutateRowRequest mutations. */ + public mutations: google.bigtable.v2.IMutation[]; + + /** + * Creates a new SessionMutateRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionMutateRowRequest instance + */ + public static create(properties?: google.bigtable.v2.ISessionMutateRowRequest): google.bigtable.v2.SessionMutateRowRequest; + + /** + * Encodes the specified SessionMutateRowRequest message. Does not implicitly {@link google.bigtable.v2.SessionMutateRowRequest.verify|verify} messages. + * @param message SessionMutateRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionMutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionMutateRowRequest.verify|verify} messages. + * @param message SessionMutateRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionMutateRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionMutateRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionMutateRowRequest + * @throws {Error} If the payload is not 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.SessionMutateRowRequest; + + /** + * Decodes a SessionMutateRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionMutateRowRequest + * @throws {Error} If the payload 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.SessionMutateRowRequest; + + /** + * Verifies a SessionMutateRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionMutateRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionMutateRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionMutateRowRequest; + + /** + * Creates a plain object from a SessionMutateRowRequest message. Also converts values to other types if specified. + * @param message SessionMutateRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionMutateRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionMutateRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionMutateRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionMutateRowResponse. */ + interface ISessionMutateRowResponse { + } + + /** Represents a SessionMutateRowResponse. */ + class SessionMutateRowResponse implements ISessionMutateRowResponse { + + /** + * Constructs a new SessionMutateRowResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionMutateRowResponse); + + /** + * Creates a new SessionMutateRowResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionMutateRowResponse instance + */ + public static create(properties?: google.bigtable.v2.ISessionMutateRowResponse): google.bigtable.v2.SessionMutateRowResponse; + + /** + * Encodes the specified SessionMutateRowResponse message. Does not implicitly {@link google.bigtable.v2.SessionMutateRowResponse.verify|verify} messages. + * @param message SessionMutateRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionMutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionMutateRowResponse.verify|verify} messages. + * @param message SessionMutateRowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionMutateRowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionMutateRowResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionMutateRowResponse + * @throws {Error} If the payload is not 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.SessionMutateRowResponse; + + /** + * Decodes a SessionMutateRowResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionMutateRowResponse + * @throws {Error} If the payload 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.SessionMutateRowResponse; + + /** + * Verifies a SessionMutateRowResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionMutateRowResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionMutateRowResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionMutateRowResponse; + + /** + * Creates a plain object from a SessionMutateRowResponse message. Also converts values to other types if specified. + * @param message SessionMutateRowResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionMutateRowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionMutateRowResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionMutateRowResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionParametersResponse. */ + interface ISessionParametersResponse { + + /** SessionParametersResponse keepAlive */ + keepAlive?: (google.protobuf.IDuration|null); + } + + /** Represents a SessionParametersResponse. */ + class SessionParametersResponse implements ISessionParametersResponse { + + /** + * Constructs a new SessionParametersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionParametersResponse); + + /** SessionParametersResponse keepAlive. */ + public keepAlive?: (google.protobuf.IDuration|null); + + /** + * Creates a new SessionParametersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionParametersResponse instance + */ + public static create(properties?: google.bigtable.v2.ISessionParametersResponse): google.bigtable.v2.SessionParametersResponse; + + /** + * Encodes the specified SessionParametersResponse message. Does not implicitly {@link google.bigtable.v2.SessionParametersResponse.verify|verify} messages. + * @param message SessionParametersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionParametersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionParametersResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionParametersResponse.verify|verify} messages. + * @param message SessionParametersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionParametersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionParametersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionParametersResponse + * @throws {Error} If the payload is not 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.SessionParametersResponse; + + /** + * Decodes a SessionParametersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionParametersResponse + * @throws {Error} If the payload 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.SessionParametersResponse; + + /** + * Verifies a SessionParametersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionParametersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionParametersResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionParametersResponse; + + /** + * Creates a plain object from a SessionParametersResponse message. Also converts values to other types if specified. + * @param message SessionParametersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionParametersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionParametersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionParametersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HeartbeatResponse. */ + interface IHeartbeatResponse { + } + + /** Represents a HeartbeatResponse. */ + class HeartbeatResponse implements IHeartbeatResponse { + + /** + * Constructs a new HeartbeatResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IHeartbeatResponse); + + /** + * Creates a new HeartbeatResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns HeartbeatResponse instance + */ + public static create(properties?: google.bigtable.v2.IHeartbeatResponse): google.bigtable.v2.HeartbeatResponse; + + /** + * Encodes the specified HeartbeatResponse message. Does not implicitly {@link google.bigtable.v2.HeartbeatResponse.verify|verify} messages. + * @param message HeartbeatResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IHeartbeatResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HeartbeatResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.HeartbeatResponse.verify|verify} messages. + * @param message HeartbeatResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IHeartbeatResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HeartbeatResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HeartbeatResponse + * @throws {Error} If the payload is not 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.HeartbeatResponse; + + /** + * Decodes a HeartbeatResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HeartbeatResponse + * @throws {Error} If the payload 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.HeartbeatResponse; + + /** + * Verifies a HeartbeatResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HeartbeatResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HeartbeatResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.HeartbeatResponse; + + /** + * Creates a plain object from a HeartbeatResponse message. Also converts values to other types if specified. + * @param message HeartbeatResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.HeartbeatResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HeartbeatResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HeartbeatResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoAwayResponse. */ + interface IGoAwayResponse { + + /** GoAwayResponse reason */ + reason?: (string|null); + + /** GoAwayResponse description */ + description?: (string|null); + + /** GoAwayResponse lastRpcIdAdmitted */ + lastRpcIdAdmitted?: (number|Long|string|null); + } + + /** Represents a GoAwayResponse. */ + class GoAwayResponse implements IGoAwayResponse { + + /** + * Constructs a new GoAwayResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IGoAwayResponse); + + /** GoAwayResponse reason. */ + public reason: string; + + /** GoAwayResponse description. */ + public description: string; + + /** GoAwayResponse lastRpcIdAdmitted. */ + public lastRpcIdAdmitted: (number|Long|string); + + /** + * Creates a new GoAwayResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GoAwayResponse instance + */ + public static create(properties?: google.bigtable.v2.IGoAwayResponse): google.bigtable.v2.GoAwayResponse; + + /** + * Encodes the specified GoAwayResponse message. Does not implicitly {@link google.bigtable.v2.GoAwayResponse.verify|verify} messages. + * @param message GoAwayResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IGoAwayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoAwayResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.GoAwayResponse.verify|verify} messages. + * @param message GoAwayResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IGoAwayResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoAwayResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoAwayResponse + * @throws {Error} If the payload is not 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.GoAwayResponse; + + /** + * Decodes a GoAwayResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoAwayResponse + * @throws {Error} If the payload 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.GoAwayResponse; + + /** + * Verifies a GoAwayResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoAwayResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoAwayResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.GoAwayResponse; + + /** + * Creates a plain object from a GoAwayResponse message. Also converts values to other types if specified. + * @param message GoAwayResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.GoAwayResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoAwayResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoAwayResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionRefreshConfig. */ + interface ISessionRefreshConfig { + + /** SessionRefreshConfig optimizedOpenRequest */ + optimizedOpenRequest?: (google.bigtable.v2.IOpenSessionRequest|null); + + /** SessionRefreshConfig metadata */ + metadata?: (google.bigtable.v2.SessionRefreshConfig.IMetadata[]|null); + } + + /** Represents a SessionRefreshConfig. */ + class SessionRefreshConfig implements ISessionRefreshConfig { + + /** + * Constructs a new SessionRefreshConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.ISessionRefreshConfig); + + /** SessionRefreshConfig optimizedOpenRequest. */ + public optimizedOpenRequest?: (google.bigtable.v2.IOpenSessionRequest|null); + + /** SessionRefreshConfig metadata. */ + public metadata: google.bigtable.v2.SessionRefreshConfig.IMetadata[]; + + /** + * Creates a new SessionRefreshConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionRefreshConfig instance + */ + public static create(properties?: google.bigtable.v2.ISessionRefreshConfig): google.bigtable.v2.SessionRefreshConfig; + + /** + * Encodes the specified SessionRefreshConfig message. Does not implicitly {@link google.bigtable.v2.SessionRefreshConfig.verify|verify} messages. + * @param message SessionRefreshConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.ISessionRefreshConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionRefreshConfig message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionRefreshConfig.verify|verify} messages. + * @param message SessionRefreshConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.ISessionRefreshConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionRefreshConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionRefreshConfig + * @throws {Error} If the payload is not 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.SessionRefreshConfig; + + /** + * Decodes a SessionRefreshConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionRefreshConfig + * @throws {Error} If the payload 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.SessionRefreshConfig; + + /** + * Verifies a SessionRefreshConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionRefreshConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionRefreshConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionRefreshConfig; + + /** + * Creates a plain object from a SessionRefreshConfig message. Also converts values to other types if specified. + * @param message SessionRefreshConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionRefreshConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionRefreshConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionRefreshConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SessionRefreshConfig { + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata key */ + key?: (string|null); + + /** Metadata value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.SessionRefreshConfig.IMetadata); + + /** Metadata key. */ + public key: string; + + /** Metadata value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.bigtable.v2.SessionRefreshConfig.IMetadata): google.bigtable.v2.SessionRefreshConfig.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.bigtable.v2.SessionRefreshConfig.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.SessionRefreshConfig.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionRefreshConfig.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.SessionRefreshConfig.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not 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.SessionRefreshConfig.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload 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.SessionRefreshConfig.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.SessionRefreshConfig.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.SessionRefreshConfig.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureFlags. */ + interface IFeatureFlags { + + /** FeatureFlags reverseScans */ + reverseScans?: (boolean|null); + + /** FeatureFlags mutateRowsRateLimit */ + mutateRowsRateLimit?: (boolean|null); + + /** FeatureFlags mutateRowsRateLimit2 */ + mutateRowsRateLimit2?: (boolean|null); + + /** FeatureFlags lastScannedRowResponses */ + lastScannedRowResponses?: (boolean|null); + + /** FeatureFlags routingCookie */ + routingCookie?: (boolean|null); + + /** FeatureFlags retryInfo */ + retryInfo?: (boolean|null); + + /** FeatureFlags clientSideMetricsEnabled */ + clientSideMetricsEnabled?: (boolean|null); + + /** FeatureFlags trafficDirectorEnabled */ + trafficDirectorEnabled?: (boolean|null); + + /** FeatureFlags directAccessRequested */ + directAccessRequested?: (boolean|null); + + /** FeatureFlags peerInfo */ + peerInfo?: (boolean|null); + + /** FeatureFlags sessionsCompatible */ + sessionsCompatible?: (boolean|null); + + /** FeatureFlags sessionsRequired */ + sessionsRequired?: (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 reverseScans. */ + public reverseScans: boolean; + + /** FeatureFlags mutateRowsRateLimit. */ + public mutateRowsRateLimit: boolean; + + /** FeatureFlags mutateRowsRateLimit2. */ + public mutateRowsRateLimit2: boolean; + + /** FeatureFlags lastScannedRowResponses. */ + public lastScannedRowResponses: boolean; + + /** FeatureFlags routingCookie. */ + public routingCookie: boolean; + + /** FeatureFlags retryInfo. */ + public retryInfo: boolean; + + /** FeatureFlags clientSideMetricsEnabled. */ + public clientSideMetricsEnabled: boolean; + + /** FeatureFlags trafficDirectorEnabled. */ + public trafficDirectorEnabled: boolean; + + /** FeatureFlags directAccessRequested. */ + public directAccessRequested: boolean; + + /** FeatureFlags peerInfo. */ + public peerInfo: boolean; + + /** FeatureFlags sessionsCompatible. */ + public sessionsCompatible: boolean; + + /** FeatureFlags sessionsRequired. */ + public sessionsRequired: 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 PeerInfo. */ + interface IPeerInfo { + + /** PeerInfo googleFrontendId */ + googleFrontendId?: (number|Long|string|null); + + /** PeerInfo applicationFrontendId */ + applicationFrontendId?: (number|Long|string|null); + + /** PeerInfo applicationFrontendRegion */ + applicationFrontendRegion?: (string|null); + + /** PeerInfo applicationFrontendZone */ + applicationFrontendZone?: (string|null); + + /** PeerInfo applicationFrontendSubzone */ + applicationFrontendSubzone?: (string|null); + + /** PeerInfo transportType */ + transportType?: (google.bigtable.v2.PeerInfo.TransportType|keyof typeof google.bigtable.v2.PeerInfo.TransportType|null); + } + + /** Represents a PeerInfo. */ + class PeerInfo implements IPeerInfo { + + /** + * Constructs a new PeerInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPeerInfo); + + /** PeerInfo googleFrontendId. */ + public googleFrontendId: (number|Long|string); + + /** PeerInfo applicationFrontendId. */ + public applicationFrontendId: (number|Long|string); + + /** PeerInfo applicationFrontendRegion. */ + public applicationFrontendRegion: string; + + /** PeerInfo applicationFrontendZone. */ + public applicationFrontendZone: string; + + /** PeerInfo applicationFrontendSubzone. */ + public applicationFrontendSubzone: string; + + /** PeerInfo transportType. */ + public transportType: (google.bigtable.v2.PeerInfo.TransportType|keyof typeof google.bigtable.v2.PeerInfo.TransportType); + + /** + * Creates a new PeerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PeerInfo instance + */ + public static create(properties?: google.bigtable.v2.IPeerInfo): google.bigtable.v2.PeerInfo; + + /** + * Encodes the specified PeerInfo message. Does not implicitly {@link google.bigtable.v2.PeerInfo.verify|verify} messages. + * @param message PeerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPeerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PeerInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.PeerInfo.verify|verify} messages. + * @param message PeerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPeerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PeerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PeerInfo + * @throws {Error} If the payload is not 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.PeerInfo; + + /** + * Decodes a PeerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PeerInfo + * @throws {Error} If the payload 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.PeerInfo; + + /** + * Verifies a PeerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PeerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PeerInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PeerInfo; + + /** + * Creates a plain object from a PeerInfo message. Also converts values to other types if specified. + * @param message PeerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PeerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PeerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PeerInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PeerInfo { + + /** TransportType enum. */ + enum TransportType { + TRANSPORT_TYPE_UNKNOWN = 0, + TRANSPORT_TYPE_EXTERNAL = 1, + TRANSPORT_TYPE_CLOUD_PATH = 2, + TRANSPORT_TYPE_DIRECT_ACCESS = 3, + TRANSPORT_TYPE_SESSION_UNKNOWN = 4, + TRANSPORT_TYPE_SESSION_EXTERNAL = 5, + TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6, + TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7 + } + } + + /** Properties of a ResponseParams. */ + interface IResponseParams { + + /** ResponseParams zoneId */ + zoneId?: (string|null); + + /** ResponseParams clusterId */ + clusterId?: (string|null); + + /** ResponseParams afeId */ + afeId?: (number|Long|string|null); + } + + /** Represents a ResponseParams. */ + class ResponseParams implements IResponseParams { + + /** + * Constructs a new ResponseParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IResponseParams); + + /** ResponseParams zoneId. */ + public zoneId?: (string|null); + + /** ResponseParams clusterId. */ + public clusterId?: (string|null); + + /** ResponseParams afeId. */ + public afeId?: (number|Long|string|null); + + /** + * Creates a new ResponseParams instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseParams instance + */ + public static create(properties?: google.bigtable.v2.IResponseParams): google.bigtable.v2.ResponseParams; + + /** + * Encodes the specified ResponseParams message. Does not implicitly {@link google.bigtable.v2.ResponseParams.verify|verify} messages. + * @param message ResponseParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IResponseParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseParams message, length delimited. Does not implicitly {@link google.bigtable.v2.ResponseParams.verify|verify} messages. + * @param message ResponseParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IResponseParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseParams + * @throws {Error} If the payload is not 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.ResponseParams; + + /** + * Decodes a ResponseParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseParams + * @throws {Error} If the payload 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.ResponseParams; + + /** + * Verifies a ResponseParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseParams + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.ResponseParams; + + /** + * Creates a plain object from a ResponseParams message. Also converts values to other types if specified. + * @param message ResponseParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.ResponseParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * 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); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|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[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * 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); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|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); + + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|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; + } + + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|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); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * 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); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|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); + + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** + * 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); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|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); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * 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, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RoutingRule. */ + interface IRoutingRule { + + /** RoutingRule routingParameters */ + routingParameters?: (google.api.IRoutingParameter[]|null); + } + + /** Represents a RoutingRule. */ + class RoutingRule implements IRoutingRule { + + /** + * Constructs a new RoutingRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRoutingRule); + + /** RoutingRule routingParameters. */ + public routingParameters: google.api.IRoutingParameter[]; + + /** + * Creates a new RoutingRule instance using the specified properties. + * @param [properties] Properties to set + * @returns RoutingRule instance + */ + public static create(properties?: google.api.IRoutingRule): google.api.RoutingRule; + + /** + * Encodes the specified RoutingRule message. Does not implicitly {@link google.api.RoutingRule.verify|verify} messages. + * @param message RoutingRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link google.api.RoutingRule.verify|verify} messages. + * @param message RoutingRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RoutingRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RoutingRule + * @throws {Error} If the payload is not 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.RoutingRule; + + /** + * Decodes a RoutingRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RoutingRule + * @throws {Error} If the payload 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.RoutingRule; + + /** + * Verifies a RoutingRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RoutingRule + */ + public static fromObject(object: { [k: string]: any }): google.api.RoutingRule; + + /** + * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. + * @param message RoutingRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RoutingRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RoutingRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RoutingRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RoutingParameter. */ + interface IRoutingParameter { + + /** RoutingParameter field */ + field?: (string|null); + + /** RoutingParameter pathTemplate */ + pathTemplate?: (string|null); + } + + /** Represents a RoutingParameter. */ + class RoutingParameter implements IRoutingParameter { + + /** + * Constructs a new RoutingParameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRoutingParameter); + + /** RoutingParameter field. */ + public field: string; + + /** RoutingParameter pathTemplate. */ + public pathTemplate: string; + + /** + * Creates a new RoutingParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns RoutingParameter instance + */ + public static create(properties?: google.api.IRoutingParameter): google.api.RoutingParameter; + + /** + * Encodes the specified RoutingParameter message. Does not implicitly {@link google.api.RoutingParameter.verify|verify} messages. + * @param message RoutingParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRoutingParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RoutingParameter message, length delimited. Does not implicitly {@link google.api.RoutingParameter.verify|verify} messages. + * @param message RoutingParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRoutingParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RoutingParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RoutingParameter + * @throws {Error} If the payload is not 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.RoutingParameter; + + /** + * Decodes a RoutingParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RoutingParameter + * @throws {Error} If the payload 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.RoutingParameter; + + /** + * Verifies a RoutingParameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RoutingParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RoutingParameter + */ + public static fromObject(object: { [k: string]: any }): google.api.RoutingParameter; + + /** + * Creates a plain object from a RoutingParameter message. Also converts values to other types if specified. + * @param message RoutingParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RoutingParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RoutingParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RoutingParameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.bigtable.v2.openSessionType */ + ".google.bigtable.v2.openSessionType"?: (google.bigtable.v2.SessionType|keyof typeof google.bigtable.v2.SessionType|null); + + /** MessageOptions .google.bigtable.v2.vrpcSessionType */ + ".google.bigtable.v2.vrpcSessionType"?: (google.bigtable.v2.SessionType[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** 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 EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.bigtable.v2.rpcSessionType */ + ".google.bigtable.v2.rpcSessionType"?: (google.bigtable.v2.SessionType|keyof typeof google.bigtable.v2.SessionType|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.api.routing */ + ".google.api.routing"?: (google.api.IRoutingRule|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not 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.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload 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.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not 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.FeatureSet.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload 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.FeatureSet.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not 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.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload 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.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not 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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload 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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + + /** 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 { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace iam. */ + namespace iam { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { + + /** + * Constructs a new IAMPolicy service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IAMPolicy; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } + + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { + + /** SetIamPolicyRequest resource */ + resource?: (string|null); + + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { + + /** + * Constructs a new SetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); + + /** SetIamPolicyRequest resource. */ + public resource: string; + + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; + + /** + * Verifies a SetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { + + /** GetIamPolicyRequest resource */ + resource?: (string|null); + + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); + } + + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { + + /** + * Constructs a new GetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); + + /** GetIamPolicyRequest resource. */ + public resource: string; + + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; + + /** + * Verifies a GetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { + + /** TestIamPermissionsRequest resource */ + resource?: (string|null); + + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { + + /** + * Constructs a new TestIamPermissionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); + + /** TestIamPermissionsRequest resource. */ + public resource: string; + + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsRequest instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; + + /** + * Verifies a TestIamPermissionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { + + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { + + /** + * Constructs a new TestIamPermissionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); + + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsResponse instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; + + /** + * Verifies a TestIamPermissionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { + + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); + } + + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { + + /** + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetPolicyOptions); + + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance + */ + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; + + /** + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPolicyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPolicyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Policy. */ + interface IPolicy { + + /** Policy version */ + version?: (number|null); + + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); + + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + + /** Policy etag */ + etag?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { + + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); + + /** Policy version. */ + public version: number; + + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; + + /** Policy etag. */ + public etag: (Uint8Array|Buffer|string); + + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); + + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); + + /** Binding role. */ + public role: string; + + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig service */ + service?: (string|null); + + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); + + /** AuditConfig service. */ + public service: string; + + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + + /** + * Verifies an AuditConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { + + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } + + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { + + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); + + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + + /** + * Verifies an AuditLogConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditLogConfig { + + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } + } + + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { + + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } + + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { + + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); + + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; + + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BindingDelta. */ + interface IBindingDelta { + + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { + + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); + + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BindingDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { + + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); + + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + + /** + * Verifies an AuditConfigDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Expr. */ + interface IExpr { + + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); + } + + /** Represents an Expr. */ + class Expr implements IExpr { + + /** + * Constructs a new Expr. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IExpr); + + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; + + /** + * Creates a new Expr instance using the specified properties. + * @param [properties] Properties to set + * @returns Expr instance + */ + public static create(properties?: google.type.IExpr): google.type.Expr; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; + + /** + * Verifies an Expr message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expr + */ + public static fromObject(object: { [k: string]: any }): google.type.Expr; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expr to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorInfo. */ + interface IErrorInfo { + + /** ErrorInfo reason */ + reason?: (string|null); + + /** ErrorInfo domain */ + domain?: (string|null); + + /** ErrorInfo metadata */ + metadata?: ({ [k: string]: string }|null); + } + + /** Represents an ErrorInfo. */ + class ErrorInfo implements IErrorInfo { + + /** + * Constructs a new ErrorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IErrorInfo); + + /** ErrorInfo reason. */ + public reason: string; + + /** ErrorInfo domain. */ + public domain: string; + + /** ErrorInfo metadata. */ + public metadata: { [k: string]: string }; + + /** + * Creates a new ErrorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorInfo instance + */ + public static create(properties?: google.rpc.IErrorInfo): google.rpc.ErrorInfo; + + /** + * Encodes the specified ErrorInfo message. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. + * @param message ErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. + * @param message ErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.ErrorInfo; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.ErrorInfo; + + /** + * Verifies an ErrorInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ErrorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.ErrorInfo; + + /** + * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. + * @param message ErrorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.ErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetryInfo. */ + interface IRetryInfo { + + /** RetryInfo retryDelay */ + retryDelay?: (google.protobuf.IDuration|null); + } + + /** Represents a RetryInfo. */ + class RetryInfo implements IRetryInfo { + + /** + * Constructs a new RetryInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IRetryInfo); + + /** RetryInfo retryDelay. */ + public retryDelay?: (google.protobuf.IDuration|null); + + /** + * Creates a new RetryInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RetryInfo instance + */ + public static create(properties?: google.rpc.IRetryInfo): google.rpc.RetryInfo; + + /** + * Encodes the specified RetryInfo message. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. + * @param message RetryInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IRetryInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetryInfo message, length delimited. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. + * @param message RetryInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IRetryInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetryInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetryInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.RetryInfo; + + /** + * Decodes a RetryInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetryInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.RetryInfo; + + /** + * Verifies a RetryInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetryInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetryInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.RetryInfo; + + /** + * Creates a plain object from a RetryInfo message. Also converts values to other types if specified. + * @param message RetryInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.RetryInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetryInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetryInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DebugInfo. */ + interface IDebugInfo { + + /** DebugInfo stackEntries */ + stackEntries?: (string[]|null); + + /** DebugInfo detail */ + detail?: (string|null); + } + + /** Represents a DebugInfo. */ + class DebugInfo implements IDebugInfo { + + /** + * Constructs a new DebugInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IDebugInfo); + + /** DebugInfo stackEntries. */ + public stackEntries: string[]; + + /** DebugInfo detail. */ + public detail: string; + + /** + * Creates a new DebugInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DebugInfo instance + */ + public static create(properties?: google.rpc.IDebugInfo): google.rpc.DebugInfo; + + /** + * Encodes the specified DebugInfo message. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. + * @param message DebugInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IDebugInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DebugInfo message, length delimited. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. + * @param message DebugInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IDebugInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DebugInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DebugInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.DebugInfo; + + /** + * Decodes a DebugInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DebugInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.DebugInfo; + + /** + * Verifies a DebugInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DebugInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DebugInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.DebugInfo; + + /** + * Creates a plain object from a DebugInfo message. Also converts values to other types if specified. + * @param message DebugInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.DebugInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DebugInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DebugInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuotaFailure. */ + interface IQuotaFailure { + + /** QuotaFailure violations */ + violations?: (google.rpc.QuotaFailure.IViolation[]|null); + } + + /** Represents a QuotaFailure. */ + class QuotaFailure implements IQuotaFailure { + + /** + * Constructs a new QuotaFailure. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IQuotaFailure); + + /** QuotaFailure violations. */ + public violations: google.rpc.QuotaFailure.IViolation[]; + + /** + * Creates a new QuotaFailure instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaFailure instance + */ + public static create(properties?: google.rpc.IQuotaFailure): google.rpc.QuotaFailure; + + /** + * Encodes the specified QuotaFailure message. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. + * @param message QuotaFailure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IQuotaFailure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaFailure message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. + * @param message QuotaFailure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IQuotaFailure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaFailure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.QuotaFailure; + + /** + * Decodes a QuotaFailure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.QuotaFailure; + + /** + * Verifies a QuotaFailure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuotaFailure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaFailure + */ + public static fromObject(object: { [k: string]: any }): google.rpc.QuotaFailure; + + /** + * Creates a plain object from a QuotaFailure message. Also converts values to other types if specified. + * @param message QuotaFailure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.QuotaFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaFailure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaFailure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QuotaFailure { + + /** Properties of a Violation. */ + interface IViolation { + + /** Violation subject */ + subject?: (string|null); + + /** Violation description */ + description?: (string|null); + + /** Violation apiService */ + apiService?: (string|null); + + /** Violation quotaMetric */ + quotaMetric?: (string|null); + + /** Violation quotaId */ + quotaId?: (string|null); + + /** Violation quotaDimensions */ + quotaDimensions?: ({ [k: string]: string }|null); + + /** Violation quotaValue */ + quotaValue?: (number|Long|string|null); + + /** Violation futureQuotaValue */ + futureQuotaValue?: (number|Long|string|null); + } + + /** Represents a Violation. */ + class Violation implements IViolation { + + /** + * Constructs a new Violation. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.QuotaFailure.IViolation); + + /** Violation subject. */ + public subject: string; + + /** Violation description. */ + public description: string; + + /** Violation apiService. */ + public apiService: string; + + /** Violation quotaMetric. */ + public quotaMetric: string; + + /** Violation quotaId. */ + public quotaId: string; + + /** Violation quotaDimensions. */ + public quotaDimensions: { [k: string]: string }; + + /** Violation quotaValue. */ + public quotaValue: (number|Long|string); + + /** Violation futureQuotaValue. */ + public futureQuotaValue?: (number|Long|string|null); + + /** + * Creates a new Violation instance using the specified properties. + * @param [properties] Properties to set + * @returns Violation instance + */ + public static create(properties?: google.rpc.QuotaFailure.IViolation): google.rpc.QuotaFailure.Violation; + + /** + * Encodes the specified Violation message. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. + * @param message Violation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.QuotaFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. + * @param message Violation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.QuotaFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Violation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.QuotaFailure.Violation; + + /** + * Decodes a Violation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.QuotaFailure.Violation; + + /** + * Verifies a Violation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Violation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Violation + */ + public static fromObject(object: { [k: string]: any }): google.rpc.QuotaFailure.Violation; + + /** + * Creates a plain object from a Violation message. Also converts values to other types if specified. + * @param message Violation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.QuotaFailure.Violation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Violation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Violation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a PreconditionFailure. */ + interface IPreconditionFailure { + + /** PreconditionFailure violations */ + violations?: (google.rpc.PreconditionFailure.IViolation[]|null); + } + + /** Represents a PreconditionFailure. */ + class PreconditionFailure implements IPreconditionFailure { + + /** + * Constructs a new PreconditionFailure. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IPreconditionFailure); + + /** PreconditionFailure violations. */ + public violations: google.rpc.PreconditionFailure.IViolation[]; + + /** + * Creates a new PreconditionFailure instance using the specified properties. + * @param [properties] Properties to set + * @returns PreconditionFailure instance + */ + public static create(properties?: google.rpc.IPreconditionFailure): google.rpc.PreconditionFailure; + + /** + * Encodes the specified PreconditionFailure message. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. + * @param message PreconditionFailure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IPreconditionFailure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreconditionFailure message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. + * @param message PreconditionFailure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IPreconditionFailure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreconditionFailure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreconditionFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.PreconditionFailure; + + /** + * Decodes a PreconditionFailure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreconditionFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.PreconditionFailure; + + /** + * Verifies a PreconditionFailure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreconditionFailure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreconditionFailure + */ + public static fromObject(object: { [k: string]: any }): google.rpc.PreconditionFailure; + + /** + * Creates a plain object from a PreconditionFailure message. Also converts values to other types if specified. + * @param message PreconditionFailure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.PreconditionFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreconditionFailure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreconditionFailure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PreconditionFailure { + + /** Properties of a Violation. */ + interface IViolation { + + /** Violation type */ + type?: (string|null); + + /** Violation subject */ + subject?: (string|null); + + /** Violation description */ + description?: (string|null); + } + + /** Represents a Violation. */ + class Violation implements IViolation { + + /** + * Constructs a new Violation. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.PreconditionFailure.IViolation); + + /** Violation type. */ + public type: string; + + /** Violation subject. */ + public subject: string; + + /** Violation description. */ + public description: string; + + /** + * Creates a new Violation instance using the specified properties. + * @param [properties] Properties to set + * @returns Violation instance + */ + public static create(properties?: google.rpc.PreconditionFailure.IViolation): google.rpc.PreconditionFailure.Violation; + + /** + * Encodes the specified Violation message. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. + * @param message Violation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.PreconditionFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. + * @param message Violation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.PreconditionFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Violation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.PreconditionFailure.Violation; + + /** + * Decodes a Violation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.PreconditionFailure.Violation; + + /** + * Verifies a Violation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Violation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Violation + */ + public static fromObject(object: { [k: string]: any }): google.rpc.PreconditionFailure.Violation; + + /** + * Creates a plain object from a Violation message. Also converts values to other types if specified. + * @param message Violation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.PreconditionFailure.Violation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Violation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Violation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BadRequest. */ + interface IBadRequest { + + /** BadRequest fieldViolations */ + fieldViolations?: (google.rpc.BadRequest.IFieldViolation[]|null); + } + + /** Represents a BadRequest. */ + class BadRequest implements IBadRequest { + + /** + * Constructs a new BadRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IBadRequest); + + /** BadRequest fieldViolations. */ + public fieldViolations: google.rpc.BadRequest.IFieldViolation[]; + + /** + * Creates a new BadRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BadRequest instance + */ + public static create(properties?: google.rpc.IBadRequest): google.rpc.BadRequest; + + /** + * Encodes the specified BadRequest message. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. + * @param message BadRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IBadRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BadRequest message, length delimited. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. + * @param message BadRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IBadRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BadRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BadRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.BadRequest; + + /** + * Decodes a BadRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BadRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.BadRequest; + + /** + * Verifies a BadRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BadRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BadRequest + */ + public static fromObject(object: { [k: string]: any }): google.rpc.BadRequest; + + /** + * Creates a plain object from a BadRequest message. Also converts values to other types if specified. + * @param message BadRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.BadRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BadRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BadRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BadRequest { + + /** Properties of a FieldViolation. */ + interface IFieldViolation { + + /** FieldViolation field */ + field?: (string|null); + + /** FieldViolation description */ + description?: (string|null); + + /** FieldViolation reason */ + reason?: (string|null); + + /** FieldViolation localizedMessage */ + localizedMessage?: (google.rpc.ILocalizedMessage|null); + } + + /** Represents a FieldViolation. */ + class FieldViolation implements IFieldViolation { + + /** + * Constructs a new FieldViolation. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.BadRequest.IFieldViolation); + + /** FieldViolation field. */ + public field: string; + + /** FieldViolation description. */ + public description: string; + + /** FieldViolation reason. */ + public reason: string; + + /** FieldViolation localizedMessage. */ + public localizedMessage?: (google.rpc.ILocalizedMessage|null); + + /** + * Creates a new FieldViolation instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldViolation instance + */ + public static create(properties?: google.rpc.BadRequest.IFieldViolation): google.rpc.BadRequest.FieldViolation; + + /** + * Encodes the specified FieldViolation message. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. + * @param message FieldViolation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.BadRequest.IFieldViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldViolation message, length delimited. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. + * @param message FieldViolation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.BadRequest.IFieldViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldViolation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldViolation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.BadRequest.FieldViolation; + + /** + * Decodes a FieldViolation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldViolation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.BadRequest.FieldViolation; + + /** + * Verifies a FieldViolation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldViolation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldViolation + */ + public static fromObject(object: { [k: string]: any }): google.rpc.BadRequest.FieldViolation; + + /** + * Creates a plain object from a FieldViolation message. Also converts values to other types if specified. + * @param message FieldViolation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.BadRequest.FieldViolation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldViolation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldViolation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RequestInfo. */ + interface IRequestInfo { + + /** RequestInfo requestId */ + requestId?: (string|null); + + /** RequestInfo servingData */ + servingData?: (string|null); + } + + /** Represents a RequestInfo. */ + class RequestInfo implements IRequestInfo { + + /** + * Constructs a new RequestInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IRequestInfo); + + /** RequestInfo requestId. */ + public requestId: string; + + /** RequestInfo servingData. */ + public servingData: string; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestInfo instance + */ + public static create(properties?: google.rpc.IRequestInfo): google.rpc.RequestInfo; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. + * @param message RequestInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. + * @param message RequestInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.RequestInfo; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.RequestInfo; + + /** + * Verifies a RequestInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.RequestInfo; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @param message RequestInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.RequestInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceInfo. */ + interface IResourceInfo { + + /** ResourceInfo resourceType */ + resourceType?: (string|null); + + /** ResourceInfo resourceName */ + resourceName?: (string|null); + + /** ResourceInfo owner */ + owner?: (string|null); + + /** ResourceInfo description */ + description?: (string|null); + } + + /** Represents a ResourceInfo. */ + class ResourceInfo implements IResourceInfo { + + /** + * Constructs a new ResourceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IResourceInfo); + + /** ResourceInfo resourceType. */ + public resourceType: string; + + /** ResourceInfo resourceName. */ + public resourceName: string; + + /** ResourceInfo owner. */ + public owner: string; + + /** ResourceInfo description. */ + public description: string; + + /** + * Creates a new ResourceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceInfo instance + */ + public static create(properties?: google.rpc.IResourceInfo): google.rpc.ResourceInfo; + + /** + * Encodes the specified ResourceInfo message. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. + * @param message ResourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IResourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceInfo message, length delimited. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. + * @param message ResourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IResourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.ResourceInfo; + + /** + * Decodes a ResourceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.ResourceInfo; + + /** + * Verifies a ResourceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.ResourceInfo; + + /** + * Creates a plain object from a ResourceInfo message. Also converts values to other types if specified. + * @param message ResourceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.ResourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Help. */ + interface IHelp { + + /** Help links */ + links?: (google.rpc.Help.ILink[]|null); + } + + /** Represents a Help. */ + class Help implements IHelp { + + /** + * Constructs a new Help. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IHelp); + + /** Help links. */ + public links: google.rpc.Help.ILink[]; + + /** + * Creates a new Help instance using the specified properties. + * @param [properties] Properties to set + * @returns Help instance + */ + public static create(properties?: google.rpc.IHelp): google.rpc.Help; + + /** + * Encodes the specified Help message. Does not implicitly {@link google.rpc.Help.verify|verify} messages. + * @param message Help message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IHelp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Help message, length delimited. Does not implicitly {@link google.rpc.Help.verify|verify} messages. + * @param message Help message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IHelp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Help message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Help + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Help; + + /** + * Decodes a Help message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Help + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Help; + + /** + * Verifies a Help message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Help message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Help + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Help; + + /** + * Creates a plain object from a Help message. Also converts values to other types if specified. + * @param message Help + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Help, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Help to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Help + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Help { + + /** Properties of a Link. */ + interface ILink { + + /** Link description */ + description?: (string|null); + + /** Link url */ + url?: (string|null); + } + + /** Represents a Link. */ + class Link implements ILink { + + /** + * Constructs a new Link. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.Help.ILink); + + /** Link description. */ + public description: string; + + /** Link url. */ + public url: string; + + /** + * Creates a new Link instance using the specified properties. + * @param [properties] Properties to set + * @returns Link instance + */ + public static create(properties?: google.rpc.Help.ILink): google.rpc.Help.Link; + + /** + * Encodes the specified Link message. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. + * @param message Link message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.Help.ILink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Link message, length delimited. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. + * @param message Link message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.Help.ILink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Link message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Help.Link; + + /** + * Decodes a Link message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Help.Link; + + /** + * Verifies a Link message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Link message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Link + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Help.Link; + + /** + * Creates a plain object from a Link message. Also converts values to other types if specified. + * @param message Link + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Help.Link, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Link to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Link + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LocalizedMessage. */ + interface ILocalizedMessage { + + /** LocalizedMessage locale */ + locale?: (string|null); + + /** LocalizedMessage message */ + message?: (string|null); + } + + /** Represents a LocalizedMessage. */ + class LocalizedMessage implements ILocalizedMessage { + + /** + * Constructs a new LocalizedMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.ILocalizedMessage); + + /** LocalizedMessage locale. */ + public locale: string; + + /** LocalizedMessage message. */ + public message: string; + + /** + * Creates a new LocalizedMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns LocalizedMessage instance + */ + public static create(properties?: google.rpc.ILocalizedMessage): google.rpc.LocalizedMessage; + + /** + * Encodes the specified LocalizedMessage message. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. + * @param message LocalizedMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.ILocalizedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocalizedMessage message, length delimited. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. + * @param message LocalizedMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.ILocalizedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocalizedMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocalizedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.LocalizedMessage; + + /** + * Decodes a LocalizedMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocalizedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.LocalizedMessage; + + /** + * Verifies a LocalizedMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocalizedMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocalizedMessage + */ + public static fromObject(object: { [k: string]: any }): google.rpc.LocalizedMessage; + + /** + * Creates a plain object from a LocalizedMessage message. Also converts values to other types if specified. + * @param message LocalizedMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.LocalizedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocalizedMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocalizedMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-bigtable-api/protos/protos.js b/packages/google-cloud-bigtable-api/protos/protos.js new file mode 100644 index 000000000000..a3fff58ef880 --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/protos.js @@ -0,0 +1,129686 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots["_google_cloud_bigtable_api_protos"] || ($protobuf.roots["_google_cloud_bigtable_api_protos"] = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.bigtable = (function() { + + /** + * Namespace bigtable. + * @memberof google + * @namespace + */ + var bigtable = {}; + + bigtable.admin = (function() { + + /** + * Namespace admin. + * @memberof google.bigtable + * @namespace + */ + var admin = {}; + + admin.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.bigtable.admin + * @namespace + */ + var v2 = {}; + + v2.BigtableInstanceAdmin = (function() { + + /** + * Constructs a new BigtableInstanceAdmin service. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a BigtableInstanceAdmin + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function BigtableInstanceAdmin(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (BigtableInstanceAdmin.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BigtableInstanceAdmin; + + /** + * Creates new BigtableInstanceAdmin service using the specified rpc implementation. + * @function create + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {BigtableInstanceAdmin} RPC service. Useful where requests and/or responses are streamed. + */ + BigtableInstanceAdmin.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createInstance}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef CreateInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateInstance. + * @function createInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateInstanceRequest} request CreateInstanceRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstanceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.createInstance = function createInstance(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createInstance, $root.google.bigtable.admin.v2.CreateInstanceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateInstance" }); + + /** + * Calls CreateInstance. + * @function createInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateInstanceRequest} request CreateInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getInstance}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef GetInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Instance} [response] Instance + */ + + /** + * Calls GetInstance. + * @function getInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetInstanceRequest} request GetInstanceRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstanceCallback} callback Node-style callback called with the error, if any, and Instance + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.getInstance = function getInstance(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getInstance, $root.google.bigtable.admin.v2.GetInstanceRequest, $root.google.bigtable.admin.v2.Instance, request, callback); + }, "name", { value: "GetInstance" }); + + /** + * Calls GetInstance. + * @function getInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetInstanceRequest} request GetInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listInstances}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef ListInstancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListInstancesResponse} [response] ListInstancesResponse + */ + + /** + * Calls ListInstances. + * @function listInstances + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListInstancesRequest} request ListInstancesRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstancesCallback} callback Node-style callback called with the error, if any, and ListInstancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.listInstances = function listInstances(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listInstances, $root.google.bigtable.admin.v2.ListInstancesRequest, $root.google.bigtable.admin.v2.ListInstancesResponse, request, callback); + }, "name", { value: "ListInstances" }); + + /** + * Calls ListInstances. + * @function listInstances + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListInstancesRequest} request ListInstancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateInstance}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef UpdateInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Instance} [response] Instance + */ + + /** + * Calls UpdateInstance. + * @function updateInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IInstance} request Instance message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstanceCallback} callback Node-style callback called with the error, if any, and Instance + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.updateInstance = function updateInstance(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateInstance, $root.google.bigtable.admin.v2.Instance, $root.google.bigtable.admin.v2.Instance, request, callback); + }, "name", { value: "UpdateInstance" }); + + /** + * Calls UpdateInstance. + * @function updateInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IInstance} request Instance message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|partialUpdateInstance}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef PartialUpdateInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PartialUpdateInstance. + * @function partialUpdateInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IPartialUpdateInstanceRequest} request PartialUpdateInstanceRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstanceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.partialUpdateInstance = function partialUpdateInstance(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, partialUpdateInstance, $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PartialUpdateInstance" }); + + /** + * Calls PartialUpdateInstance. + * @function partialUpdateInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IPartialUpdateInstanceRequest} request PartialUpdateInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteInstance}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef DeleteInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteInstance. + * @function deleteInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteInstanceRequest} request DeleteInstanceRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstanceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.deleteInstance = function deleteInstance(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteInstance, $root.google.bigtable.admin.v2.DeleteInstanceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteInstance" }); + + /** + * Calls DeleteInstance. + * @function deleteInstance + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteInstanceRequest} request DeleteInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createCluster}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef CreateClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateCluster. + * @function createCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateClusterRequest} request CreateClusterRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.CreateClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.createCluster = function createCluster(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createCluster, $root.google.bigtable.admin.v2.CreateClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateCluster" }); + + /** + * Calls CreateCluster. + * @function createCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateClusterRequest} request CreateClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getCluster}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef GetClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Cluster} [response] Cluster + */ + + /** + * Calls GetCluster. + * @function getCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetClusterRequest} request GetClusterRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.GetClusterCallback} callback Node-style callback called with the error, if any, and Cluster + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.getCluster = function getCluster(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getCluster, $root.google.bigtable.admin.v2.GetClusterRequest, $root.google.bigtable.admin.v2.Cluster, request, callback); + }, "name", { value: "GetCluster" }); + + /** + * Calls GetCluster. + * @function getCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetClusterRequest} request GetClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listClusters}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef ListClustersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListClustersResponse} [response] ListClustersResponse + */ + + /** + * Calls ListClusters. + * @function listClusters + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListClustersRequest} request ListClustersRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.ListClustersCallback} callback Node-style callback called with the error, if any, and ListClustersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.listClusters = function listClusters(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listClusters, $root.google.bigtable.admin.v2.ListClustersRequest, $root.google.bigtable.admin.v2.ListClustersResponse, request, callback); + }, "name", { value: "ListClusters" }); + + /** + * Calls ListClusters. + * @function listClusters + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListClustersRequest} request ListClustersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateCluster}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef UpdateClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateCluster. + * @function updateCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICluster} request Cluster message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.updateCluster = function updateCluster(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateCluster, $root.google.bigtable.admin.v2.Cluster, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateCluster" }); + + /** + * Calls UpdateCluster. + * @function updateCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICluster} request Cluster message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|partialUpdateCluster}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef PartialUpdateClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PartialUpdateCluster. + * @function partialUpdateCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest} request PartialUpdateClusterRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.partialUpdateCluster = function partialUpdateCluster(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, partialUpdateCluster, $root.google.bigtable.admin.v2.PartialUpdateClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PartialUpdateCluster" }); + + /** + * Calls PartialUpdateCluster. + * @function partialUpdateCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest} request PartialUpdateClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteCluster}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef DeleteClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteCluster. + * @function deleteCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteClusterRequest} request DeleteClusterRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteClusterCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.deleteCluster = function deleteCluster(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteCluster, $root.google.bigtable.admin.v2.DeleteClusterRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteCluster" }); + + /** + * Calls DeleteCluster. + * @function deleteCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteClusterRequest} request DeleteClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createAppProfile}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef CreateAppProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.AppProfile} [response] AppProfile + */ + + /** + * Calls CreateAppProfile. + * @function createAppProfile + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest} request CreateAppProfileRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfileCallback} callback Node-style callback called with the error, if any, and AppProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.createAppProfile = function createAppProfile(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createAppProfile, $root.google.bigtable.admin.v2.CreateAppProfileRequest, $root.google.bigtable.admin.v2.AppProfile, request, callback); + }, "name", { value: "CreateAppProfile" }); + + /** + * Calls CreateAppProfile. + * @function createAppProfile + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest} request CreateAppProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getAppProfile}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef GetAppProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.AppProfile} [response] AppProfile + */ + + /** + * Calls GetAppProfile. + * @function getAppProfile + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetAppProfileRequest} request GetAppProfileRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfileCallback} callback Node-style callback called with the error, if any, and AppProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.getAppProfile = function getAppProfile(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getAppProfile, $root.google.bigtable.admin.v2.GetAppProfileRequest, $root.google.bigtable.admin.v2.AppProfile, request, callback); + }, "name", { value: "GetAppProfile" }); + + /** + * Calls GetAppProfile. + * @function getAppProfile + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetAppProfileRequest} request GetAppProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listAppProfiles}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef ListAppProfilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListAppProfilesResponse} [response] ListAppProfilesResponse + */ + + /** + * Calls ListAppProfiles. + * @function listAppProfiles + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListAppProfilesRequest} request ListAppProfilesRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfilesCallback} callback Node-style callback called with the error, if any, and ListAppProfilesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.listAppProfiles = function listAppProfiles(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listAppProfiles, $root.google.bigtable.admin.v2.ListAppProfilesRequest, $root.google.bigtable.admin.v2.ListAppProfilesResponse, request, callback); + }, "name", { value: "ListAppProfiles" }); + + /** + * Calls ListAppProfiles. + * @function listAppProfiles + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListAppProfilesRequest} request ListAppProfilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateAppProfile}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef UpdateAppProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAppProfile. + * @function updateAppProfile + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest} request UpdateAppProfileRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfileCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.updateAppProfile = function updateAppProfile(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateAppProfile, $root.google.bigtable.admin.v2.UpdateAppProfileRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAppProfile" }); + + /** + * Calls UpdateAppProfile. + * @function updateAppProfile + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest} request UpdateAppProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteAppProfile}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef DeleteAppProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAppProfile. + * @function deleteAppProfile + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest} request DeleteAppProfileRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.deleteAppProfile = function deleteAppProfile(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteAppProfile, $root.google.bigtable.admin.v2.DeleteAppProfileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAppProfile" }); + + /** + * Calls DeleteAppProfile. + * @function deleteAppProfile + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest} request DeleteAppProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getIamPolicy}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|setIamPolicy}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|testIamPermissions}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listHotTablets}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef ListHotTabletsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListHotTabletsResponse} [response] ListHotTabletsResponse + */ + + /** + * Calls ListHotTablets. + * @function listHotTablets + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListHotTabletsRequest} request ListHotTabletsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTabletsCallback} callback Node-style callback called with the error, if any, and ListHotTabletsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.listHotTablets = function listHotTablets(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listHotTablets, $root.google.bigtable.admin.v2.ListHotTabletsRequest, $root.google.bigtable.admin.v2.ListHotTabletsResponse, request, callback); + }, "name", { value: "ListHotTablets" }); + + /** + * Calls ListHotTablets. + * @function listHotTablets + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListHotTabletsRequest} request ListHotTabletsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createLogicalView}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef CreateLogicalViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateLogicalView. + * @function createLogicalView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateLogicalViewRequest} request CreateLogicalViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.CreateLogicalViewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.createLogicalView = function createLogicalView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createLogicalView, $root.google.bigtable.admin.v2.CreateLogicalViewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLogicalView" }); + + /** + * Calls CreateLogicalView. + * @function createLogicalView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateLogicalViewRequest} request CreateLogicalViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getLogicalView}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef GetLogicalViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.LogicalView} [response] LogicalView + */ + + /** + * Calls GetLogicalView. + * @function getLogicalView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetLogicalViewRequest} request GetLogicalViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.GetLogicalViewCallback} callback Node-style callback called with the error, if any, and LogicalView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.getLogicalView = function getLogicalView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getLogicalView, $root.google.bigtable.admin.v2.GetLogicalViewRequest, $root.google.bigtable.admin.v2.LogicalView, request, callback); + }, "name", { value: "GetLogicalView" }); + + /** + * Calls GetLogicalView. + * @function getLogicalView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetLogicalViewRequest} request GetLogicalViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listLogicalViews}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef ListLogicalViewsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListLogicalViewsResponse} [response] ListLogicalViewsResponse + */ + + /** + * Calls ListLogicalViews. + * @function listLogicalViews + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListLogicalViewsRequest} request ListLogicalViewsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.ListLogicalViewsCallback} callback Node-style callback called with the error, if any, and ListLogicalViewsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.listLogicalViews = function listLogicalViews(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listLogicalViews, $root.google.bigtable.admin.v2.ListLogicalViewsRequest, $root.google.bigtable.admin.v2.ListLogicalViewsResponse, request, callback); + }, "name", { value: "ListLogicalViews" }); + + /** + * Calls ListLogicalViews. + * @function listLogicalViews + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListLogicalViewsRequest} request ListLogicalViewsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateLogicalView}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef UpdateLogicalViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateLogicalView. + * @function updateLogicalView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateLogicalViewRequest} request UpdateLogicalViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateLogicalViewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.updateLogicalView = function updateLogicalView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateLogicalView, $root.google.bigtable.admin.v2.UpdateLogicalViewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateLogicalView" }); + + /** + * Calls UpdateLogicalView. + * @function updateLogicalView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateLogicalViewRequest} request UpdateLogicalViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteLogicalView}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef DeleteLogicalViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteLogicalView. + * @function deleteLogicalView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteLogicalViewRequest} request DeleteLogicalViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteLogicalViewCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.deleteLogicalView = function deleteLogicalView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteLogicalView, $root.google.bigtable.admin.v2.DeleteLogicalViewRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLogicalView" }); + + /** + * Calls DeleteLogicalView. + * @function deleteLogicalView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteLogicalViewRequest} request DeleteLogicalViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|createMaterializedView}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef CreateMaterializedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateMaterializedView. + * @function createMaterializedView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateMaterializedViewRequest} request CreateMaterializedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.CreateMaterializedViewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.createMaterializedView = function createMaterializedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createMaterializedView, $root.google.bigtable.admin.v2.CreateMaterializedViewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMaterializedView" }); + + /** + * Calls CreateMaterializedView. + * @function createMaterializedView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateMaterializedViewRequest} request CreateMaterializedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|getMaterializedView}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef GetMaterializedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.MaterializedView} [response] MaterializedView + */ + + /** + * Calls GetMaterializedView. + * @function getMaterializedView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetMaterializedViewRequest} request GetMaterializedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.GetMaterializedViewCallback} callback Node-style callback called with the error, if any, and MaterializedView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.getMaterializedView = function getMaterializedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getMaterializedView, $root.google.bigtable.admin.v2.GetMaterializedViewRequest, $root.google.bigtable.admin.v2.MaterializedView, request, callback); + }, "name", { value: "GetMaterializedView" }); + + /** + * Calls GetMaterializedView. + * @function getMaterializedView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetMaterializedViewRequest} request GetMaterializedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|listMaterializedViews}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef ListMaterializedViewsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListMaterializedViewsResponse} [response] ListMaterializedViewsResponse + */ + + /** + * Calls ListMaterializedViews. + * @function listMaterializedViews + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListMaterializedViewsRequest} request ListMaterializedViewsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.ListMaterializedViewsCallback} callback Node-style callback called with the error, if any, and ListMaterializedViewsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.listMaterializedViews = function listMaterializedViews(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listMaterializedViews, $root.google.bigtable.admin.v2.ListMaterializedViewsRequest, $root.google.bigtable.admin.v2.ListMaterializedViewsResponse, request, callback); + }, "name", { value: "ListMaterializedViews" }); + + /** + * Calls ListMaterializedViews. + * @function listMaterializedViews + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IListMaterializedViewsRequest} request ListMaterializedViewsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|updateMaterializedView}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef UpdateMaterializedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateMaterializedView. + * @function updateMaterializedView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewRequest} request UpdateMaterializedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateMaterializedViewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.updateMaterializedView = function updateMaterializedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateMaterializedView, $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateMaterializedView" }); + + /** + * Calls UpdateMaterializedView. + * @function updateMaterializedView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewRequest} request UpdateMaterializedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin|deleteMaterializedView}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef DeleteMaterializedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMaterializedView. + * @function deleteMaterializedView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteMaterializedViewRequest} request DeleteMaterializedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteMaterializedViewCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.deleteMaterializedView = function deleteMaterializedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteMaterializedView, $root.google.bigtable.admin.v2.DeleteMaterializedViewRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMaterializedView" }); + + /** + * Calls DeleteMaterializedView. + * @function deleteMaterializedView + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteMaterializedViewRequest} request DeleteMaterializedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BigtableInstanceAdmin; + })(); + + v2.CreateInstanceRequest = (function() { + + /** + * Properties of a CreateInstanceRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateInstanceRequest + * @property {string|null} [parent] CreateInstanceRequest parent + * @property {string|null} [instanceId] CreateInstanceRequest instanceId + * @property {google.bigtable.admin.v2.IInstance|null} [instance] CreateInstanceRequest instance + * @property {Object.|null} [clusters] CreateInstanceRequest clusters + */ + + /** + * Constructs a new CreateInstanceRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateInstanceRequest. + * @implements ICreateInstanceRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateInstanceRequest=} [properties] Properties to set + */ + function CreateInstanceRequest(properties) { + this.clusters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateInstanceRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @instance + */ + CreateInstanceRequest.prototype.parent = ""; + + /** + * CreateInstanceRequest instanceId. + * @member {string} instanceId + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @instance + */ + CreateInstanceRequest.prototype.instanceId = ""; + + /** + * CreateInstanceRequest instance. + * @member {google.bigtable.admin.v2.IInstance|null|undefined} instance + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @instance + */ + CreateInstanceRequest.prototype.instance = null; + + /** + * CreateInstanceRequest clusters. + * @member {Object.} clusters + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @instance + */ + CreateInstanceRequest.prototype.clusters = $util.emptyObject; + + /** + * Creates a new CreateInstanceRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @static + * @param {google.bigtable.admin.v2.ICreateInstanceRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateInstanceRequest} CreateInstanceRequest instance + */ + CreateInstanceRequest.create = function create(properties) { + return new CreateInstanceRequest(properties); + }; + + /** + * Encodes the specified CreateInstanceRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @static + * @param {google.bigtable.admin.v2.ICreateInstanceRequest} message CreateInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInstanceRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.bigtable.admin.v2.Instance.encode(message.instance, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.clusters != null && Object.hasOwnProperty.call(message, "clusters")) + for (var keys = Object.keys(message.clusters), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.admin.v2.Cluster.encode(message.clusters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CreateInstanceRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @static + * @param {google.bigtable.admin.v2.ICreateInstanceRequest} message CreateInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @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.CreateInstanceRequest} CreateInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInstanceRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateInstanceRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.instanceId = reader.string(); + break; + } + case 3: { + message.instance = $root.google.bigtable.admin.v2.Instance.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + if (message.clusters === $util.emptyObject) + message.clusters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.clusters, key); + message.clusters[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateInstanceRequest} CreateInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateInstanceRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateInstanceRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) { + var error = $root.google.bigtable.admin.v2.Instance.verify(message.instance, long + 1); + if (error) + return "instance." + error; + } + if (message.clusters != null && Object.hasOwnProperty.call(message, "clusters")) { + if (!$util.isObject(message.clusters)) + return "clusters: object expected"; + var key = Object.keys(message.clusters); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.clusters[key[i]], long + 1); + if (error) + return "clusters." + error; + } + } + return null; + }; + + /** + * Creates a CreateInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateInstanceRequest} CreateInstanceRequest + */ + CreateInstanceRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateInstanceRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateInstanceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); + if (object.instance != null) { + if (!$util.isObject(object.instance)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest.instance: object expected"); + message.instance = $root.google.bigtable.admin.v2.Instance.fromObject(object.instance, long + 1); + } + if (object.clusters) { + if (!$util.isObject(object.clusters)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest.clusters: object expected"); + message.clusters = {}; + for (var keys = Object.keys(object.clusters), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.clusters, keys[i]); + if (!$util.isObject(object.clusters[keys[i]])) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest.clusters: object expected"); + message.clusters[keys[i]] = $root.google.bigtable.admin.v2.Cluster.fromObject(object.clusters[keys[i]], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a CreateInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @static + * @param {google.bigtable.admin.v2.CreateInstanceRequest} message CreateInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateInstanceRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) + object.clusters = {}; + if (options.defaults) { + object.parent = ""; + object.instanceId = ""; + object.instance = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + object.instanceId = message.instanceId; + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options, q + 1); + var keys2; + if (message.clusters && (keys2 = Object.keys(message.clusters)).length) { + object.clusters = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.clusters, keys2[j]); + object.clusters[keys2[j]] = $root.google.bigtable.admin.v2.Cluster.toObject(message.clusters[keys2[j]], options, q + 1); + } + } + return object; + }; + + /** + * Converts this CreateInstanceRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateInstanceRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateInstanceRequest"; + }; + + return CreateInstanceRequest; + })(); + + v2.GetInstanceRequest = (function() { + + /** + * Properties of a GetInstanceRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetInstanceRequest + * @property {string|null} [name] GetInstanceRequest name + */ + + /** + * Constructs a new GetInstanceRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetInstanceRequest. + * @implements IGetInstanceRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetInstanceRequest=} [properties] Properties to set + */ + function GetInstanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetInstanceRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @instance + */ + GetInstanceRequest.prototype.name = ""; + + /** + * Creates a new GetInstanceRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IGetInstanceRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetInstanceRequest} GetInstanceRequest instance + */ + GetInstanceRequest.create = function create(properties) { + return new GetInstanceRequest(properties); + }; + + /** + * Encodes the specified GetInstanceRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IGetInstanceRequest} message GetInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInstanceRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetInstanceRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IGetInstanceRequest} message GetInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @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.GetInstanceRequest} GetInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInstanceRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetInstanceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetInstanceRequest} GetInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetInstanceRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetInstanceRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetInstanceRequest} GetInstanceRequest + */ + GetInstanceRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetInstanceRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetInstanceRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetInstanceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @static + * @param {google.bigtable.admin.v2.GetInstanceRequest} message GetInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetInstanceRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetInstanceRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + GetInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetInstanceRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetInstanceRequest"; + }; + + return GetInstanceRequest; + })(); + + v2.ListInstancesRequest = (function() { + + /** + * Properties of a ListInstancesRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListInstancesRequest + * @property {string|null} [parent] ListInstancesRequest parent + * @property {string|null} [pageToken] ListInstancesRequest pageToken + */ + + /** + * Constructs a new ListInstancesRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListInstancesRequest. + * @implements IListInstancesRequest + * @constructor + * @param {google.bigtable.admin.v2.IListInstancesRequest=} [properties] Properties to set + */ + function ListInstancesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInstancesRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @instance + */ + ListInstancesRequest.prototype.parent = ""; + + /** + * ListInstancesRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @instance + */ + ListInstancesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListInstancesRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @static + * @param {google.bigtable.admin.v2.IListInstancesRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListInstancesRequest} ListInstancesRequest instance + */ + ListInstancesRequest.create = function create(properties) { + return new ListInstancesRequest(properties); + }; + + /** + * Encodes the specified ListInstancesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListInstancesRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @static + * @param {google.bigtable.admin.v2.IListInstancesRequest} message ListInstancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstancesRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListInstancesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListInstancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @static + * @param {google.bigtable.admin.v2.IListInstancesRequest} message ListInstancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListInstancesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @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.ListInstancesRequest} ListInstancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstancesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListInstancesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListInstancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListInstancesRequest} ListInstancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInstancesRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInstancesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListInstancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListInstancesRequest} ListInstancesRequest + */ + ListInstancesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListInstancesRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListInstancesRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListInstancesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListInstancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @static + * @param {google.bigtable.admin.v2.ListInstancesRequest} message ListInstancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInstancesRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListInstancesRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @instance + * @returns {Object.} JSON object + */ + ListInstancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListInstancesRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListInstancesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInstancesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListInstancesRequest"; + }; + + return ListInstancesRequest; + })(); + + v2.ListInstancesResponse = (function() { + + /** + * Properties of a ListInstancesResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListInstancesResponse + * @property {Array.|null} [instances] ListInstancesResponse instances + * @property {Array.|null} [failedLocations] ListInstancesResponse failedLocations + * @property {string|null} [nextPageToken] ListInstancesResponse nextPageToken + */ + + /** + * Constructs a new ListInstancesResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListInstancesResponse. + * @implements IListInstancesResponse + * @constructor + * @param {google.bigtable.admin.v2.IListInstancesResponse=} [properties] Properties to set + */ + function ListInstancesResponse(properties) { + this.instances = []; + this.failedLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInstancesResponse instances. + * @member {Array.} instances + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @instance + */ + ListInstancesResponse.prototype.instances = $util.emptyArray; + + /** + * ListInstancesResponse failedLocations. + * @member {Array.} failedLocations + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @instance + */ + ListInstancesResponse.prototype.failedLocations = $util.emptyArray; + + /** + * ListInstancesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @instance + */ + ListInstancesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListInstancesResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @static + * @param {google.bigtable.admin.v2.IListInstancesResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListInstancesResponse} ListInstancesResponse instance + */ + ListInstancesResponse.create = function create(properties) { + return new ListInstancesResponse(properties); + }; + + /** + * Encodes the specified ListInstancesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListInstancesResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @static + * @param {google.bigtable.admin.v2.IListInstancesResponse} message ListInstancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstancesResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.bigtable.admin.v2.Instance.encode(message.instances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.failedLocations != null && message.failedLocations.length) + for (var i = 0; i < message.failedLocations.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.failedLocations[i]); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListInstancesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListInstancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @static + * @param {google.bigtable.admin.v2.IListInstancesResponse} message ListInstancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListInstancesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @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.ListInstancesResponse} ListInstancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstancesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListInstancesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.bigtable.admin.v2.Instance.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.failedLocations && message.failedLocations.length)) + message.failedLocations = []; + message.failedLocations.push(reader.string()); + break; + } + case 3: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListInstancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListInstancesResponse} ListInstancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInstancesResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInstancesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.instances != null && Object.hasOwnProperty.call(message, "instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.bigtable.admin.v2.Instance.verify(message.instances[i], long + 1); + if (error) + return "instances." + error; + } + } + if (message.failedLocations != null && Object.hasOwnProperty.call(message, "failedLocations")) { + if (!Array.isArray(message.failedLocations)) + return "failedLocations: array expected"; + for (var i = 0; i < message.failedLocations.length; ++i) + if (!$util.isString(message.failedLocations[i])) + return "failedLocations: string[] expected"; + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListInstancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListInstancesResponse} ListInstancesResponse + */ + ListInstancesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListInstancesResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListInstancesResponse(); + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (!$util.isObject(object.instances[i])) + throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse.instances: object expected"); + message.instances[i] = $root.google.bigtable.admin.v2.Instance.fromObject(object.instances[i], long + 1); + } + } + if (object.failedLocations) { + if (!Array.isArray(object.failedLocations)) + throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse.failedLocations: array expected"); + message.failedLocations = []; + for (var i = 0; i < object.failedLocations.length; ++i) + message.failedLocations[i] = String(object.failedLocations[i]); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListInstancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @static + * @param {google.bigtable.admin.v2.ListInstancesResponse} message ListInstancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInstancesResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.instances = []; + object.failedLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.bigtable.admin.v2.Instance.toObject(message.instances[j], options, q + 1); + } + if (message.failedLocations && message.failedLocations.length) { + object.failedLocations = []; + for (var j = 0; j < message.failedLocations.length; ++j) + object.failedLocations[j] = message.failedLocations[j]; + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListInstancesResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @instance + * @returns {Object.} JSON object + */ + ListInstancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListInstancesResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListInstancesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInstancesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListInstancesResponse"; + }; + + return ListInstancesResponse; + })(); + + v2.PartialUpdateInstanceRequest = (function() { + + /** + * Properties of a PartialUpdateInstanceRequest. + * @memberof google.bigtable.admin.v2 + * @interface IPartialUpdateInstanceRequest + * @property {google.bigtable.admin.v2.IInstance|null} [instance] PartialUpdateInstanceRequest instance + * @property {google.protobuf.IFieldMask|null} [updateMask] PartialUpdateInstanceRequest updateMask + */ + + /** + * Constructs a new PartialUpdateInstanceRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a PartialUpdateInstanceRequest. + * @implements IPartialUpdateInstanceRequest + * @constructor + * @param {google.bigtable.admin.v2.IPartialUpdateInstanceRequest=} [properties] Properties to set + */ + function PartialUpdateInstanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartialUpdateInstanceRequest instance. + * @member {google.bigtable.admin.v2.IInstance|null|undefined} instance + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @instance + */ + PartialUpdateInstanceRequest.prototype.instance = null; + + /** + * PartialUpdateInstanceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @instance + */ + PartialUpdateInstanceRequest.prototype.updateMask = null; + + /** + * Creates a new PartialUpdateInstanceRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateInstanceRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.PartialUpdateInstanceRequest} PartialUpdateInstanceRequest instance + */ + PartialUpdateInstanceRequest.create = function create(properties) { + return new PartialUpdateInstanceRequest(properties); + }; + + /** + * Encodes the specified PartialUpdateInstanceRequest message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateInstanceRequest} message PartialUpdateInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialUpdateInstanceRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.bigtable.admin.v2.Instance.encode(message.instance, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified PartialUpdateInstanceRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateInstanceRequest} message PartialUpdateInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialUpdateInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PartialUpdateInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @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.PartialUpdateInstanceRequest} PartialUpdateInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialUpdateInstanceRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.instance = $root.google.bigtable.admin.v2.Instance.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PartialUpdateInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.PartialUpdateInstanceRequest} PartialUpdateInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialUpdateInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartialUpdateInstanceRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartialUpdateInstanceRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) { + var error = $root.google.bigtable.admin.v2.Instance.verify(message.instance, long + 1); + if (error) + return "instance." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a PartialUpdateInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.PartialUpdateInstanceRequest} PartialUpdateInstanceRequest + */ + PartialUpdateInstanceRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest(); + if (object.instance != null) { + if (!$util.isObject(object.instance)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest.instance: object expected"); + message.instance = $root.google.bigtable.admin.v2.Instance.fromObject(object.instance, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a PartialUpdateInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @static + * @param {google.bigtable.admin.v2.PartialUpdateInstanceRequest} message PartialUpdateInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartialUpdateInstanceRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.instance = null; + object.updateMask = null; + } + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + return object; + }; + + /** + * Converts this PartialUpdateInstanceRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + PartialUpdateInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartialUpdateInstanceRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.PartialUpdateInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartialUpdateInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.PartialUpdateInstanceRequest"; + }; + + return PartialUpdateInstanceRequest; + })(); + + v2.DeleteInstanceRequest = (function() { + + /** + * Properties of a DeleteInstanceRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteInstanceRequest + * @property {string|null} [name] DeleteInstanceRequest name + */ + + /** + * Constructs a new DeleteInstanceRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteInstanceRequest. + * @implements IDeleteInstanceRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteInstanceRequest=} [properties] Properties to set + */ + function DeleteInstanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteInstanceRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @instance + */ + DeleteInstanceRequest.prototype.name = ""; + + /** + * Creates a new DeleteInstanceRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteInstanceRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteInstanceRequest} DeleteInstanceRequest instance + */ + DeleteInstanceRequest.create = function create(properties) { + return new DeleteInstanceRequest(properties); + }; + + /** + * Encodes the specified DeleteInstanceRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteInstanceRequest} message DeleteInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteInstanceRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteInstanceRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteInstanceRequest} message DeleteInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @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.DeleteInstanceRequest} DeleteInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteInstanceRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteInstanceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteInstanceRequest} DeleteInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteInstanceRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteInstanceRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteInstanceRequest} DeleteInstanceRequest + */ + DeleteInstanceRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteInstanceRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteInstanceRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteInstanceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @static + * @param {google.bigtable.admin.v2.DeleteInstanceRequest} message DeleteInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteInstanceRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteInstanceRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteInstanceRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteInstanceRequest"; + }; + + return DeleteInstanceRequest; + })(); + + v2.CreateClusterRequest = (function() { + + /** + * Properties of a CreateClusterRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateClusterRequest + * @property {string|null} [parent] CreateClusterRequest parent + * @property {string|null} [clusterId] CreateClusterRequest clusterId + * @property {google.bigtable.admin.v2.ICluster|null} [cluster] CreateClusterRequest cluster + */ + + /** + * Constructs a new CreateClusterRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateClusterRequest. + * @implements ICreateClusterRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateClusterRequest=} [properties] Properties to set + */ + function CreateClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateClusterRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.parent = ""; + + /** + * CreateClusterRequest clusterId. + * @member {string} clusterId + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.clusterId = ""; + + /** + * CreateClusterRequest cluster. + * @member {google.bigtable.admin.v2.ICluster|null|undefined} cluster + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.cluster = null; + + /** + * Creates a new CreateClusterRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @static + * @param {google.bigtable.admin.v2.ICreateClusterRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateClusterRequest} CreateClusterRequest instance + */ + CreateClusterRequest.create = function create(properties) { + return new CreateClusterRequest(properties); + }; + + /** + * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @static + * @param {google.bigtable.admin.v2.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClusterRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterId); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + $root.google.bigtable.admin.v2.Cluster.encode(message.cluster, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @static + * @param {google.bigtable.admin.v2.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @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.CreateClusterRequest} CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateClusterRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.clusterId = reader.string(); + break; + } + case 3: { + message.cluster = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateClusterRequest} CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateClusterRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateClusterRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster, long + 1); + if (error) + return "cluster." + error; + } + return null; + }; + + /** + * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateClusterRequest} CreateClusterRequest + */ + CreateClusterRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateClusterRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateClusterRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.cluster != null) { + if (!$util.isObject(object.cluster)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterRequest.cluster: object expected"); + message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @static + * @param {google.bigtable.admin.v2.CreateClusterRequest} message CreateClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateClusterRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.clusterId = ""; + object.cluster = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + object.clusterId = message.clusterId; + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options, q + 1); + return object; + }; + + /** + * Converts this CreateClusterRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @instance + * @returns {Object.} JSON object + */ + CreateClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateClusterRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateClusterRequest"; + }; + + return CreateClusterRequest; + })(); + + v2.GetClusterRequest = (function() { + + /** + * Properties of a GetClusterRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetClusterRequest + * @property {string|null} [name] GetClusterRequest name + */ + + /** + * Constructs a new GetClusterRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetClusterRequest. + * @implements IGetClusterRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetClusterRequest=} [properties] Properties to set + */ + function GetClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetClusterRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.name = ""; + + /** + * Creates a new GetClusterRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @static + * @param {google.bigtable.admin.v2.IGetClusterRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetClusterRequest} GetClusterRequest instance + */ + GetClusterRequest.create = function create(properties) { + return new GetClusterRequest(properties); + }; + + /** + * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @static + * @param {google.bigtable.admin.v2.IGetClusterRequest} message GetClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClusterRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @static + * @param {google.bigtable.admin.v2.IGetClusterRequest} message GetClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @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.GetClusterRequest} GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClusterRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetClusterRequest} GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetClusterRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetClusterRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetClusterRequest} GetClusterRequest + */ + GetClusterRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetClusterRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetClusterRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetClusterRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @static + * @param {google.bigtable.admin.v2.GetClusterRequest} message GetClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetClusterRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetClusterRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @instance + * @returns {Object.} JSON object + */ + GetClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetClusterRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetClusterRequest"; + }; + + return GetClusterRequest; + })(); + + v2.ListClustersRequest = (function() { + + /** + * Properties of a ListClustersRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListClustersRequest + * @property {string|null} [parent] ListClustersRequest parent + * @property {string|null} [pageToken] ListClustersRequest pageToken + */ + + /** + * Constructs a new ListClustersRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListClustersRequest. + * @implements IListClustersRequest + * @constructor + * @param {google.bigtable.admin.v2.IListClustersRequest=} [properties] Properties to set + */ + function ListClustersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListClustersRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @instance + */ + ListClustersRequest.prototype.parent = ""; + + /** + * ListClustersRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @instance + */ + ListClustersRequest.prototype.pageToken = ""; + + /** + * Creates a new ListClustersRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @static + * @param {google.bigtable.admin.v2.IListClustersRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListClustersRequest} ListClustersRequest instance + */ + ListClustersRequest.create = function create(properties) { + return new ListClustersRequest(properties); + }; + + /** + * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListClustersRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @static + * @param {google.bigtable.admin.v2.IListClustersRequest} message ListClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListClustersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @static + * @param {google.bigtable.admin.v2.IListClustersRequest} message ListClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @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.ListClustersRequest} ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListClustersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListClustersRequest} ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListClustersRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListClustersRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListClustersRequest} ListClustersRequest + */ + ListClustersRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListClustersRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListClustersRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListClustersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @static + * @param {google.bigtable.admin.v2.ListClustersRequest} message ListClustersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListClustersRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListClustersRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @instance + * @returns {Object.} JSON object + */ + ListClustersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListClustersRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListClustersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListClustersRequest"; + }; + + return ListClustersRequest; + })(); + + v2.ListClustersResponse = (function() { + + /** + * Properties of a ListClustersResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListClustersResponse + * @property {Array.|null} [clusters] ListClustersResponse clusters + * @property {Array.|null} [failedLocations] ListClustersResponse failedLocations + * @property {string|null} [nextPageToken] ListClustersResponse nextPageToken + */ + + /** + * Constructs a new ListClustersResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListClustersResponse. + * @implements IListClustersResponse + * @constructor + * @param {google.bigtable.admin.v2.IListClustersResponse=} [properties] Properties to set + */ + function ListClustersResponse(properties) { + this.clusters = []; + this.failedLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListClustersResponse clusters. + * @member {Array.} clusters + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @instance + */ + ListClustersResponse.prototype.clusters = $util.emptyArray; + + /** + * ListClustersResponse failedLocations. + * @member {Array.} failedLocations + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @instance + */ + ListClustersResponse.prototype.failedLocations = $util.emptyArray; + + /** + * ListClustersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @instance + */ + ListClustersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListClustersResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @static + * @param {google.bigtable.admin.v2.IListClustersResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListClustersResponse} ListClustersResponse instance + */ + ListClustersResponse.create = function create(properties) { + return new ListClustersResponse(properties); + }; + + /** + * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListClustersResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @static + * @param {google.bigtable.admin.v2.IListClustersResponse} message ListClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.clusters != null && message.clusters.length) + for (var i = 0; i < message.clusters.length; ++i) + $root.google.bigtable.admin.v2.Cluster.encode(message.clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.failedLocations != null && message.failedLocations.length) + for (var i = 0; i < message.failedLocations.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.failedLocations[i]); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListClustersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @static + * @param {google.bigtable.admin.v2.IListClustersResponse} message ListClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @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.ListClustersResponse} ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListClustersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.clusters && message.clusters.length)) + message.clusters = []; + message.clusters.push($root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.failedLocations && message.failedLocations.length)) + message.failedLocations = []; + message.failedLocations.push(reader.string()); + break; + } + case 3: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListClustersResponse} ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListClustersResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListClustersResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.clusters != null && Object.hasOwnProperty.call(message, "clusters")) { + if (!Array.isArray(message.clusters)) + return "clusters: array expected"; + for (var i = 0; i < message.clusters.length; ++i) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.clusters[i], long + 1); + if (error) + return "clusters." + error; + } + } + if (message.failedLocations != null && Object.hasOwnProperty.call(message, "failedLocations")) { + if (!Array.isArray(message.failedLocations)) + return "failedLocations: array expected"; + for (var i = 0; i < message.failedLocations.length; ++i) + if (!$util.isString(message.failedLocations[i])) + return "failedLocations: string[] expected"; + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListClustersResponse} ListClustersResponse + */ + ListClustersResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListClustersResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListClustersResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListClustersResponse(); + if (object.clusters) { + if (!Array.isArray(object.clusters)) + throw TypeError(".google.bigtable.admin.v2.ListClustersResponse.clusters: array expected"); + message.clusters = []; + for (var i = 0; i < object.clusters.length; ++i) { + if (!$util.isObject(object.clusters[i])) + throw TypeError(".google.bigtable.admin.v2.ListClustersResponse.clusters: object expected"); + message.clusters[i] = $root.google.bigtable.admin.v2.Cluster.fromObject(object.clusters[i], long + 1); + } + } + if (object.failedLocations) { + if (!Array.isArray(object.failedLocations)) + throw TypeError(".google.bigtable.admin.v2.ListClustersResponse.failedLocations: array expected"); + message.failedLocations = []; + for (var i = 0; i < object.failedLocations.length; ++i) + message.failedLocations[i] = String(object.failedLocations[i]); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @static + * @param {google.bigtable.admin.v2.ListClustersResponse} message ListClustersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListClustersResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.clusters = []; + object.failedLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.clusters && message.clusters.length) { + object.clusters = []; + for (var j = 0; j < message.clusters.length; ++j) + object.clusters[j] = $root.google.bigtable.admin.v2.Cluster.toObject(message.clusters[j], options, q + 1); + } + if (message.failedLocations && message.failedLocations.length) { + object.failedLocations = []; + for (var j = 0; j < message.failedLocations.length; ++j) + object.failedLocations[j] = message.failedLocations[j]; + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListClustersResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @instance + * @returns {Object.} JSON object + */ + ListClustersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListClustersResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListClustersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListClustersResponse"; + }; + + return ListClustersResponse; + })(); + + v2.DeleteClusterRequest = (function() { + + /** + * Properties of a DeleteClusterRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteClusterRequest + * @property {string|null} [name] DeleteClusterRequest name + */ + + /** + * Constructs a new DeleteClusterRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteClusterRequest. + * @implements IDeleteClusterRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteClusterRequest=} [properties] Properties to set + */ + function DeleteClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteClusterRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.name = ""; + + /** + * Creates a new DeleteClusterRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteClusterRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteClusterRequest} DeleteClusterRequest instance + */ + DeleteClusterRequest.create = function create(properties) { + return new DeleteClusterRequest(properties); + }; + + /** + * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteClusterRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @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.DeleteClusterRequest} DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteClusterRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteClusterRequest} DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteClusterRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteClusterRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteClusterRequest} DeleteClusterRequest + */ + DeleteClusterRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteClusterRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteClusterRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteClusterRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @static + * @param {google.bigtable.admin.v2.DeleteClusterRequest} message DeleteClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteClusterRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteClusterRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteClusterRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteClusterRequest"; + }; + + return DeleteClusterRequest; + })(); + + v2.CreateInstanceMetadata = (function() { + + /** + * Properties of a CreateInstanceMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICreateInstanceMetadata + * @property {google.bigtable.admin.v2.ICreateInstanceRequest|null} [originalRequest] CreateInstanceMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] CreateInstanceMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] CreateInstanceMetadata finishTime + */ + + /** + * Constructs a new CreateInstanceMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateInstanceMetadata. + * @implements ICreateInstanceMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICreateInstanceMetadata=} [properties] Properties to set + */ + function CreateInstanceMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateInstanceMetadata originalRequest. + * @member {google.bigtable.admin.v2.ICreateInstanceRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @instance + */ + CreateInstanceMetadata.prototype.originalRequest = null; + + /** + * CreateInstanceMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @instance + */ + CreateInstanceMetadata.prototype.requestTime = null; + + /** + * CreateInstanceMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @instance + */ + CreateInstanceMetadata.prototype.finishTime = null; + + /** + * Creates a new CreateInstanceMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateInstanceMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateInstanceMetadata} CreateInstanceMetadata instance + */ + CreateInstanceMetadata.create = function create(properties) { + return new CreateInstanceMetadata(properties); + }; + + /** + * Encodes the specified CreateInstanceMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateInstanceMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateInstanceMetadata} message CreateInstanceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInstanceMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.CreateInstanceRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateInstanceMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateInstanceMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateInstanceMetadata} message CreateInstanceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInstanceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateInstanceMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @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.CreateInstanceMetadata} CreateInstanceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInstanceMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateInstanceMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateInstanceMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateInstanceMetadata} CreateInstanceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInstanceMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateInstanceMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateInstanceMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateInstanceRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + return null; + }; + + /** + * Creates a CreateInstanceMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateInstanceMetadata} CreateInstanceMetadata + */ + CreateInstanceMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateInstanceMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateInstanceMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.fromObject(object.originalRequest, long + 1); + } + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateInstanceMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @static + * @param {google.bigtable.admin.v2.CreateInstanceMetadata} message CreateInstanceMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateInstanceMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + return object; + }; + + /** + * Converts this CreateInstanceMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateInstanceMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateInstanceMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateInstanceMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateInstanceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateInstanceMetadata"; + }; + + return CreateInstanceMetadata; + })(); + + v2.UpdateInstanceMetadata = (function() { + + /** + * Properties of an UpdateInstanceMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateInstanceMetadata + * @property {google.bigtable.admin.v2.IPartialUpdateInstanceRequest|null} [originalRequest] UpdateInstanceMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] UpdateInstanceMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] UpdateInstanceMetadata finishTime + */ + + /** + * Constructs a new UpdateInstanceMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateInstanceMetadata. + * @implements IUpdateInstanceMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateInstanceMetadata=} [properties] Properties to set + */ + function UpdateInstanceMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateInstanceMetadata originalRequest. + * @member {google.bigtable.admin.v2.IPartialUpdateInstanceRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @instance + */ + UpdateInstanceMetadata.prototype.originalRequest = null; + + /** + * UpdateInstanceMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @instance + */ + UpdateInstanceMetadata.prototype.requestTime = null; + + /** + * UpdateInstanceMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @instance + */ + UpdateInstanceMetadata.prototype.finishTime = null; + + /** + * Creates a new UpdateInstanceMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateInstanceMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateInstanceMetadata} UpdateInstanceMetadata instance + */ + UpdateInstanceMetadata.create = function create(properties) { + return new UpdateInstanceMetadata(properties); + }; + + /** + * Encodes the specified UpdateInstanceMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateInstanceMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateInstanceMetadata} message UpdateInstanceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInstanceMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateInstanceMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateInstanceMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateInstanceMetadata} message UpdateInstanceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInstanceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateInstanceMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @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.UpdateInstanceMetadata} UpdateInstanceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInstanceMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateInstanceMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateInstanceMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateInstanceMetadata} UpdateInstanceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInstanceMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateInstanceMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateInstanceMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + return null; + }; + + /** + * Creates an UpdateInstanceMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateInstanceMetadata} UpdateInstanceMetadata + */ + UpdateInstanceMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateInstanceMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateInstanceMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.fromObject(object.originalRequest, long + 1); + } + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateInstanceMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateInstanceMetadata} message UpdateInstanceMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateInstanceMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + return object; + }; + + /** + * Converts this UpdateInstanceMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateInstanceMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateInstanceMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateInstanceMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateInstanceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateInstanceMetadata"; + }; + + return UpdateInstanceMetadata; + })(); + + v2.CreateClusterMetadata = (function() { + + /** + * Properties of a CreateClusterMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICreateClusterMetadata + * @property {google.bigtable.admin.v2.ICreateClusterRequest|null} [originalRequest] CreateClusterMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] CreateClusterMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] CreateClusterMetadata finishTime + * @property {Object.|null} [tables] CreateClusterMetadata tables + */ + + /** + * Constructs a new CreateClusterMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateClusterMetadata. + * @implements ICreateClusterMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICreateClusterMetadata=} [properties] Properties to set + */ + function CreateClusterMetadata(properties) { + this.tables = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateClusterMetadata originalRequest. + * @member {google.bigtable.admin.v2.ICreateClusterRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @instance + */ + CreateClusterMetadata.prototype.originalRequest = null; + + /** + * CreateClusterMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @instance + */ + CreateClusterMetadata.prototype.requestTime = null; + + /** + * CreateClusterMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @instance + */ + CreateClusterMetadata.prototype.finishTime = null; + + /** + * CreateClusterMetadata tables. + * @member {Object.} tables + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @instance + */ + CreateClusterMetadata.prototype.tables = $util.emptyObject; + + /** + * Creates a new CreateClusterMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateClusterMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateClusterMetadata} CreateClusterMetadata instance + */ + CreateClusterMetadata.create = function create(properties) { + return new CreateClusterMetadata(properties); + }; + + /** + * Encodes the specified CreateClusterMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateClusterMetadata} message CreateClusterMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClusterMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.CreateClusterRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) + for (var keys = Object.keys(message.tables), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.encode(message.tables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CreateClusterMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateClusterMetadata} message CreateClusterMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClusterMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateClusterMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @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.CreateClusterMetadata} CreateClusterMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateClusterMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateClusterMetadata(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + if (message.tables === $util.emptyObject) + message.tables = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.tables, key); + message.tables[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateClusterMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateClusterMetadata} CreateClusterMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateClusterMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateClusterMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateClusterMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateClusterRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) { + if (!$util.isObject(message.tables)) + return "tables: object expected"; + var key = Object.keys(message.tables); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.verify(message.tables[key[i]], long + 1); + if (error) + return "tables." + error; + } + } + return null; + }; + + /** + * Creates a CreateClusterMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateClusterMetadata} CreateClusterMetadata + */ + CreateClusterMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateClusterMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateClusterMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.fromObject(object.originalRequest, long + 1); + } + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + if (object.tables) { + if (!$util.isObject(object.tables)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.tables: object expected"); + message.tables = {}; + for (var keys = Object.keys(object.tables), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.tables, keys[i]); + if (!$util.isObject(object.tables[keys[i]])) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.tables: object expected"); + message.tables[keys[i]] = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.fromObject(object.tables[keys[i]], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a CreateClusterMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.CreateClusterMetadata} message CreateClusterMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateClusterMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) + object.tables = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + var keys2; + if (message.tables && (keys2 = Object.keys(message.tables)).length) { + object.tables = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.tables, keys2[j]); + object.tables[keys2[j]] = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.toObject(message.tables[keys2[j]], options, q + 1); + } + } + return object; + }; + + /** + * Converts this CreateClusterMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateClusterMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateClusterMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateClusterMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateClusterMetadata"; + }; + + CreateClusterMetadata.TableProgress = (function() { + + /** + * Properties of a TableProgress. + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @interface ITableProgress + * @property {number|Long|null} [estimatedSizeBytes] TableProgress estimatedSizeBytes + * @property {number|Long|null} [estimatedCopiedBytes] TableProgress estimatedCopiedBytes + * @property {google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State|null} [state] TableProgress state + */ + + /** + * Constructs a new TableProgress. + * @memberof google.bigtable.admin.v2.CreateClusterMetadata + * @classdesc Represents a TableProgress. + * @implements ITableProgress + * @constructor + * @param {google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress=} [properties] Properties to set + */ + function TableProgress(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableProgress estimatedSizeBytes. + * @member {number|Long} estimatedSizeBytes + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @instance + */ + TableProgress.prototype.estimatedSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableProgress estimatedCopiedBytes. + * @member {number|Long} estimatedCopiedBytes + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @instance + */ + TableProgress.prototype.estimatedCopiedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableProgress state. + * @member {google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State} state + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @instance + */ + TableProgress.prototype.state = 0; + + /** + * Creates a new TableProgress instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @static + * @param {google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateClusterMetadata.TableProgress} TableProgress instance + */ + TableProgress.create = function create(properties) { + return new TableProgress(properties); + }; + + /** + * Encodes the specified TableProgress message. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @static + * @param {google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress} message TableProgress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableProgress.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.estimatedSizeBytes != null && Object.hasOwnProperty.call(message, "estimatedSizeBytes")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.estimatedSizeBytes); + if (message.estimatedCopiedBytes != null && Object.hasOwnProperty.call(message, "estimatedCopiedBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.estimatedCopiedBytes); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + return writer; + }; + + /** + * Encodes the specified TableProgress message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @static + * @param {google.bigtable.admin.v2.CreateClusterMetadata.ITableProgress} message TableProgress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableProgress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TableProgress message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @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.CreateClusterMetadata.TableProgress} TableProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableProgress.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.estimatedSizeBytes = reader.int64(); + break; + } + case 3: { + message.estimatedCopiedBytes = reader.int64(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TableProgress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateClusterMetadata.TableProgress} TableProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableProgress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableProgress message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableProgress.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.estimatedSizeBytes != null && Object.hasOwnProperty.call(message, "estimatedSizeBytes")) + if (!$util.isInteger(message.estimatedSizeBytes) && !(message.estimatedSizeBytes && $util.isInteger(message.estimatedSizeBytes.low) && $util.isInteger(message.estimatedSizeBytes.high))) + return "estimatedSizeBytes: integer|Long expected"; + if (message.estimatedCopiedBytes != null && Object.hasOwnProperty.call(message, "estimatedCopiedBytes")) + if (!$util.isInteger(message.estimatedCopiedBytes) && !(message.estimatedCopiedBytes && $util.isInteger(message.estimatedCopiedBytes.low) && $util.isInteger(message.estimatedCopiedBytes.high))) + return "estimatedCopiedBytes: integer|Long expected"; + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a TableProgress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateClusterMetadata.TableProgress} TableProgress + */ + TableProgress.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress(); + if (object.estimatedSizeBytes != null) + if ($util.Long) + message.estimatedSizeBytes = $util.Long.fromValue(object.estimatedSizeBytes, false); + else if (typeof object.estimatedSizeBytes === "string") + message.estimatedSizeBytes = parseInt(object.estimatedSizeBytes, 10); + else if (typeof object.estimatedSizeBytes === "number") + message.estimatedSizeBytes = object.estimatedSizeBytes; + else if (typeof object.estimatedSizeBytes === "object") + message.estimatedSizeBytes = new $util.LongBits(object.estimatedSizeBytes.low >>> 0, object.estimatedSizeBytes.high >>> 0).toNumber(); + if (object.estimatedCopiedBytes != null) + if ($util.Long) + message.estimatedCopiedBytes = $util.Long.fromValue(object.estimatedCopiedBytes, false); + else if (typeof object.estimatedCopiedBytes === "string") + message.estimatedCopiedBytes = parseInt(object.estimatedCopiedBytes, 10); + else if (typeof object.estimatedCopiedBytes === "number") + message.estimatedCopiedBytes = object.estimatedCopiedBytes; + else if (typeof object.estimatedCopiedBytes === "object") + message.estimatedCopiedBytes = new $util.LongBits(object.estimatedCopiedBytes.low >>> 0, object.estimatedCopiedBytes.high >>> 0).toNumber(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "COPYING": + case 2: + message.state = 2; + break; + case "COMPLETED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a TableProgress message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @static + * @param {google.bigtable.admin.v2.CreateClusterMetadata.TableProgress} message TableProgress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableProgress.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.estimatedSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.estimatedSizeBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.estimatedCopiedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.estimatedCopiedBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.estimatedSizeBytes != null && Object.hasOwnProperty.call(message, "estimatedSizeBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.estimatedSizeBytes = typeof message.estimatedSizeBytes === "number" ? BigInt(message.estimatedSizeBytes) : $util.Long.fromBits(message.estimatedSizeBytes.low >>> 0, message.estimatedSizeBytes.high >>> 0, false).toBigInt(); + else if (typeof message.estimatedSizeBytes === "number") + object.estimatedSizeBytes = options.longs === String ? String(message.estimatedSizeBytes) : message.estimatedSizeBytes; + else + object.estimatedSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.estimatedSizeBytes) : options.longs === Number ? new $util.LongBits(message.estimatedSizeBytes.low >>> 0, message.estimatedSizeBytes.high >>> 0).toNumber() : message.estimatedSizeBytes; + if (message.estimatedCopiedBytes != null && Object.hasOwnProperty.call(message, "estimatedCopiedBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.estimatedCopiedBytes = typeof message.estimatedCopiedBytes === "number" ? BigInt(message.estimatedCopiedBytes) : $util.Long.fromBits(message.estimatedCopiedBytes.low >>> 0, message.estimatedCopiedBytes.high >>> 0, false).toBigInt(); + else if (typeof message.estimatedCopiedBytes === "number") + object.estimatedCopiedBytes = options.longs === String ? String(message.estimatedCopiedBytes) : message.estimatedCopiedBytes; + else + object.estimatedCopiedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.estimatedCopiedBytes) : options.longs === Number ? new $util.LongBits(message.estimatedCopiedBytes.low >>> 0, message.estimatedCopiedBytes.high >>> 0).toNumber() : message.estimatedCopiedBytes; + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State[message.state] : message.state; + return object; + }; + + /** + * Converts this TableProgress to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @instance + * @returns {Object.} JSON object + */ + TableProgress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableProgress + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableProgress.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateClusterMetadata.TableProgress"; + }; + + /** + * State enum. + * @name google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} COPYING=2 COPYING value + * @property {number} COMPLETED=3 COMPLETED value + * @property {number} CANCELLED=4 CANCELLED value + */ + TableProgress.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "COPYING"] = 2; + values[valuesById[3] = "COMPLETED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + return TableProgress; + })(); + + return CreateClusterMetadata; + })(); + + v2.UpdateClusterMetadata = (function() { + + /** + * Properties of an UpdateClusterMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateClusterMetadata + * @property {google.bigtable.admin.v2.ICluster|null} [originalRequest] UpdateClusterMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] UpdateClusterMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] UpdateClusterMetadata finishTime + */ + + /** + * Constructs a new UpdateClusterMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateClusterMetadata. + * @implements IUpdateClusterMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateClusterMetadata=} [properties] Properties to set + */ + function UpdateClusterMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateClusterMetadata originalRequest. + * @member {google.bigtable.admin.v2.ICluster|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @instance + */ + UpdateClusterMetadata.prototype.originalRequest = null; + + /** + * UpdateClusterMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @instance + */ + UpdateClusterMetadata.prototype.requestTime = null; + + /** + * UpdateClusterMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @instance + */ + UpdateClusterMetadata.prototype.finishTime = null; + + /** + * Creates a new UpdateClusterMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateClusterMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateClusterMetadata} UpdateClusterMetadata instance + */ + UpdateClusterMetadata.create = function create(properties) { + return new UpdateClusterMetadata(properties); + }; + + /** + * Encodes the specified UpdateClusterMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateClusterMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateClusterMetadata} message UpdateClusterMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateClusterMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.Cluster.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateClusterMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateClusterMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateClusterMetadata} message UpdateClusterMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateClusterMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateClusterMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @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.UpdateClusterMetadata} UpdateClusterMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateClusterMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateClusterMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateClusterMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateClusterMetadata} UpdateClusterMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateClusterMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateClusterMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateClusterMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + return null; + }; + + /** + * Creates an UpdateClusterMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateClusterMetadata} UpdateClusterMetadata + */ + UpdateClusterMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateClusterMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateClusterMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.Cluster.fromObject(object.originalRequest, long + 1); + } + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateClusterMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateClusterMetadata} message UpdateClusterMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateClusterMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.Cluster.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + return object; + }; + + /** + * Converts this UpdateClusterMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateClusterMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateClusterMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateClusterMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateClusterMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateClusterMetadata"; + }; + + return UpdateClusterMetadata; + })(); + + v2.PartialUpdateClusterMetadata = (function() { + + /** + * Properties of a PartialUpdateClusterMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IPartialUpdateClusterMetadata + * @property {google.protobuf.ITimestamp|null} [requestTime] PartialUpdateClusterMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] PartialUpdateClusterMetadata finishTime + * @property {google.bigtable.admin.v2.IPartialUpdateClusterRequest|null} [originalRequest] PartialUpdateClusterMetadata originalRequest + */ + + /** + * Constructs a new PartialUpdateClusterMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a PartialUpdateClusterMetadata. + * @implements IPartialUpdateClusterMetadata + * @constructor + * @param {google.bigtable.admin.v2.IPartialUpdateClusterMetadata=} [properties] Properties to set + */ + function PartialUpdateClusterMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartialUpdateClusterMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @instance + */ + PartialUpdateClusterMetadata.prototype.requestTime = null; + + /** + * PartialUpdateClusterMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @instance + */ + PartialUpdateClusterMetadata.prototype.finishTime = null; + + /** + * PartialUpdateClusterMetadata originalRequest. + * @member {google.bigtable.admin.v2.IPartialUpdateClusterRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @instance + */ + PartialUpdateClusterMetadata.prototype.originalRequest = null; + + /** + * Creates a new PartialUpdateClusterMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateClusterMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.PartialUpdateClusterMetadata} PartialUpdateClusterMetadata instance + */ + PartialUpdateClusterMetadata.create = function create(properties) { + return new PartialUpdateClusterMetadata(properties); + }; + + /** + * Encodes the specified PartialUpdateClusterMetadata message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateClusterMetadata} message PartialUpdateClusterMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialUpdateClusterMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.encode(message.originalRequest, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified PartialUpdateClusterMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateClusterMetadata} message PartialUpdateClusterMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialUpdateClusterMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PartialUpdateClusterMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @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.PartialUpdateClusterMetadata} PartialUpdateClusterMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialUpdateClusterMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PartialUpdateClusterMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.PartialUpdateClusterMetadata} PartialUpdateClusterMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialUpdateClusterMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartialUpdateClusterMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartialUpdateClusterMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + return null; + }; + + /** + * Creates a PartialUpdateClusterMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.PartialUpdateClusterMetadata} PartialUpdateClusterMetadata + */ + PartialUpdateClusterMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata(); + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.fromObject(object.originalRequest, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a PartialUpdateClusterMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @static + * @param {google.bigtable.admin.v2.PartialUpdateClusterMetadata} message PartialUpdateClusterMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartialUpdateClusterMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.requestTime = null; + object.finishTime = null; + object.originalRequest = null; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.toObject(message.originalRequest, options, q + 1); + return object; + }; + + /** + * Converts this PartialUpdateClusterMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @instance + * @returns {Object.} JSON object + */ + PartialUpdateClusterMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartialUpdateClusterMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartialUpdateClusterMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.PartialUpdateClusterMetadata"; + }; + + return PartialUpdateClusterMetadata; + })(); + + v2.PartialUpdateClusterRequest = (function() { + + /** + * Properties of a PartialUpdateClusterRequest. + * @memberof google.bigtable.admin.v2 + * @interface IPartialUpdateClusterRequest + * @property {google.bigtable.admin.v2.ICluster|null} [cluster] PartialUpdateClusterRequest cluster + * @property {google.protobuf.IFieldMask|null} [updateMask] PartialUpdateClusterRequest updateMask + */ + + /** + * Constructs a new PartialUpdateClusterRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a PartialUpdateClusterRequest. + * @implements IPartialUpdateClusterRequest + * @constructor + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest=} [properties] Properties to set + */ + function PartialUpdateClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartialUpdateClusterRequest cluster. + * @member {google.bigtable.admin.v2.ICluster|null|undefined} cluster + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @instance + */ + PartialUpdateClusterRequest.prototype.cluster = null; + + /** + * PartialUpdateClusterRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @instance + */ + PartialUpdateClusterRequest.prototype.updateMask = null; + + /** + * Creates a new PartialUpdateClusterRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.PartialUpdateClusterRequest} PartialUpdateClusterRequest instance + */ + PartialUpdateClusterRequest.create = function create(properties) { + return new PartialUpdateClusterRequest(properties); + }; + + /** + * Encodes the specified PartialUpdateClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest} message PartialUpdateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialUpdateClusterRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + $root.google.bigtable.admin.v2.Cluster.encode(message.cluster, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified PartialUpdateClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @static + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest} message PartialUpdateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialUpdateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PartialUpdateClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @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.PartialUpdateClusterRequest} PartialUpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialUpdateClusterRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.PartialUpdateClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cluster = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PartialUpdateClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.PartialUpdateClusterRequest} PartialUpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialUpdateClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartialUpdateClusterRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartialUpdateClusterRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster, long + 1); + if (error) + return "cluster." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a PartialUpdateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.PartialUpdateClusterRequest} PartialUpdateClusterRequest + */ + PartialUpdateClusterRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterRequest(); + if (object.cluster != null) { + if (!$util.isObject(object.cluster)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.cluster: object expected"); + message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a PartialUpdateClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @static + * @param {google.bigtable.admin.v2.PartialUpdateClusterRequest} message PartialUpdateClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartialUpdateClusterRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.cluster = null; + object.updateMask = null; + } + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + return object; + }; + + /** + * Converts this PartialUpdateClusterRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @instance + * @returns {Object.} JSON object + */ + PartialUpdateClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartialUpdateClusterRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartialUpdateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.PartialUpdateClusterRequest"; + }; + + return PartialUpdateClusterRequest; + })(); + + v2.CreateAppProfileRequest = (function() { + + /** + * Properties of a CreateAppProfileRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateAppProfileRequest + * @property {string|null} [parent] CreateAppProfileRequest parent + * @property {string|null} [appProfileId] CreateAppProfileRequest appProfileId + * @property {google.bigtable.admin.v2.IAppProfile|null} [appProfile] CreateAppProfileRequest appProfile + * @property {boolean|null} [ignoreWarnings] CreateAppProfileRequest ignoreWarnings + */ + + /** + * Constructs a new CreateAppProfileRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateAppProfileRequest. + * @implements ICreateAppProfileRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest=} [properties] Properties to set + */ + function CreateAppProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAppProfileRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @instance + */ + CreateAppProfileRequest.prototype.parent = ""; + + /** + * CreateAppProfileRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @instance + */ + CreateAppProfileRequest.prototype.appProfileId = ""; + + /** + * CreateAppProfileRequest appProfile. + * @member {google.bigtable.admin.v2.IAppProfile|null|undefined} appProfile + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @instance + */ + CreateAppProfileRequest.prototype.appProfile = null; + + /** + * CreateAppProfileRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @instance + */ + CreateAppProfileRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new CreateAppProfileRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest instance + */ + CreateAppProfileRequest.create = function create(properties) { + return new CreateAppProfileRequest(properties); + }; + + /** + * Encodes the specified CreateAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateAppProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest} message CreateAppProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAppProfileRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ignoreWarnings); + return writer; + }; + + /** + * Encodes the specified CreateAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAppProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest} message CreateAppProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateAppProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @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.CreateAppProfileRequest} CreateAppProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAppProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateAppProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + case 3: { + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAppProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAppProfileRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAppProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) { + var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile, long + 1); + if (error) + return "appProfile." + error; + } + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; + return null; + }; + + /** + * Creates a CreateAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest + */ + CreateAppProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAppProfileRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateAppProfileRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateAppProfileRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.appProfile != null) { + if (!$util.isObject(object.appProfile)) + throw TypeError(".google.bigtable.admin.v2.CreateAppProfileRequest.appProfile: object expected"); + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile, long + 1); + } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); + return message; + }; + + /** + * Creates a plain object from a CreateAppProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.CreateAppProfileRequest} message CreateAppProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAppProfileRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.appProfileId = ""; + object.appProfile = null; + object.ignoreWarnings = false; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) + object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; + return object; + }; + + /** + * Converts this CreateAppProfileRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAppProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAppProfileRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAppProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateAppProfileRequest"; + }; + + return CreateAppProfileRequest; + })(); + + v2.GetAppProfileRequest = (function() { + + /** + * Properties of a GetAppProfileRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetAppProfileRequest + * @property {string|null} [name] GetAppProfileRequest name + */ + + /** + * Constructs a new GetAppProfileRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetAppProfileRequest. + * @implements IGetAppProfileRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetAppProfileRequest=} [properties] Properties to set + */ + function GetAppProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAppProfileRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @instance + */ + GetAppProfileRequest.prototype.name = ""; + + /** + * Creates a new GetAppProfileRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IGetAppProfileRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest instance + */ + GetAppProfileRequest.create = function create(properties) { + return new GetAppProfileRequest(properties); + }; + + /** + * Encodes the specified GetAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetAppProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IGetAppProfileRequest} message GetAppProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAppProfileRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetAppProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IGetAppProfileRequest} message GetAppProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetAppProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @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.GetAppProfileRequest} GetAppProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAppProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetAppProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetAppProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAppProfileRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAppProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest + */ + GetAppProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetAppProfileRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetAppProfileRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetAppProfileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAppProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.GetAppProfileRequest} message GetAppProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAppProfileRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetAppProfileRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @instance + * @returns {Object.} JSON object + */ + GetAppProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAppProfileRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAppProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetAppProfileRequest"; + }; + + return GetAppProfileRequest; + })(); + + v2.ListAppProfilesRequest = (function() { + + /** + * Properties of a ListAppProfilesRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListAppProfilesRequest + * @property {string|null} [parent] ListAppProfilesRequest parent + * @property {number|null} [pageSize] ListAppProfilesRequest pageSize + * @property {string|null} [pageToken] ListAppProfilesRequest pageToken + */ + + /** + * Constructs a new ListAppProfilesRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListAppProfilesRequest. + * @implements IListAppProfilesRequest + * @constructor + * @param {google.bigtable.admin.v2.IListAppProfilesRequest=} [properties] Properties to set + */ + function ListAppProfilesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAppProfilesRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @instance + */ + ListAppProfilesRequest.prototype.parent = ""; + + /** + * ListAppProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @instance + */ + ListAppProfilesRequest.prototype.pageSize = 0; + + /** + * ListAppProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @instance + */ + ListAppProfilesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAppProfilesRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @static + * @param {google.bigtable.admin.v2.IListAppProfilesRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest instance + */ + ListAppProfilesRequest.create = function create(properties) { + return new ListAppProfilesRequest(properties); + }; + + /** + * Encodes the specified ListAppProfilesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @static + * @param {google.bigtable.admin.v2.IListAppProfilesRequest} message ListAppProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAppProfilesRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListAppProfilesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @static + * @param {google.bigtable.admin.v2.IListAppProfilesRequest} message ListAppProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAppProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListAppProfilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @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.ListAppProfilesRequest} ListAppProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAppProfilesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListAppProfilesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListAppProfilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAppProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAppProfilesRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAppProfilesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAppProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest + */ + ListAppProfilesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListAppProfilesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListAppProfilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @static + * @param {google.bigtable.admin.v2.ListAppProfilesRequest} message ListAppProfilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAppProfilesRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListAppProfilesRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAppProfilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAppProfilesRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAppProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListAppProfilesRequest"; + }; + + return ListAppProfilesRequest; + })(); + + v2.ListAppProfilesResponse = (function() { + + /** + * Properties of a ListAppProfilesResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListAppProfilesResponse + * @property {Array.|null} [appProfiles] ListAppProfilesResponse appProfiles + * @property {string|null} [nextPageToken] ListAppProfilesResponse nextPageToken + * @property {Array.|null} [failedLocations] ListAppProfilesResponse failedLocations + */ + + /** + * Constructs a new ListAppProfilesResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListAppProfilesResponse. + * @implements IListAppProfilesResponse + * @constructor + * @param {google.bigtable.admin.v2.IListAppProfilesResponse=} [properties] Properties to set + */ + function ListAppProfilesResponse(properties) { + this.appProfiles = []; + this.failedLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAppProfilesResponse appProfiles. + * @member {Array.} appProfiles + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @instance + */ + ListAppProfilesResponse.prototype.appProfiles = $util.emptyArray; + + /** + * ListAppProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @instance + */ + ListAppProfilesResponse.prototype.nextPageToken = ""; + + /** + * ListAppProfilesResponse failedLocations. + * @member {Array.} failedLocations + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @instance + */ + ListAppProfilesResponse.prototype.failedLocations = $util.emptyArray; + + /** + * Creates a new ListAppProfilesResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @static + * @param {google.bigtable.admin.v2.IListAppProfilesResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse instance + */ + ListAppProfilesResponse.create = function create(properties) { + return new ListAppProfilesResponse(properties); + }; + + /** + * Encodes the specified ListAppProfilesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @static + * @param {google.bigtable.admin.v2.IListAppProfilesResponse} message ListAppProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAppProfilesResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.appProfiles != null && message.appProfiles.length) + for (var i = 0; i < message.appProfiles.length; ++i) + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.failedLocations != null && message.failedLocations.length) + for (var i = 0; i < message.failedLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.failedLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListAppProfilesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @static + * @param {google.bigtable.admin.v2.IListAppProfilesResponse} message ListAppProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAppProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListAppProfilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @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.ListAppProfilesResponse} ListAppProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAppProfilesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListAppProfilesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.appProfiles && message.appProfiles.length)) + message.appProfiles = []; + message.appProfiles.push($root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.failedLocations && message.failedLocations.length)) + message.failedLocations = []; + message.failedLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListAppProfilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAppProfilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAppProfilesResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAppProfilesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.appProfiles != null && Object.hasOwnProperty.call(message, "appProfiles")) { + if (!Array.isArray(message.appProfiles)) + return "appProfiles: array expected"; + for (var i = 0; i < message.appProfiles.length; ++i) { + var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfiles[i], long + 1); + if (error) + return "appProfiles." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.failedLocations != null && Object.hasOwnProperty.call(message, "failedLocations")) { + if (!Array.isArray(message.failedLocations)) + return "failedLocations: array expected"; + for (var i = 0; i < message.failedLocations.length; ++i) + if (!$util.isString(message.failedLocations[i])) + return "failedLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListAppProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse + */ + ListAppProfilesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListAppProfilesResponse(); + if (object.appProfiles) { + if (!Array.isArray(object.appProfiles)) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: array expected"); + message.appProfiles = []; + for (var i = 0; i < object.appProfiles.length; ++i) { + if (!$util.isObject(object.appProfiles[i])) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: object expected"); + message.appProfiles[i] = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfiles[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.failedLocations) { + if (!Array.isArray(object.failedLocations)) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.failedLocations: array expected"); + message.failedLocations = []; + for (var i = 0; i < object.failedLocations.length; ++i) + message.failedLocations[i] = String(object.failedLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListAppProfilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @static + * @param {google.bigtable.admin.v2.ListAppProfilesResponse} message ListAppProfilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAppProfilesResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.appProfiles = []; + object.failedLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.appProfiles && message.appProfiles.length) { + object.appProfiles = []; + for (var j = 0; j < message.appProfiles.length; ++j) + object.appProfiles[j] = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfiles[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.failedLocations && message.failedLocations.length) { + object.failedLocations = []; + for (var j = 0; j < message.failedLocations.length; ++j) + object.failedLocations[j] = message.failedLocations[j]; + } + return object; + }; + + /** + * Converts this ListAppProfilesResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAppProfilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAppProfilesResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAppProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListAppProfilesResponse"; + }; + + return ListAppProfilesResponse; + })(); + + v2.UpdateAppProfileRequest = (function() { + + /** + * Properties of an UpdateAppProfileRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateAppProfileRequest + * @property {google.bigtable.admin.v2.IAppProfile|null} [appProfile] UpdateAppProfileRequest appProfile + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAppProfileRequest updateMask + * @property {boolean|null} [ignoreWarnings] UpdateAppProfileRequest ignoreWarnings + */ + + /** + * Constructs a new UpdateAppProfileRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateAppProfileRequest. + * @implements IUpdateAppProfileRequest + * @constructor + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest=} [properties] Properties to set + */ + function UpdateAppProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAppProfileRequest appProfile. + * @member {google.bigtable.admin.v2.IAppProfile|null|undefined} appProfile + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @instance + */ + UpdateAppProfileRequest.prototype.appProfile = null; + + /** + * UpdateAppProfileRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @instance + */ + UpdateAppProfileRequest.prototype.updateMask = null; + + /** + * UpdateAppProfileRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @instance + */ + UpdateAppProfileRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new UpdateAppProfileRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest instance + */ + UpdateAppProfileRequest.create = function create(properties) { + return new UpdateAppProfileRequest(properties); + }; + + /** + * Encodes the specified UpdateAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest} message UpdateAppProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAppProfileRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); + return writer; + }; + + /** + * Encodes the specified UpdateAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest} message UpdateAppProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateAppProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @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.UpdateAppProfileRequest} UpdateAppProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAppProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateAppProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAppProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAppProfileRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAppProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) { + var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile, long + 1); + if (error) + return "appProfile." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; + return null; + }; + + /** + * Creates an UpdateAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest + */ + UpdateAppProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateAppProfileRequest(); + if (object.appProfile != null) { + if (!$util.isObject(object.appProfile)) + throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.appProfile: object expected"); + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); + return message; + }; + + /** + * Creates a plain object from an UpdateAppProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.UpdateAppProfileRequest} message UpdateAppProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAppProfileRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.appProfile = null; + object.updateMask = null; + object.ignoreWarnings = false; + } + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) + object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; + return object; + }; + + /** + * Converts this UpdateAppProfileRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAppProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAppProfileRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAppProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateAppProfileRequest"; + }; + + return UpdateAppProfileRequest; + })(); + + v2.DeleteAppProfileRequest = (function() { + + /** + * Properties of a DeleteAppProfileRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteAppProfileRequest + * @property {string|null} [name] DeleteAppProfileRequest name + * @property {boolean|null} [ignoreWarnings] DeleteAppProfileRequest ignoreWarnings + */ + + /** + * Constructs a new DeleteAppProfileRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteAppProfileRequest. + * @implements IDeleteAppProfileRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest=} [properties] Properties to set + */ + function DeleteAppProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAppProfileRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @instance + */ + DeleteAppProfileRequest.prototype.name = ""; + + /** + * DeleteAppProfileRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @instance + */ + DeleteAppProfileRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new DeleteAppProfileRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest instance + */ + DeleteAppProfileRequest.create = function create(properties) { + return new DeleteAppProfileRequest(properties); + }; + + /** + * Encodes the specified DeleteAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteAppProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest} message DeleteAppProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAppProfileRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.ignoreWarnings); + return writer; + }; + + /** + * Encodes the specified DeleteAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteAppProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest} message DeleteAppProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteAppProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @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.DeleteAppProfileRequest} DeleteAppProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAppProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteAppProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAppProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAppProfileRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAppProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; + return null; + }; + + /** + * Creates a DeleteAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest + */ + DeleteAppProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteAppProfileRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteAppProfileRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteAppProfileRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); + return message; + }; + + /** + * Creates a plain object from a DeleteAppProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @static + * @param {google.bigtable.admin.v2.DeleteAppProfileRequest} message DeleteAppProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAppProfileRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.ignoreWarnings = false; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; + return object; + }; + + /** + * Converts this DeleteAppProfileRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAppProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAppProfileRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAppProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteAppProfileRequest"; + }; + + return DeleteAppProfileRequest; + })(); + + v2.UpdateAppProfileMetadata = (function() { + + /** + * Properties of an UpdateAppProfileMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateAppProfileMetadata + */ + + /** + * Constructs a new UpdateAppProfileMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateAppProfileMetadata. + * @implements IUpdateAppProfileMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata=} [properties] Properties to set + */ + function UpdateAppProfileMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new UpdateAppProfileMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata instance + */ + UpdateAppProfileMetadata.create = function create(properties) { + return new UpdateAppProfileMetadata(properties); + }; + + /** + * Encodes the specified UpdateAppProfileMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata} message UpdateAppProfileMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAppProfileMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified UpdateAppProfileMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata} message UpdateAppProfileMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAppProfileMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateAppProfileMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @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.UpdateAppProfileMetadata} UpdateAppProfileMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAppProfileMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateAppProfileMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAppProfileMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAppProfileMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAppProfileMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAppProfileMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an UpdateAppProfileMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata + */ + UpdateAppProfileMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileMetadata) + return object; + return new $root.google.bigtable.admin.v2.UpdateAppProfileMetadata(); + }; + + /** + * Creates a plain object from an UpdateAppProfileMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateAppProfileMetadata} message UpdateAppProfileMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAppProfileMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UpdateAppProfileMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateAppProfileMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAppProfileMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAppProfileMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateAppProfileMetadata"; + }; + + return UpdateAppProfileMetadata; + })(); + + v2.ListHotTabletsRequest = (function() { + + /** + * Properties of a ListHotTabletsRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListHotTabletsRequest + * @property {string|null} [parent] ListHotTabletsRequest parent + * @property {google.protobuf.ITimestamp|null} [startTime] ListHotTabletsRequest startTime + * @property {google.protobuf.ITimestamp|null} [endTime] ListHotTabletsRequest endTime + * @property {number|null} [pageSize] ListHotTabletsRequest pageSize + * @property {string|null} [pageToken] ListHotTabletsRequest pageToken + */ + + /** + * Constructs a new ListHotTabletsRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListHotTabletsRequest. + * @implements IListHotTabletsRequest + * @constructor + * @param {google.bigtable.admin.v2.IListHotTabletsRequest=} [properties] Properties to set + */ + function ListHotTabletsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListHotTabletsRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @instance + */ + ListHotTabletsRequest.prototype.parent = ""; + + /** + * ListHotTabletsRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @instance + */ + ListHotTabletsRequest.prototype.startTime = null; + + /** + * ListHotTabletsRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @instance + */ + ListHotTabletsRequest.prototype.endTime = null; + + /** + * ListHotTabletsRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @instance + */ + ListHotTabletsRequest.prototype.pageSize = 0; + + /** + * ListHotTabletsRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @instance + */ + ListHotTabletsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListHotTabletsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @static + * @param {google.bigtable.admin.v2.IListHotTabletsRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListHotTabletsRequest} ListHotTabletsRequest instance + */ + ListHotTabletsRequest.create = function create(properties) { + return new ListHotTabletsRequest(properties); + }; + + /** + * Encodes the specified ListHotTabletsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListHotTabletsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @static + * @param {google.bigtable.admin.v2.IListHotTabletsRequest} message ListHotTabletsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListHotTabletsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListHotTabletsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListHotTabletsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @static + * @param {google.bigtable.admin.v2.IListHotTabletsRequest} message ListHotTabletsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListHotTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListHotTabletsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @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.ListHotTabletsRequest} ListHotTabletsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListHotTabletsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListHotTabletsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.pageSize = reader.int32(); + break; + } + case 5: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListHotTabletsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListHotTabletsRequest} ListHotTabletsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListHotTabletsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListHotTabletsRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListHotTabletsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListHotTabletsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListHotTabletsRequest} ListHotTabletsRequest + */ + ListHotTabletsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListHotTabletsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListHotTabletsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListHotTabletsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @static + * @param {google.bigtable.admin.v2.ListHotTabletsRequest} message ListHotTabletsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListHotTabletsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.startTime = null; + object.endTime = null; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListHotTabletsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @instance + * @returns {Object.} JSON object + */ + ListHotTabletsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListHotTabletsRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListHotTabletsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListHotTabletsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListHotTabletsRequest"; + }; + + return ListHotTabletsRequest; + })(); + + v2.ListHotTabletsResponse = (function() { + + /** + * Properties of a ListHotTabletsResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListHotTabletsResponse + * @property {Array.|null} [hotTablets] ListHotTabletsResponse hotTablets + * @property {string|null} [nextPageToken] ListHotTabletsResponse nextPageToken + */ + + /** + * Constructs a new ListHotTabletsResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListHotTabletsResponse. + * @implements IListHotTabletsResponse + * @constructor + * @param {google.bigtable.admin.v2.IListHotTabletsResponse=} [properties] Properties to set + */ + function ListHotTabletsResponse(properties) { + this.hotTablets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListHotTabletsResponse hotTablets. + * @member {Array.} hotTablets + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @instance + */ + ListHotTabletsResponse.prototype.hotTablets = $util.emptyArray; + + /** + * ListHotTabletsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @instance + */ + ListHotTabletsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListHotTabletsResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @static + * @param {google.bigtable.admin.v2.IListHotTabletsResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListHotTabletsResponse} ListHotTabletsResponse instance + */ + ListHotTabletsResponse.create = function create(properties) { + return new ListHotTabletsResponse(properties); + }; + + /** + * Encodes the specified ListHotTabletsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListHotTabletsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @static + * @param {google.bigtable.admin.v2.IListHotTabletsResponse} message ListHotTabletsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListHotTabletsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.hotTablets != null && message.hotTablets.length) + for (var i = 0; i < message.hotTablets.length; ++i) + $root.google.bigtable.admin.v2.HotTablet.encode(message.hotTablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListHotTabletsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListHotTabletsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @static + * @param {google.bigtable.admin.v2.IListHotTabletsResponse} message ListHotTabletsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListHotTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListHotTabletsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @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.ListHotTabletsResponse} ListHotTabletsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListHotTabletsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListHotTabletsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.hotTablets && message.hotTablets.length)) + message.hotTablets = []; + message.hotTablets.push($root.google.bigtable.admin.v2.HotTablet.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListHotTabletsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListHotTabletsResponse} ListHotTabletsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListHotTabletsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListHotTabletsResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListHotTabletsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.hotTablets != null && Object.hasOwnProperty.call(message, "hotTablets")) { + if (!Array.isArray(message.hotTablets)) + return "hotTablets: array expected"; + for (var i = 0; i < message.hotTablets.length; ++i) { + var error = $root.google.bigtable.admin.v2.HotTablet.verify(message.hotTablets[i], long + 1); + if (error) + return "hotTablets." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListHotTabletsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListHotTabletsResponse} ListHotTabletsResponse + */ + ListHotTabletsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListHotTabletsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListHotTabletsResponse(); + if (object.hotTablets) { + if (!Array.isArray(object.hotTablets)) + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsResponse.hotTablets: array expected"); + message.hotTablets = []; + for (var i = 0; i < object.hotTablets.length; ++i) { + if (!$util.isObject(object.hotTablets[i])) + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsResponse.hotTablets: object expected"); + message.hotTablets[i] = $root.google.bigtable.admin.v2.HotTablet.fromObject(object.hotTablets[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListHotTabletsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @static + * @param {google.bigtable.admin.v2.ListHotTabletsResponse} message ListHotTabletsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListHotTabletsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.hotTablets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.hotTablets && message.hotTablets.length) { + object.hotTablets = []; + for (var j = 0; j < message.hotTablets.length; ++j) + object.hotTablets[j] = $root.google.bigtable.admin.v2.HotTablet.toObject(message.hotTablets[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListHotTabletsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @instance + * @returns {Object.} JSON object + */ + ListHotTabletsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListHotTabletsResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListHotTabletsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListHotTabletsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListHotTabletsResponse"; + }; + + return ListHotTabletsResponse; + })(); + + v2.CreateLogicalViewRequest = (function() { + + /** + * Properties of a CreateLogicalViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateLogicalViewRequest + * @property {string|null} [parent] CreateLogicalViewRequest parent + * @property {string|null} [logicalViewId] CreateLogicalViewRequest logicalViewId + * @property {google.bigtable.admin.v2.ILogicalView|null} [logicalView] CreateLogicalViewRequest logicalView + */ + + /** + * Constructs a new CreateLogicalViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateLogicalViewRequest. + * @implements ICreateLogicalViewRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateLogicalViewRequest=} [properties] Properties to set + */ + function CreateLogicalViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateLogicalViewRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @instance + */ + CreateLogicalViewRequest.prototype.parent = ""; + + /** + * CreateLogicalViewRequest logicalViewId. + * @member {string} logicalViewId + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @instance + */ + CreateLogicalViewRequest.prototype.logicalViewId = ""; + + /** + * CreateLogicalViewRequest logicalView. + * @member {google.bigtable.admin.v2.ILogicalView|null|undefined} logicalView + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @instance + */ + CreateLogicalViewRequest.prototype.logicalView = null; + + /** + * Creates a new CreateLogicalViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateLogicalViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateLogicalViewRequest} CreateLogicalViewRequest instance + */ + CreateLogicalViewRequest.create = function create(properties) { + return new CreateLogicalViewRequest(properties); + }; + + /** + * Encodes the specified CreateLogicalViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateLogicalViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateLogicalViewRequest} message CreateLogicalViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogicalViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.logicalViewId != null && Object.hasOwnProperty.call(message, "logicalViewId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.logicalViewId); + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) + $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalView, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateLogicalViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateLogicalViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateLogicalViewRequest} message CreateLogicalViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogicalViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateLogicalViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @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.CreateLogicalViewRequest} CreateLogicalViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogicalViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateLogicalViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.logicalViewId = reader.string(); + break; + } + case 3: { + message.logicalView = $root.google.bigtable.admin.v2.LogicalView.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateLogicalViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateLogicalViewRequest} CreateLogicalViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogicalViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateLogicalViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLogicalViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.logicalViewId != null && Object.hasOwnProperty.call(message, "logicalViewId")) + if (!$util.isString(message.logicalViewId)) + return "logicalViewId: string expected"; + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) { + var error = $root.google.bigtable.admin.v2.LogicalView.verify(message.logicalView, long + 1); + if (error) + return "logicalView." + error; + } + return null; + }; + + /** + * Creates a CreateLogicalViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateLogicalViewRequest} CreateLogicalViewRequest + */ + CreateLogicalViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateLogicalViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateLogicalViewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.logicalViewId != null) + message.logicalViewId = String(object.logicalViewId); + if (object.logicalView != null) { + if (!$util.isObject(object.logicalView)) + throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewRequest.logicalView: object expected"); + message.logicalView = $root.google.bigtable.admin.v2.LogicalView.fromObject(object.logicalView, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateLogicalViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.CreateLogicalViewRequest} message CreateLogicalViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLogicalViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.logicalViewId = ""; + object.logicalView = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.logicalViewId != null && Object.hasOwnProperty.call(message, "logicalViewId")) + object.logicalViewId = message.logicalViewId; + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) + object.logicalView = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalView, options, q + 1); + return object; + }; + + /** + * Converts this CreateLogicalViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLogicalViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateLogicalViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateLogicalViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateLogicalViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateLogicalViewRequest"; + }; + + return CreateLogicalViewRequest; + })(); + + v2.CreateLogicalViewMetadata = (function() { + + /** + * Properties of a CreateLogicalViewMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICreateLogicalViewMetadata + * @property {google.bigtable.admin.v2.ICreateLogicalViewRequest|null} [originalRequest] CreateLogicalViewMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [startTime] CreateLogicalViewMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] CreateLogicalViewMetadata endTime + */ + + /** + * Constructs a new CreateLogicalViewMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateLogicalViewMetadata. + * @implements ICreateLogicalViewMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICreateLogicalViewMetadata=} [properties] Properties to set + */ + function CreateLogicalViewMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateLogicalViewMetadata originalRequest. + * @member {google.bigtable.admin.v2.ICreateLogicalViewRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @instance + */ + CreateLogicalViewMetadata.prototype.originalRequest = null; + + /** + * CreateLogicalViewMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @instance + */ + CreateLogicalViewMetadata.prototype.startTime = null; + + /** + * CreateLogicalViewMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @instance + */ + CreateLogicalViewMetadata.prototype.endTime = null; + + /** + * Creates a new CreateLogicalViewMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateLogicalViewMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateLogicalViewMetadata} CreateLogicalViewMetadata instance + */ + CreateLogicalViewMetadata.create = function create(properties) { + return new CreateLogicalViewMetadata(properties); + }; + + /** + * Encodes the specified CreateLogicalViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateLogicalViewMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateLogicalViewMetadata} message CreateLogicalViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogicalViewMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.CreateLogicalViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateLogicalViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateLogicalViewMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateLogicalViewMetadata} message CreateLogicalViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogicalViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateLogicalViewMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @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.CreateLogicalViewMetadata} CreateLogicalViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogicalViewMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateLogicalViewMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateLogicalViewRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateLogicalViewMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateLogicalViewMetadata} CreateLogicalViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogicalViewMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateLogicalViewMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLogicalViewMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateLogicalViewRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a CreateLogicalViewMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateLogicalViewMetadata} CreateLogicalViewMetadata + */ + CreateLogicalViewMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateLogicalViewMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateLogicalViewMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateLogicalViewRequest.fromObject(object.originalRequest, long + 1); + } + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateLogicalViewMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @static + * @param {google.bigtable.admin.v2.CreateLogicalViewMetadata} message CreateLogicalViewMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLogicalViewMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.startTime = null; + object.endTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateLogicalViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this CreateLogicalViewMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateLogicalViewMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateLogicalViewMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateLogicalViewMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateLogicalViewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateLogicalViewMetadata"; + }; + + return CreateLogicalViewMetadata; + })(); + + v2.GetLogicalViewRequest = (function() { + + /** + * Properties of a GetLogicalViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetLogicalViewRequest + * @property {string|null} [name] GetLogicalViewRequest name + */ + + /** + * Constructs a new GetLogicalViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetLogicalViewRequest. + * @implements IGetLogicalViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetLogicalViewRequest=} [properties] Properties to set + */ + function GetLogicalViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLogicalViewRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @instance + */ + GetLogicalViewRequest.prototype.name = ""; + + /** + * Creates a new GetLogicalViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetLogicalViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetLogicalViewRequest} GetLogicalViewRequest instance + */ + GetLogicalViewRequest.create = function create(properties) { + return new GetLogicalViewRequest(properties); + }; + + /** + * Encodes the specified GetLogicalViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetLogicalViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetLogicalViewRequest} message GetLogicalViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogicalViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetLogicalViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetLogicalViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetLogicalViewRequest} message GetLogicalViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogicalViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetLogicalViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @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.GetLogicalViewRequest} GetLogicalViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLogicalViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetLogicalViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetLogicalViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetLogicalViewRequest} GetLogicalViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLogicalViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLogicalViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLogicalViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetLogicalViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetLogicalViewRequest} GetLogicalViewRequest + */ + GetLogicalViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetLogicalViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetLogicalViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetLogicalViewRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetLogicalViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.GetLogicalViewRequest} message GetLogicalViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLogicalViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetLogicalViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @instance + * @returns {Object.} JSON object + */ + GetLogicalViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetLogicalViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetLogicalViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetLogicalViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetLogicalViewRequest"; + }; + + return GetLogicalViewRequest; + })(); + + v2.ListLogicalViewsRequest = (function() { + + /** + * Properties of a ListLogicalViewsRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListLogicalViewsRequest + * @property {string|null} [parent] ListLogicalViewsRequest parent + * @property {number|null} [pageSize] ListLogicalViewsRequest pageSize + * @property {string|null} [pageToken] ListLogicalViewsRequest pageToken + */ + + /** + * Constructs a new ListLogicalViewsRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListLogicalViewsRequest. + * @implements IListLogicalViewsRequest + * @constructor + * @param {google.bigtable.admin.v2.IListLogicalViewsRequest=} [properties] Properties to set + */ + function ListLogicalViewsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLogicalViewsRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @instance + */ + ListLogicalViewsRequest.prototype.parent = ""; + + /** + * ListLogicalViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @instance + */ + ListLogicalViewsRequest.prototype.pageSize = 0; + + /** + * ListLogicalViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @instance + */ + ListLogicalViewsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogicalViewsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListLogicalViewsRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListLogicalViewsRequest} ListLogicalViewsRequest instance + */ + ListLogicalViewsRequest.create = function create(properties) { + return new ListLogicalViewsRequest(properties); + }; + + /** + * Encodes the specified ListLogicalViewsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListLogicalViewsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListLogicalViewsRequest} message ListLogicalViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogicalViewsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListLogicalViewsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListLogicalViewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListLogicalViewsRequest} message ListLogicalViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogicalViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListLogicalViewsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @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.ListLogicalViewsRequest} ListLogicalViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogicalViewsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListLogicalViewsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogicalViewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListLogicalViewsRequest} ListLogicalViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogicalViewsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogicalViewsRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogicalViewsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListLogicalViewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListLogicalViewsRequest} ListLogicalViewsRequest + */ + ListLogicalViewsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListLogicalViewsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListLogicalViewsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListLogicalViewsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListLogicalViewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @static + * @param {google.bigtable.admin.v2.ListLogicalViewsRequest} message ListLogicalViewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogicalViewsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListLogicalViewsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLogicalViewsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLogicalViewsRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListLogicalViewsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLogicalViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListLogicalViewsRequest"; + }; + + return ListLogicalViewsRequest; + })(); + + v2.ListLogicalViewsResponse = (function() { + + /** + * Properties of a ListLogicalViewsResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListLogicalViewsResponse + * @property {Array.|null} [logicalViews] ListLogicalViewsResponse logicalViews + * @property {string|null} [nextPageToken] ListLogicalViewsResponse nextPageToken + */ + + /** + * Constructs a new ListLogicalViewsResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListLogicalViewsResponse. + * @implements IListLogicalViewsResponse + * @constructor + * @param {google.bigtable.admin.v2.IListLogicalViewsResponse=} [properties] Properties to set + */ + function ListLogicalViewsResponse(properties) { + this.logicalViews = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLogicalViewsResponse logicalViews. + * @member {Array.} logicalViews + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @instance + */ + ListLogicalViewsResponse.prototype.logicalViews = $util.emptyArray; + + /** + * ListLogicalViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @instance + */ + ListLogicalViewsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogicalViewsResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListLogicalViewsResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListLogicalViewsResponse} ListLogicalViewsResponse instance + */ + ListLogicalViewsResponse.create = function create(properties) { + return new ListLogicalViewsResponse(properties); + }; + + /** + * Encodes the specified ListLogicalViewsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListLogicalViewsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListLogicalViewsResponse} message ListLogicalViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogicalViewsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.logicalViews != null && message.logicalViews.length) + for (var i = 0; i < message.logicalViews.length; ++i) + $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListLogicalViewsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListLogicalViewsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListLogicalViewsResponse} message ListLogicalViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogicalViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListLogicalViewsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @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.ListLogicalViewsResponse} ListLogicalViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogicalViewsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListLogicalViewsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.logicalViews && message.logicalViews.length)) + message.logicalViews = []; + message.logicalViews.push($root.google.bigtable.admin.v2.LogicalView.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogicalViewsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListLogicalViewsResponse} ListLogicalViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogicalViewsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogicalViewsResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogicalViewsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.logicalViews != null && Object.hasOwnProperty.call(message, "logicalViews")) { + if (!Array.isArray(message.logicalViews)) + return "logicalViews: array expected"; + for (var i = 0; i < message.logicalViews.length; ++i) { + var error = $root.google.bigtable.admin.v2.LogicalView.verify(message.logicalViews[i], long + 1); + if (error) + return "logicalViews." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListLogicalViewsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListLogicalViewsResponse} ListLogicalViewsResponse + */ + ListLogicalViewsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListLogicalViewsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListLogicalViewsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListLogicalViewsResponse(); + if (object.logicalViews) { + if (!Array.isArray(object.logicalViews)) + throw TypeError(".google.bigtable.admin.v2.ListLogicalViewsResponse.logicalViews: array expected"); + message.logicalViews = []; + for (var i = 0; i < object.logicalViews.length; ++i) { + if (!$util.isObject(object.logicalViews[i])) + throw TypeError(".google.bigtable.admin.v2.ListLogicalViewsResponse.logicalViews: object expected"); + message.logicalViews[i] = $root.google.bigtable.admin.v2.LogicalView.fromObject(object.logicalViews[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListLogicalViewsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @static + * @param {google.bigtable.admin.v2.ListLogicalViewsResponse} message ListLogicalViewsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogicalViewsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.logicalViews = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.logicalViews && message.logicalViews.length) { + object.logicalViews = []; + for (var j = 0; j < message.logicalViews.length; ++j) + object.logicalViews[j] = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalViews[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListLogicalViewsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLogicalViewsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLogicalViewsResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListLogicalViewsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLogicalViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListLogicalViewsResponse"; + }; + + return ListLogicalViewsResponse; + })(); + + v2.UpdateLogicalViewRequest = (function() { + + /** + * Properties of an UpdateLogicalViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateLogicalViewRequest + * @property {google.bigtable.admin.v2.ILogicalView|null} [logicalView] UpdateLogicalViewRequest logicalView + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLogicalViewRequest updateMask + */ + + /** + * Constructs a new UpdateLogicalViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateLogicalViewRequest. + * @implements IUpdateLogicalViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IUpdateLogicalViewRequest=} [properties] Properties to set + */ + function UpdateLogicalViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateLogicalViewRequest logicalView. + * @member {google.bigtable.admin.v2.ILogicalView|null|undefined} logicalView + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @instance + */ + UpdateLogicalViewRequest.prototype.logicalView = null; + + /** + * UpdateLogicalViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @instance + */ + UpdateLogicalViewRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateLogicalViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateLogicalViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateLogicalViewRequest} UpdateLogicalViewRequest instance + */ + UpdateLogicalViewRequest.create = function create(properties) { + return new UpdateLogicalViewRequest(properties); + }; + + /** + * Encodes the specified UpdateLogicalViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateLogicalViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateLogicalViewRequest} message UpdateLogicalViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogicalViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) + $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalView, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateLogicalViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateLogicalViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateLogicalViewRequest} message UpdateLogicalViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogicalViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateLogicalViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @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.UpdateLogicalViewRequest} UpdateLogicalViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogicalViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateLogicalViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.logicalView = $root.google.bigtable.admin.v2.LogicalView.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateLogicalViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateLogicalViewRequest} UpdateLogicalViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogicalViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateLogicalViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLogicalViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) { + var error = $root.google.bigtable.admin.v2.LogicalView.verify(message.logicalView, long + 1); + if (error) + return "logicalView." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateLogicalViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateLogicalViewRequest} UpdateLogicalViewRequest + */ + UpdateLogicalViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateLogicalViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateLogicalViewRequest(); + if (object.logicalView != null) { + if (!$util.isObject(object.logicalView)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewRequest.logicalView: object expected"); + message.logicalView = $root.google.bigtable.admin.v2.LogicalView.fromObject(object.logicalView, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateLogicalViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.UpdateLogicalViewRequest} message UpdateLogicalViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLogicalViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.logicalView = null; + object.updateMask = null; + } + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) + object.logicalView = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalView, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + return object; + }; + + /** + * Converts this UpdateLogicalViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateLogicalViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateLogicalViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateLogicalViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateLogicalViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateLogicalViewRequest"; + }; + + return UpdateLogicalViewRequest; + })(); + + v2.UpdateLogicalViewMetadata = (function() { + + /** + * Properties of an UpdateLogicalViewMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateLogicalViewMetadata + * @property {google.bigtable.admin.v2.IUpdateLogicalViewRequest|null} [originalRequest] UpdateLogicalViewMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [startTime] UpdateLogicalViewMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UpdateLogicalViewMetadata endTime + */ + + /** + * Constructs a new UpdateLogicalViewMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateLogicalViewMetadata. + * @implements IUpdateLogicalViewMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateLogicalViewMetadata=} [properties] Properties to set + */ + function UpdateLogicalViewMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateLogicalViewMetadata originalRequest. + * @member {google.bigtable.admin.v2.IUpdateLogicalViewRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @instance + */ + UpdateLogicalViewMetadata.prototype.originalRequest = null; + + /** + * UpdateLogicalViewMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @instance + */ + UpdateLogicalViewMetadata.prototype.startTime = null; + + /** + * UpdateLogicalViewMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @instance + */ + UpdateLogicalViewMetadata.prototype.endTime = null; + + /** + * Creates a new UpdateLogicalViewMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateLogicalViewMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateLogicalViewMetadata} UpdateLogicalViewMetadata instance + */ + UpdateLogicalViewMetadata.create = function create(properties) { + return new UpdateLogicalViewMetadata(properties); + }; + + /** + * Encodes the specified UpdateLogicalViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateLogicalViewMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateLogicalViewMetadata} message UpdateLogicalViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogicalViewMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateLogicalViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateLogicalViewMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateLogicalViewMetadata} message UpdateLogicalViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogicalViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateLogicalViewMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @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.UpdateLogicalViewMetadata} UpdateLogicalViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogicalViewMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateLogicalViewMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateLogicalViewMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateLogicalViewMetadata} UpdateLogicalViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogicalViewMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateLogicalViewMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLogicalViewMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an UpdateLogicalViewMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateLogicalViewMetadata} UpdateLogicalViewMetadata + */ + UpdateLogicalViewMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateLogicalViewMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateLogicalViewMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.fromObject(object.originalRequest, long + 1); + } + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateLogicalViewMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateLogicalViewMetadata} message UpdateLogicalViewMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLogicalViewMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.startTime = null; + object.endTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this UpdateLogicalViewMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateLogicalViewMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateLogicalViewMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateLogicalViewMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateLogicalViewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateLogicalViewMetadata"; + }; + + return UpdateLogicalViewMetadata; + })(); + + v2.DeleteLogicalViewRequest = (function() { + + /** + * Properties of a DeleteLogicalViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteLogicalViewRequest + * @property {string|null} [name] DeleteLogicalViewRequest name + * @property {string|null} [etag] DeleteLogicalViewRequest etag + */ + + /** + * Constructs a new DeleteLogicalViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteLogicalViewRequest. + * @implements IDeleteLogicalViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteLogicalViewRequest=} [properties] Properties to set + */ + function DeleteLogicalViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteLogicalViewRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @instance + */ + DeleteLogicalViewRequest.prototype.name = ""; + + /** + * DeleteLogicalViewRequest etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @instance + */ + DeleteLogicalViewRequest.prototype.etag = ""; + + /** + * Creates a new DeleteLogicalViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteLogicalViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteLogicalViewRequest} DeleteLogicalViewRequest instance + */ + DeleteLogicalViewRequest.create = function create(properties) { + return new DeleteLogicalViewRequest(properties); + }; + + /** + * Encodes the specified DeleteLogicalViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteLogicalViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteLogicalViewRequest} message DeleteLogicalViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogicalViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteLogicalViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteLogicalViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteLogicalViewRequest} message DeleteLogicalViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogicalViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteLogicalViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @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.DeleteLogicalViewRequest} DeleteLogicalViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogicalViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteLogicalViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteLogicalViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteLogicalViewRequest} DeleteLogicalViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogicalViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLogicalViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLogicalViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteLogicalViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteLogicalViewRequest} DeleteLogicalViewRequest + */ + DeleteLogicalViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteLogicalViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteLogicalViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteLogicalViewRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteLogicalViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @static + * @param {google.bigtable.admin.v2.DeleteLogicalViewRequest} message DeleteLogicalViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLogicalViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteLogicalViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLogicalViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteLogicalViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteLogicalViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteLogicalViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteLogicalViewRequest"; + }; + + return DeleteLogicalViewRequest; + })(); + + v2.CreateMaterializedViewRequest = (function() { + + /** + * Properties of a CreateMaterializedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateMaterializedViewRequest + * @property {string|null} [parent] CreateMaterializedViewRequest parent + * @property {string|null} [materializedViewId] CreateMaterializedViewRequest materializedViewId + * @property {google.bigtable.admin.v2.IMaterializedView|null} [materializedView] CreateMaterializedViewRequest materializedView + */ + + /** + * Constructs a new CreateMaterializedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateMaterializedViewRequest. + * @implements ICreateMaterializedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateMaterializedViewRequest=} [properties] Properties to set + */ + function CreateMaterializedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMaterializedViewRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @instance + */ + CreateMaterializedViewRequest.prototype.parent = ""; + + /** + * CreateMaterializedViewRequest materializedViewId. + * @member {string} materializedViewId + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @instance + */ + CreateMaterializedViewRequest.prototype.materializedViewId = ""; + + /** + * CreateMaterializedViewRequest materializedView. + * @member {google.bigtable.admin.v2.IMaterializedView|null|undefined} materializedView + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @instance + */ + CreateMaterializedViewRequest.prototype.materializedView = null; + + /** + * Creates a new CreateMaterializedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateMaterializedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateMaterializedViewRequest} CreateMaterializedViewRequest instance + */ + CreateMaterializedViewRequest.create = function create(properties) { + return new CreateMaterializedViewRequest(properties); + }; + + /** + * Encodes the specified CreateMaterializedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateMaterializedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateMaterializedViewRequest} message CreateMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMaterializedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.materializedViewId != null && Object.hasOwnProperty.call(message, "materializedViewId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.materializedViewId); + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) + $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedView, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateMaterializedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateMaterializedViewRequest} message CreateMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateMaterializedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @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.CreateMaterializedViewRequest} CreateMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMaterializedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateMaterializedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.materializedViewId = reader.string(); + break; + } + case 3: { + message.materializedView = $root.google.bigtable.admin.v2.MaterializedView.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateMaterializedViewRequest} CreateMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMaterializedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMaterializedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMaterializedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.materializedViewId != null && Object.hasOwnProperty.call(message, "materializedViewId")) + if (!$util.isString(message.materializedViewId)) + return "materializedViewId: string expected"; + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) { + var error = $root.google.bigtable.admin.v2.MaterializedView.verify(message.materializedView, long + 1); + if (error) + return "materializedView." + error; + } + return null; + }; + + /** + * Creates a CreateMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateMaterializedViewRequest} CreateMaterializedViewRequest + */ + CreateMaterializedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateMaterializedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateMaterializedViewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.materializedViewId != null) + message.materializedViewId = String(object.materializedViewId); + if (object.materializedView != null) { + if (!$util.isObject(object.materializedView)) + throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewRequest.materializedView: object expected"); + message.materializedView = $root.google.bigtable.admin.v2.MaterializedView.fromObject(object.materializedView, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateMaterializedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.CreateMaterializedViewRequest} message CreateMaterializedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMaterializedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.materializedViewId = ""; + object.materializedView = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.materializedViewId != null && Object.hasOwnProperty.call(message, "materializedViewId")) + object.materializedViewId = message.materializedViewId; + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) + object.materializedView = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedView, options, q + 1); + return object; + }; + + /** + * Converts this CreateMaterializedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMaterializedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMaterializedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateMaterializedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMaterializedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateMaterializedViewRequest"; + }; + + return CreateMaterializedViewRequest; + })(); + + v2.CreateMaterializedViewMetadata = (function() { + + /** + * Properties of a CreateMaterializedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICreateMaterializedViewMetadata + * @property {google.bigtable.admin.v2.ICreateMaterializedViewRequest|null} [originalRequest] CreateMaterializedViewMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [startTime] CreateMaterializedViewMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] CreateMaterializedViewMetadata endTime + */ + + /** + * Constructs a new CreateMaterializedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateMaterializedViewMetadata. + * @implements ICreateMaterializedViewMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICreateMaterializedViewMetadata=} [properties] Properties to set + */ + function CreateMaterializedViewMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMaterializedViewMetadata originalRequest. + * @member {google.bigtable.admin.v2.ICreateMaterializedViewRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @instance + */ + CreateMaterializedViewMetadata.prototype.originalRequest = null; + + /** + * CreateMaterializedViewMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @instance + */ + CreateMaterializedViewMetadata.prototype.startTime = null; + + /** + * CreateMaterializedViewMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @instance + */ + CreateMaterializedViewMetadata.prototype.endTime = null; + + /** + * Creates a new CreateMaterializedViewMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateMaterializedViewMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateMaterializedViewMetadata} CreateMaterializedViewMetadata instance + */ + CreateMaterializedViewMetadata.create = function create(properties) { + return new CreateMaterializedViewMetadata(properties); + }; + + /** + * Encodes the specified CreateMaterializedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateMaterializedViewMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateMaterializedViewMetadata} message CreateMaterializedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMaterializedViewMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateMaterializedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateMaterializedViewMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateMaterializedViewMetadata} message CreateMaterializedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMaterializedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateMaterializedViewMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @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.CreateMaterializedViewMetadata} CreateMaterializedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMaterializedViewMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateMaterializedViewMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMaterializedViewMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateMaterializedViewMetadata} CreateMaterializedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMaterializedViewMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMaterializedViewMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMaterializedViewMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a CreateMaterializedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateMaterializedViewMetadata} CreateMaterializedViewMetadata + */ + CreateMaterializedViewMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateMaterializedViewMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateMaterializedViewMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.fromObject(object.originalRequest, long + 1); + } + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateMaterializedViewMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @static + * @param {google.bigtable.admin.v2.CreateMaterializedViewMetadata} message CreateMaterializedViewMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMaterializedViewMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.startTime = null; + object.endTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this CreateMaterializedViewMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateMaterializedViewMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMaterializedViewMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateMaterializedViewMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMaterializedViewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateMaterializedViewMetadata"; + }; + + return CreateMaterializedViewMetadata; + })(); + + v2.GetMaterializedViewRequest = (function() { + + /** + * Properties of a GetMaterializedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetMaterializedViewRequest + * @property {string|null} [name] GetMaterializedViewRequest name + */ + + /** + * Constructs a new GetMaterializedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetMaterializedViewRequest. + * @implements IGetMaterializedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetMaterializedViewRequest=} [properties] Properties to set + */ + function GetMaterializedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMaterializedViewRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @instance + */ + GetMaterializedViewRequest.prototype.name = ""; + + /** + * Creates a new GetMaterializedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetMaterializedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetMaterializedViewRequest} GetMaterializedViewRequest instance + */ + GetMaterializedViewRequest.create = function create(properties) { + return new GetMaterializedViewRequest(properties); + }; + + /** + * Encodes the specified GetMaterializedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetMaterializedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetMaterializedViewRequest} message GetMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMaterializedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetMaterializedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetMaterializedViewRequest} message GetMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetMaterializedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @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.GetMaterializedViewRequest} GetMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMaterializedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetMaterializedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetMaterializedViewRequest} GetMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMaterializedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMaterializedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMaterializedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetMaterializedViewRequest} GetMaterializedViewRequest + */ + GetMaterializedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetMaterializedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetMaterializedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetMaterializedViewRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMaterializedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.GetMaterializedViewRequest} message GetMaterializedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMaterializedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetMaterializedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @instance + * @returns {Object.} JSON object + */ + GetMaterializedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMaterializedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetMaterializedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMaterializedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetMaterializedViewRequest"; + }; + + return GetMaterializedViewRequest; + })(); + + v2.ListMaterializedViewsRequest = (function() { + + /** + * Properties of a ListMaterializedViewsRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListMaterializedViewsRequest + * @property {string|null} [parent] ListMaterializedViewsRequest parent + * @property {number|null} [pageSize] ListMaterializedViewsRequest pageSize + * @property {string|null} [pageToken] ListMaterializedViewsRequest pageToken + */ + + /** + * Constructs a new ListMaterializedViewsRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListMaterializedViewsRequest. + * @implements IListMaterializedViewsRequest + * @constructor + * @param {google.bigtable.admin.v2.IListMaterializedViewsRequest=} [properties] Properties to set + */ + function ListMaterializedViewsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMaterializedViewsRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @instance + */ + ListMaterializedViewsRequest.prototype.parent = ""; + + /** + * ListMaterializedViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @instance + */ + ListMaterializedViewsRequest.prototype.pageSize = 0; + + /** + * ListMaterializedViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @instance + */ + ListMaterializedViewsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMaterializedViewsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListMaterializedViewsRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListMaterializedViewsRequest} ListMaterializedViewsRequest instance + */ + ListMaterializedViewsRequest.create = function create(properties) { + return new ListMaterializedViewsRequest(properties); + }; + + /** + * Encodes the specified ListMaterializedViewsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListMaterializedViewsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListMaterializedViewsRequest} message ListMaterializedViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMaterializedViewsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMaterializedViewsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListMaterializedViewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListMaterializedViewsRequest} message ListMaterializedViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMaterializedViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListMaterializedViewsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @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.ListMaterializedViewsRequest} ListMaterializedViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMaterializedViewsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListMaterializedViewsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListMaterializedViewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListMaterializedViewsRequest} ListMaterializedViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMaterializedViewsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMaterializedViewsRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMaterializedViewsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMaterializedViewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListMaterializedViewsRequest} ListMaterializedViewsRequest + */ + ListMaterializedViewsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListMaterializedViewsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListMaterializedViewsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListMaterializedViewsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListMaterializedViewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @static + * @param {google.bigtable.admin.v2.ListMaterializedViewsRequest} message ListMaterializedViewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMaterializedViewsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMaterializedViewsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMaterializedViewsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMaterializedViewsRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListMaterializedViewsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMaterializedViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListMaterializedViewsRequest"; + }; + + return ListMaterializedViewsRequest; + })(); + + v2.ListMaterializedViewsResponse = (function() { + + /** + * Properties of a ListMaterializedViewsResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListMaterializedViewsResponse + * @property {Array.|null} [materializedViews] ListMaterializedViewsResponse materializedViews + * @property {string|null} [nextPageToken] ListMaterializedViewsResponse nextPageToken + */ + + /** + * Constructs a new ListMaterializedViewsResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListMaterializedViewsResponse. + * @implements IListMaterializedViewsResponse + * @constructor + * @param {google.bigtable.admin.v2.IListMaterializedViewsResponse=} [properties] Properties to set + */ + function ListMaterializedViewsResponse(properties) { + this.materializedViews = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMaterializedViewsResponse materializedViews. + * @member {Array.} materializedViews + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @instance + */ + ListMaterializedViewsResponse.prototype.materializedViews = $util.emptyArray; + + /** + * ListMaterializedViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @instance + */ + ListMaterializedViewsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMaterializedViewsResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListMaterializedViewsResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListMaterializedViewsResponse} ListMaterializedViewsResponse instance + */ + ListMaterializedViewsResponse.create = function create(properties) { + return new ListMaterializedViewsResponse(properties); + }; + + /** + * Encodes the specified ListMaterializedViewsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListMaterializedViewsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListMaterializedViewsResponse} message ListMaterializedViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMaterializedViewsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.materializedViews != null && message.materializedViews.length) + for (var i = 0; i < message.materializedViews.length; ++i) + $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListMaterializedViewsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListMaterializedViewsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListMaterializedViewsResponse} message ListMaterializedViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMaterializedViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListMaterializedViewsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @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.ListMaterializedViewsResponse} ListMaterializedViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMaterializedViewsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListMaterializedViewsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.materializedViews && message.materializedViews.length)) + message.materializedViews = []; + message.materializedViews.push($root.google.bigtable.admin.v2.MaterializedView.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListMaterializedViewsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListMaterializedViewsResponse} ListMaterializedViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMaterializedViewsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMaterializedViewsResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMaterializedViewsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.materializedViews != null && Object.hasOwnProperty.call(message, "materializedViews")) { + if (!Array.isArray(message.materializedViews)) + return "materializedViews: array expected"; + for (var i = 0; i < message.materializedViews.length; ++i) { + var error = $root.google.bigtable.admin.v2.MaterializedView.verify(message.materializedViews[i], long + 1); + if (error) + return "materializedViews." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMaterializedViewsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListMaterializedViewsResponse} ListMaterializedViewsResponse + */ + ListMaterializedViewsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListMaterializedViewsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListMaterializedViewsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListMaterializedViewsResponse(); + if (object.materializedViews) { + if (!Array.isArray(object.materializedViews)) + throw TypeError(".google.bigtable.admin.v2.ListMaterializedViewsResponse.materializedViews: array expected"); + message.materializedViews = []; + for (var i = 0; i < object.materializedViews.length; ++i) { + if (!$util.isObject(object.materializedViews[i])) + throw TypeError(".google.bigtable.admin.v2.ListMaterializedViewsResponse.materializedViews: object expected"); + message.materializedViews[i] = $root.google.bigtable.admin.v2.MaterializedView.fromObject(object.materializedViews[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMaterializedViewsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @static + * @param {google.bigtable.admin.v2.ListMaterializedViewsResponse} message ListMaterializedViewsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMaterializedViewsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.materializedViews = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.materializedViews && message.materializedViews.length) { + object.materializedViews = []; + for (var j = 0; j < message.materializedViews.length; ++j) + object.materializedViews[j] = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedViews[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMaterializedViewsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMaterializedViewsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMaterializedViewsResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListMaterializedViewsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMaterializedViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListMaterializedViewsResponse"; + }; + + return ListMaterializedViewsResponse; + })(); + + v2.UpdateMaterializedViewRequest = (function() { + + /** + * Properties of an UpdateMaterializedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateMaterializedViewRequest + * @property {google.bigtable.admin.v2.IMaterializedView|null} [materializedView] UpdateMaterializedViewRequest materializedView + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMaterializedViewRequest updateMask + */ + + /** + * Constructs a new UpdateMaterializedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateMaterializedViewRequest. + * @implements IUpdateMaterializedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewRequest=} [properties] Properties to set + */ + function UpdateMaterializedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMaterializedViewRequest materializedView. + * @member {google.bigtable.admin.v2.IMaterializedView|null|undefined} materializedView + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @instance + */ + UpdateMaterializedViewRequest.prototype.materializedView = null; + + /** + * UpdateMaterializedViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @instance + */ + UpdateMaterializedViewRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateMaterializedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateMaterializedViewRequest} UpdateMaterializedViewRequest instance + */ + UpdateMaterializedViewRequest.create = function create(properties) { + return new UpdateMaterializedViewRequest(properties); + }; + + /** + * Encodes the specified UpdateMaterializedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateMaterializedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewRequest} message UpdateMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMaterializedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) + $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedView, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateMaterializedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewRequest} message UpdateMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateMaterializedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @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.UpdateMaterializedViewRequest} UpdateMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMaterializedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.materializedView = $root.google.bigtable.admin.v2.MaterializedView.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateMaterializedViewRequest} UpdateMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMaterializedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMaterializedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMaterializedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) { + var error = $root.google.bigtable.admin.v2.MaterializedView.verify(message.materializedView, long + 1); + if (error) + return "materializedView." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateMaterializedViewRequest} UpdateMaterializedViewRequest + */ + UpdateMaterializedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest(); + if (object.materializedView != null) { + if (!$util.isObject(object.materializedView)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewRequest.materializedView: object expected"); + message.materializedView = $root.google.bigtable.admin.v2.MaterializedView.fromObject(object.materializedView, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateMaterializedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.UpdateMaterializedViewRequest} message UpdateMaterializedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMaterializedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.materializedView = null; + object.updateMask = null; + } + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) + object.materializedView = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedView, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + return object; + }; + + /** + * Converts this UpdateMaterializedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMaterializedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMaterializedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMaterializedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateMaterializedViewRequest"; + }; + + return UpdateMaterializedViewRequest; + })(); + + v2.UpdateMaterializedViewMetadata = (function() { + + /** + * Properties of an UpdateMaterializedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateMaterializedViewMetadata + * @property {google.bigtable.admin.v2.IUpdateMaterializedViewRequest|null} [originalRequest] UpdateMaterializedViewMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [startTime] UpdateMaterializedViewMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UpdateMaterializedViewMetadata endTime + */ + + /** + * Constructs a new UpdateMaterializedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateMaterializedViewMetadata. + * @implements IUpdateMaterializedViewMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewMetadata=} [properties] Properties to set + */ + function UpdateMaterializedViewMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMaterializedViewMetadata originalRequest. + * @member {google.bigtable.admin.v2.IUpdateMaterializedViewRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @instance + */ + UpdateMaterializedViewMetadata.prototype.originalRequest = null; + + /** + * UpdateMaterializedViewMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @instance + */ + UpdateMaterializedViewMetadata.prototype.startTime = null; + + /** + * UpdateMaterializedViewMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @instance + */ + UpdateMaterializedViewMetadata.prototype.endTime = null; + + /** + * Creates a new UpdateMaterializedViewMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateMaterializedViewMetadata} UpdateMaterializedViewMetadata instance + */ + UpdateMaterializedViewMetadata.create = function create(properties) { + return new UpdateMaterializedViewMetadata(properties); + }; + + /** + * Encodes the specified UpdateMaterializedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateMaterializedViewMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewMetadata} message UpdateMaterializedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMaterializedViewMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateMaterializedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateMaterializedViewMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateMaterializedViewMetadata} message UpdateMaterializedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMaterializedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateMaterializedViewMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @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.UpdateMaterializedViewMetadata} UpdateMaterializedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMaterializedViewMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateMaterializedViewMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMaterializedViewMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateMaterializedViewMetadata} UpdateMaterializedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMaterializedViewMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMaterializedViewMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMaterializedViewMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an UpdateMaterializedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateMaterializedViewMetadata} UpdateMaterializedViewMetadata + */ + UpdateMaterializedViewMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateMaterializedViewMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateMaterializedViewMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.fromObject(object.originalRequest, long + 1); + } + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateMaterializedViewMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateMaterializedViewMetadata} message UpdateMaterializedViewMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMaterializedViewMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.startTime = null; + object.endTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this UpdateMaterializedViewMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateMaterializedViewMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMaterializedViewMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateMaterializedViewMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMaterializedViewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateMaterializedViewMetadata"; + }; + + return UpdateMaterializedViewMetadata; + })(); + + v2.DeleteMaterializedViewRequest = (function() { + + /** + * Properties of a DeleteMaterializedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteMaterializedViewRequest + * @property {string|null} [name] DeleteMaterializedViewRequest name + * @property {string|null} [etag] DeleteMaterializedViewRequest etag + */ + + /** + * Constructs a new DeleteMaterializedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteMaterializedViewRequest. + * @implements IDeleteMaterializedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteMaterializedViewRequest=} [properties] Properties to set + */ + function DeleteMaterializedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteMaterializedViewRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @instance + */ + DeleteMaterializedViewRequest.prototype.name = ""; + + /** + * DeleteMaterializedViewRequest etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @instance + */ + DeleteMaterializedViewRequest.prototype.etag = ""; + + /** + * Creates a new DeleteMaterializedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteMaterializedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteMaterializedViewRequest} DeleteMaterializedViewRequest instance + */ + DeleteMaterializedViewRequest.create = function create(properties) { + return new DeleteMaterializedViewRequest(properties); + }; + + /** + * Encodes the specified DeleteMaterializedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteMaterializedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteMaterializedViewRequest} message DeleteMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMaterializedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteMaterializedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteMaterializedViewRequest} message DeleteMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteMaterializedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @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.DeleteMaterializedViewRequest} DeleteMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMaterializedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteMaterializedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteMaterializedViewRequest} DeleteMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMaterializedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMaterializedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMaterializedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteMaterializedViewRequest} DeleteMaterializedViewRequest + */ + DeleteMaterializedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteMaterializedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteMaterializedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteMaterializedViewRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteMaterializedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @static + * @param {google.bigtable.admin.v2.DeleteMaterializedViewRequest} message DeleteMaterializedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMaterializedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteMaterializedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMaterializedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteMaterializedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteMaterializedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMaterializedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteMaterializedViewRequest"; + }; + + return DeleteMaterializedViewRequest; + })(); + + v2.Instance = (function() { + + /** + * Properties of an Instance. + * @memberof google.bigtable.admin.v2 + * @interface IInstance + * @property {string|null} [name] Instance name + * @property {string|null} [displayName] Instance displayName + * @property {google.bigtable.admin.v2.Instance.State|null} [state] Instance state + * @property {google.bigtable.admin.v2.Instance.Type|null} [type] Instance type + * @property {google.bigtable.admin.v2.Instance.Edition|null} [edition] Instance edition + * @property {Object.|null} [labels] Instance labels + * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime + * @property {boolean|null} [satisfiesPzs] Instance satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Instance satisfiesPzi + * @property {Object.|null} [tags] Instance tags + */ + + /** + * Constructs a new Instance. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an Instance. + * @implements IInstance + * @constructor + * @param {google.bigtable.admin.v2.IInstance=} [properties] Properties to set + */ + function Instance(properties) { + this.labels = {}; + this.tags = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Instance name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.name = ""; + + /** + * Instance displayName. + * @member {string} displayName + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.displayName = ""; + + /** + * Instance state. + * @member {google.bigtable.admin.v2.Instance.State} state + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.state = 0; + + /** + * Instance type. + * @member {google.bigtable.admin.v2.Instance.Type} type + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.type = 0; + + /** + * Instance edition. + * @member {google.bigtable.admin.v2.Instance.Edition} edition + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.edition = 0; + + /** + * Instance labels. + * @member {Object.} labels + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.labels = $util.emptyObject; + + /** + * Instance createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.createTime = null; + + /** + * Instance satisfiesPzs. + * @member {boolean|null|undefined} satisfiesPzs + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.satisfiesPzs = null; + + /** + * Instance satisfiesPzi. + * @member {boolean|null|undefined} satisfiesPzi + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.satisfiesPzi = null; + + /** + * Instance tags. + * @member {Object.} tags + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.tags = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Instance.prototype, "_satisfiesPzs", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Instance.prototype, "_satisfiesPzi", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Instance instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {google.bigtable.admin.v2.IInstance=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Instance} Instance instance + */ + Instance.create = function create(properties) { + return new Instance(properties); + }; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.bigtable.admin.v2.Instance.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {google.bigtable.admin.v2.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.satisfiesPzi); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Instance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {google.bigtable.admin.v2.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Instance + * @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.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Instance(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.labels, key); + message.labels[key] = value; + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.satisfiesPzs = reader.bool(); + break; + } + case 11: { + message.satisfiesPzi = reader.bool(); + break; + } + case 12: { + if (message.tags === $util.emptyObject) + message.tags = {}; + 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, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.tags, key); + message.tags[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Instance message. + * @function verify + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Instance.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) { + properties._satisfiesPzs = 1; + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + } + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) { + properties._satisfiesPzi = 1; + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + } + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) { + if (!$util.isObject(message.tags)) + return "tags: object expected"; + var key = Object.keys(message.tags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.tags[key[i]])) + return "tags: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Instance} Instance + */ + Instance.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Instance) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Instance: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Instance(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_NOT_KNOWN": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PRODUCTION": + case 1: + message.type = 1; + break; + case "DEVELOPMENT": + case 2: + message.type = 2; + break; + } + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNSPECIFIED": + case 0: + message.edition = 0; + break; + case "ENTERPRISE": + case 1: + message.edition = 1; + break; + case "ENTERPRISE_PLUS": + case 2: + message.edition = 2; + break; + } + if (object.labels) { + if (!$util.isObject(object.labels)) + throw TypeError(".google.bigtable.admin.v2.Instance.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.labels, keys[i]); + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + } + if (object.createTime != null) { + if (!$util.isObject(object.createTime)) + throw TypeError(".google.bigtable.admin.v2.Instance.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.tags) { + if (!$util.isObject(object.tags)) + throw TypeError(".google.bigtable.admin.v2.Instance.tags: object expected"); + message.tags = {}; + for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.tags, keys[i]); + message.tags[keys[i]] = String(object.tags[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {google.bigtable.admin.v2.Instance} message Instance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Instance.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.tags = {}; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; + object.edition = options.enums === String ? "EDITION_UNSPECIFIED" : 0; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + object.displayName = message.displayName; + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.Instance.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Instance.State[message.state] : message.state; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === String ? $root.google.bigtable.admin.v2.Instance.Type[message.type] === undefined ? message.type : $root.google.bigtable.admin.v2.Instance.Type[message.type] : message.type; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.labels, keys2[j]); + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + } + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) { + object.satisfiesPzs = message.satisfiesPzs; + if (options.oneofs) + object._satisfiesPzs = "satisfiesPzs"; + } + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) { + object.satisfiesPzi = message.satisfiesPzi; + if (options.oneofs) + object._satisfiesPzi = "satisfiesPzi"; + } + if (message.tags && (keys2 = Object.keys(message.tags)).length) { + object.tags = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.tags, keys2[j]); + object.tags[keys2[j]] = message.tags[keys2[j]]; + } + } + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + object.edition = options.enums === String ? $root.google.bigtable.admin.v2.Instance.Edition[message.edition] === undefined ? message.edition : $root.google.bigtable.admin.v2.Instance.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this Instance to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Instance + * @instance + * @returns {Object.} JSON object + */ + Instance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Instance + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Instance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Instance"; + }; + + /** + * State enum. + * @name google.bigtable.admin.v2.Instance.State + * @enum {number} + * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + */ + Instance.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + return values; + })(); + + /** + * Type enum. + * @name google.bigtable.admin.v2.Instance.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} PRODUCTION=1 PRODUCTION value + * @property {number} DEVELOPMENT=2 DEVELOPMENT value + */ + Instance.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRODUCTION"] = 1; + values[valuesById[2] = "DEVELOPMENT"] = 2; + return values; + })(); + + /** + * Edition enum. + * @name google.bigtable.admin.v2.Instance.Edition + * @enum {number} + * @property {number} EDITION_UNSPECIFIED=0 EDITION_UNSPECIFIED value + * @property {number} ENTERPRISE=1 ENTERPRISE value + * @property {number} ENTERPRISE_PLUS=2 ENTERPRISE_PLUS value + */ + Instance.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTERPRISE"] = 1; + values[valuesById[2] = "ENTERPRISE_PLUS"] = 2; + return values; + })(); + + return Instance; + })(); + + v2.AutoscalingTargets = (function() { + + /** + * Properties of an AutoscalingTargets. + * @memberof google.bigtable.admin.v2 + * @interface IAutoscalingTargets + * @property {number|null} [cpuUtilizationPercent] AutoscalingTargets cpuUtilizationPercent + * @property {number|null} [storageUtilizationGibPerNode] AutoscalingTargets storageUtilizationGibPerNode + */ + + /** + * Constructs a new AutoscalingTargets. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an AutoscalingTargets. + * @implements IAutoscalingTargets + * @constructor + * @param {google.bigtable.admin.v2.IAutoscalingTargets=} [properties] Properties to set + */ + function AutoscalingTargets(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoscalingTargets cpuUtilizationPercent. + * @member {number} cpuUtilizationPercent + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @instance + */ + AutoscalingTargets.prototype.cpuUtilizationPercent = 0; + + /** + * AutoscalingTargets storageUtilizationGibPerNode. + * @member {number} storageUtilizationGibPerNode + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @instance + */ + AutoscalingTargets.prototype.storageUtilizationGibPerNode = 0; + + /** + * Creates a new AutoscalingTargets instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {google.bigtable.admin.v2.IAutoscalingTargets=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AutoscalingTargets} AutoscalingTargets instance + */ + AutoscalingTargets.create = function create(properties) { + return new AutoscalingTargets(properties); + }; + + /** + * Encodes the specified AutoscalingTargets message. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingTargets.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {google.bigtable.admin.v2.IAutoscalingTargets} message AutoscalingTargets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingTargets.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.cpuUtilizationPercent != null && Object.hasOwnProperty.call(message, "cpuUtilizationPercent")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cpuUtilizationPercent); + if (message.storageUtilizationGibPerNode != null && Object.hasOwnProperty.call(message, "storageUtilizationGibPerNode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.storageUtilizationGibPerNode); + return writer; + }; + + /** + * Encodes the specified AutoscalingTargets message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingTargets.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {google.bigtable.admin.v2.IAutoscalingTargets} message AutoscalingTargets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingTargets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AutoscalingTargets message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @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.AutoscalingTargets} AutoscalingTargets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingTargets.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AutoscalingTargets(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.cpuUtilizationPercent = reader.int32(); + break; + } + case 3: { + message.storageUtilizationGibPerNode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AutoscalingTargets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AutoscalingTargets} AutoscalingTargets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingTargets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoscalingTargets message. + * @function verify + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoscalingTargets.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.cpuUtilizationPercent != null && Object.hasOwnProperty.call(message, "cpuUtilizationPercent")) + if (!$util.isInteger(message.cpuUtilizationPercent)) + return "cpuUtilizationPercent: integer expected"; + if (message.storageUtilizationGibPerNode != null && Object.hasOwnProperty.call(message, "storageUtilizationGibPerNode")) + if (!$util.isInteger(message.storageUtilizationGibPerNode)) + return "storageUtilizationGibPerNode: integer expected"; + return null; + }; + + /** + * Creates an AutoscalingTargets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AutoscalingTargets} AutoscalingTargets + */ + AutoscalingTargets.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AutoscalingTargets) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AutoscalingTargets: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AutoscalingTargets(); + if (object.cpuUtilizationPercent != null) + message.cpuUtilizationPercent = object.cpuUtilizationPercent | 0; + if (object.storageUtilizationGibPerNode != null) + message.storageUtilizationGibPerNode = object.storageUtilizationGibPerNode | 0; + return message; + }; + + /** + * Creates a plain object from an AutoscalingTargets message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {google.bigtable.admin.v2.AutoscalingTargets} message AutoscalingTargets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoscalingTargets.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.cpuUtilizationPercent = 0; + object.storageUtilizationGibPerNode = 0; + } + if (message.cpuUtilizationPercent != null && Object.hasOwnProperty.call(message, "cpuUtilizationPercent")) + object.cpuUtilizationPercent = message.cpuUtilizationPercent; + if (message.storageUtilizationGibPerNode != null && Object.hasOwnProperty.call(message, "storageUtilizationGibPerNode")) + object.storageUtilizationGibPerNode = message.storageUtilizationGibPerNode; + return object; + }; + + /** + * Converts this AutoscalingTargets to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @instance + * @returns {Object.} JSON object + */ + AutoscalingTargets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoscalingTargets + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoscalingTargets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AutoscalingTargets"; + }; + + return AutoscalingTargets; + })(); + + v2.AutoscalingLimits = (function() { + + /** + * Properties of an AutoscalingLimits. + * @memberof google.bigtable.admin.v2 + * @interface IAutoscalingLimits + * @property {number|null} [minServeNodes] AutoscalingLimits minServeNodes + * @property {number|null} [maxServeNodes] AutoscalingLimits maxServeNodes + */ + + /** + * Constructs a new AutoscalingLimits. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an AutoscalingLimits. + * @implements IAutoscalingLimits + * @constructor + * @param {google.bigtable.admin.v2.IAutoscalingLimits=} [properties] Properties to set + */ + function AutoscalingLimits(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoscalingLimits minServeNodes. + * @member {number} minServeNodes + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @instance + */ + AutoscalingLimits.prototype.minServeNodes = 0; + + /** + * AutoscalingLimits maxServeNodes. + * @member {number} maxServeNodes + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @instance + */ + AutoscalingLimits.prototype.maxServeNodes = 0; + + /** + * Creates a new AutoscalingLimits instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {google.bigtable.admin.v2.IAutoscalingLimits=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AutoscalingLimits} AutoscalingLimits instance + */ + AutoscalingLimits.create = function create(properties) { + return new AutoscalingLimits(properties); + }; + + /** + * Encodes the specified AutoscalingLimits message. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingLimits.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {google.bigtable.admin.v2.IAutoscalingLimits} message AutoscalingLimits message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingLimits.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.minServeNodes != null && Object.hasOwnProperty.call(message, "minServeNodes")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minServeNodes); + if (message.maxServeNodes != null && Object.hasOwnProperty.call(message, "maxServeNodes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxServeNodes); + return writer; + }; + + /** + * Encodes the specified AutoscalingLimits message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingLimits.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {google.bigtable.admin.v2.IAutoscalingLimits} message AutoscalingLimits message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingLimits.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AutoscalingLimits message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @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.AutoscalingLimits} AutoscalingLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingLimits.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AutoscalingLimits(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.minServeNodes = reader.int32(); + break; + } + case 2: { + message.maxServeNodes = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AutoscalingLimits message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AutoscalingLimits} AutoscalingLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingLimits.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoscalingLimits message. + * @function verify + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoscalingLimits.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.minServeNodes != null && Object.hasOwnProperty.call(message, "minServeNodes")) + if (!$util.isInteger(message.minServeNodes)) + return "minServeNodes: integer expected"; + if (message.maxServeNodes != null && Object.hasOwnProperty.call(message, "maxServeNodes")) + if (!$util.isInteger(message.maxServeNodes)) + return "maxServeNodes: integer expected"; + return null; + }; + + /** + * Creates an AutoscalingLimits message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AutoscalingLimits} AutoscalingLimits + */ + AutoscalingLimits.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AutoscalingLimits) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AutoscalingLimits: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AutoscalingLimits(); + if (object.minServeNodes != null) + message.minServeNodes = object.minServeNodes | 0; + if (object.maxServeNodes != null) + message.maxServeNodes = object.maxServeNodes | 0; + return message; + }; + + /** + * Creates a plain object from an AutoscalingLimits message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {google.bigtable.admin.v2.AutoscalingLimits} message AutoscalingLimits + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoscalingLimits.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.minServeNodes = 0; + object.maxServeNodes = 0; + } + if (message.minServeNodes != null && Object.hasOwnProperty.call(message, "minServeNodes")) + object.minServeNodes = message.minServeNodes; + if (message.maxServeNodes != null && Object.hasOwnProperty.call(message, "maxServeNodes")) + object.maxServeNodes = message.maxServeNodes; + return object; + }; + + /** + * Converts this AutoscalingLimits to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @instance + * @returns {Object.} JSON object + */ + AutoscalingLimits.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoscalingLimits + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoscalingLimits.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AutoscalingLimits"; + }; + + return AutoscalingLimits; + })(); + + v2.Cluster = (function() { + + /** + * Properties of a Cluster. + * @memberof google.bigtable.admin.v2 + * @interface ICluster + * @property {string|null} [name] Cluster name + * @property {string|null} [location] Cluster location + * @property {google.bigtable.admin.v2.Cluster.State|null} [state] Cluster state + * @property {number|null} [serveNodes] Cluster serveNodes + * @property {google.bigtable.admin.v2.Cluster.NodeScalingFactor|null} [nodeScalingFactor] Cluster nodeScalingFactor + * @property {google.bigtable.admin.v2.Cluster.IClusterConfig|null} [clusterConfig] Cluster clusterConfig + * @property {google.bigtable.admin.v2.StorageType|null} [defaultStorageType] Cluster defaultStorageType + * @property {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null} [encryptionConfig] Cluster encryptionConfig + */ + + /** + * Constructs a new Cluster. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a Cluster. + * @implements ICluster + * @constructor + * @param {google.bigtable.admin.v2.ICluster=} [properties] Properties to set + */ + function Cluster(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Cluster name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.name = ""; + + /** + * Cluster location. + * @member {string} location + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.location = ""; + + /** + * Cluster state. + * @member {google.bigtable.admin.v2.Cluster.State} state + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.state = 0; + + /** + * Cluster serveNodes. + * @member {number} serveNodes + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.serveNodes = 0; + + /** + * Cluster nodeScalingFactor. + * @member {google.bigtable.admin.v2.Cluster.NodeScalingFactor} nodeScalingFactor + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.nodeScalingFactor = 0; + + /** + * Cluster clusterConfig. + * @member {google.bigtable.admin.v2.Cluster.IClusterConfig|null|undefined} clusterConfig + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.clusterConfig = null; + + /** + * Cluster defaultStorageType. + * @member {google.bigtable.admin.v2.StorageType} defaultStorageType + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.defaultStorageType = 0; + + /** + * Cluster encryptionConfig. + * @member {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.encryptionConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Cluster config. + * @member {"clusterConfig"|undefined} config + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["clusterConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Cluster instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {google.bigtable.admin.v2.ICluster=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster} Cluster instance + */ + Cluster.create = function create(properties) { + return new Cluster(properties); + }; + + /** + * Encodes the specified Cluster message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {google.bigtable.admin.v2.ICluster} message Cluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cluster.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.serveNodes != null && Object.hasOwnProperty.call(message, "serveNodes")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serveNodes); + if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.defaultStorageType); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.clusterConfig != null && Object.hasOwnProperty.call(message, "clusterConfig")) + $root.google.bigtable.admin.v2.Cluster.ClusterConfig.encode(message.clusterConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.nodeScalingFactor != null && Object.hasOwnProperty.call(message, "nodeScalingFactor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nodeScalingFactor); + return writer; + }; + + /** + * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {google.bigtable.admin.v2.ICluster} message Cluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cluster.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Cluster message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster + * @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.Cluster} Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cluster.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Cluster(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.serveNodes = reader.int32(); + break; + } + case 9: { + message.nodeScalingFactor = reader.int32(); + break; + } + case 7: { + message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.defaultStorageType = reader.int32(); + break; + } + case 6: { + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Cluster message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster} Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cluster.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cluster message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cluster.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.serveNodes != null && Object.hasOwnProperty.call(message, "serveNodes")) + if (!$util.isInteger(message.serveNodes)) + return "serveNodes: integer expected"; + if (message.nodeScalingFactor != null && Object.hasOwnProperty.call(message, "nodeScalingFactor")) + switch (message.nodeScalingFactor) { + default: + return "nodeScalingFactor: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.clusterConfig != null && Object.hasOwnProperty.call(message, "clusterConfig")) { + properties.config = 1; + { + var error = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.verify(message.clusterConfig, long + 1); + if (error) + return "clusterConfig." + error; + } + } + if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) + switch (message.defaultStorageType) { + default: + return "defaultStorageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) { + var error = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.verify(message.encryptionConfig, long + 1); + if (error) + return "encryptionConfig." + error; + } + return null; + }; + + /** + * Creates a Cluster message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster} Cluster + */ + Cluster.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Cluster: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Cluster(); + if (object.name != null) + message.name = String(object.name); + if (object.location != null) + message.location = String(object.location); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_NOT_KNOWN": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "RESIZING": + case 3: + message.state = 3; + break; + case "DISABLED": + case 4: + message.state = 4; + break; + } + if (object.serveNodes != null) + message.serveNodes = object.serveNodes | 0; + switch (object.nodeScalingFactor) { + default: + if (typeof object.nodeScalingFactor === "number") { + message.nodeScalingFactor = object.nodeScalingFactor; + break; + } + break; + case "NODE_SCALING_FACTOR_UNSPECIFIED": + case 0: + message.nodeScalingFactor = 0; + break; + case "NODE_SCALING_FACTOR_1X": + case 1: + message.nodeScalingFactor = 1; + break; + case "NODE_SCALING_FACTOR_2X": + case 2: + message.nodeScalingFactor = 2; + break; + } + if (object.clusterConfig != null) { + if (!$util.isObject(object.clusterConfig)) + throw TypeError(".google.bigtable.admin.v2.Cluster.clusterConfig: object expected"); + message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.fromObject(object.clusterConfig, long + 1); + } + switch (object.defaultStorageType) { + default: + if (typeof object.defaultStorageType === "number") { + message.defaultStorageType = object.defaultStorageType; + break; + } + break; + case "STORAGE_TYPE_UNSPECIFIED": + case 0: + message.defaultStorageType = 0; + break; + case "SSD": + case 1: + message.defaultStorageType = 1; + break; + case "HDD": + case 2: + message.defaultStorageType = 2; + break; + } + if (object.encryptionConfig != null) { + if (!$util.isObject(object.encryptionConfig)) + throw TypeError(".google.bigtable.admin.v2.Cluster.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.fromObject(object.encryptionConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Cluster message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {google.bigtable.admin.v2.Cluster} message Cluster + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cluster.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.location = ""; + object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; + object.serveNodes = 0; + object.defaultStorageType = options.enums === String ? "STORAGE_TYPE_UNSPECIFIED" : 0; + object.encryptionConfig = null; + object.nodeScalingFactor = options.enums === String ? "NODE_SCALING_FACTOR_UNSPECIFIED" : 0; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + object.location = message.location; + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.Cluster.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Cluster.State[message.state] : message.state; + if (message.serveNodes != null && Object.hasOwnProperty.call(message, "serveNodes")) + object.serveNodes = message.serveNodes; + if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) + object.defaultStorageType = options.enums === String ? $root.google.bigtable.admin.v2.StorageType[message.defaultStorageType] === undefined ? message.defaultStorageType : $root.google.bigtable.admin.v2.StorageType[message.defaultStorageType] : message.defaultStorageType; + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options, q + 1); + if (message.clusterConfig != null && Object.hasOwnProperty.call(message, "clusterConfig")) { + object.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.toObject(message.clusterConfig, options, q + 1); + if (options.oneofs) + object.config = "clusterConfig"; + } + if (message.nodeScalingFactor != null && Object.hasOwnProperty.call(message, "nodeScalingFactor")) + object.nodeScalingFactor = options.enums === String ? $root.google.bigtable.admin.v2.Cluster.NodeScalingFactor[message.nodeScalingFactor] === undefined ? message.nodeScalingFactor : $root.google.bigtable.admin.v2.Cluster.NodeScalingFactor[message.nodeScalingFactor] : message.nodeScalingFactor; + return object; + }; + + /** + * Converts this Cluster to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster + * @instance + * @returns {Object.} JSON object + */ + Cluster.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cluster + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Cluster"; + }; + + /** + * State enum. + * @name google.bigtable.admin.v2.Cluster.State + * @enum {number} + * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} RESIZING=3 RESIZING value + * @property {number} DISABLED=4 DISABLED value + */ + Cluster.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "RESIZING"] = 3; + values[valuesById[4] = "DISABLED"] = 4; + return values; + })(); + + /** + * NodeScalingFactor enum. + * @name google.bigtable.admin.v2.Cluster.NodeScalingFactor + * @enum {number} + * @property {number} NODE_SCALING_FACTOR_UNSPECIFIED=0 NODE_SCALING_FACTOR_UNSPECIFIED value + * @property {number} NODE_SCALING_FACTOR_1X=1 NODE_SCALING_FACTOR_1X value + * @property {number} NODE_SCALING_FACTOR_2X=2 NODE_SCALING_FACTOR_2X value + */ + Cluster.NodeScalingFactor = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NODE_SCALING_FACTOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "NODE_SCALING_FACTOR_1X"] = 1; + values[valuesById[2] = "NODE_SCALING_FACTOR_2X"] = 2; + return values; + })(); + + Cluster.ClusterAutoscalingConfig = (function() { + + /** + * Properties of a ClusterAutoscalingConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @interface IClusterAutoscalingConfig + * @property {google.bigtable.admin.v2.IAutoscalingLimits|null} [autoscalingLimits] ClusterAutoscalingConfig autoscalingLimits + * @property {google.bigtable.admin.v2.IAutoscalingTargets|null} [autoscalingTargets] ClusterAutoscalingConfig autoscalingTargets + */ + + /** + * Constructs a new ClusterAutoscalingConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @classdesc Represents a ClusterAutoscalingConfig. + * @implements IClusterAutoscalingConfig + * @constructor + * @param {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig=} [properties] Properties to set + */ + function ClusterAutoscalingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterAutoscalingConfig autoscalingLimits. + * @member {google.bigtable.admin.v2.IAutoscalingLimits|null|undefined} autoscalingLimits + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @instance + */ + ClusterAutoscalingConfig.prototype.autoscalingLimits = null; + + /** + * ClusterAutoscalingConfig autoscalingTargets. + * @member {google.bigtable.admin.v2.IAutoscalingTargets|null|undefined} autoscalingTargets + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @instance + */ + ClusterAutoscalingConfig.prototype.autoscalingTargets = null; + + /** + * Creates a new ClusterAutoscalingConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} ClusterAutoscalingConfig instance + */ + ClusterAutoscalingConfig.create = function create(properties) { + return new ClusterAutoscalingConfig(properties); + }; + + /** + * Encodes the specified ClusterAutoscalingConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig} message ClusterAutoscalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterAutoscalingConfig.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.autoscalingLimits != null && Object.hasOwnProperty.call(message, "autoscalingLimits")) + $root.google.bigtable.admin.v2.AutoscalingLimits.encode(message.autoscalingLimits, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.autoscalingTargets != null && Object.hasOwnProperty.call(message, "autoscalingTargets")) + $root.google.bigtable.admin.v2.AutoscalingTargets.encode(message.autoscalingTargets, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterAutoscalingConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig} message ClusterAutoscalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterAutoscalingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ClusterAutoscalingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @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.Cluster.ClusterAutoscalingConfig} ClusterAutoscalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterAutoscalingConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterAutoscalingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} ClusterAutoscalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterAutoscalingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterAutoscalingConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterAutoscalingConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.autoscalingLimits != null && Object.hasOwnProperty.call(message, "autoscalingLimits")) { + var error = $root.google.bigtable.admin.v2.AutoscalingLimits.verify(message.autoscalingLimits, long + 1); + if (error) + return "autoscalingLimits." + error; + } + if (message.autoscalingTargets != null && Object.hasOwnProperty.call(message, "autoscalingTargets")) { + var error = $root.google.bigtable.admin.v2.AutoscalingTargets.verify(message.autoscalingTargets, long + 1); + if (error) + return "autoscalingTargets." + error; + } + return null; + }; + + /** + * Creates a ClusterAutoscalingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} ClusterAutoscalingConfig + */ + ClusterAutoscalingConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig(); + if (object.autoscalingLimits != null) { + if (!$util.isObject(object.autoscalingLimits)) + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingLimits: object expected"); + message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.fromObject(object.autoscalingLimits, long + 1); + } + if (object.autoscalingTargets != null) { + if (!$util.isObject(object.autoscalingTargets)) + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingTargets: object expected"); + message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.fromObject(object.autoscalingTargets, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ClusterAutoscalingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} message ClusterAutoscalingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterAutoscalingConfig.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.autoscalingLimits = null; + object.autoscalingTargets = null; + } + if (message.autoscalingLimits != null && Object.hasOwnProperty.call(message, "autoscalingLimits")) + object.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.toObject(message.autoscalingLimits, options, q + 1); + if (message.autoscalingTargets != null && Object.hasOwnProperty.call(message, "autoscalingTargets")) + object.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.toObject(message.autoscalingTargets, options, q + 1); + return object; + }; + + /** + * Converts this ClusterAutoscalingConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @instance + * @returns {Object.} JSON object + */ + ClusterAutoscalingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterAutoscalingConfig + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterAutoscalingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"; + }; + + return ClusterAutoscalingConfig; + })(); + + Cluster.ClusterConfig = (function() { + + /** + * Properties of a ClusterConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @interface IClusterConfig + * @property {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig|null} [clusterAutoscalingConfig] ClusterConfig clusterAutoscalingConfig + */ + + /** + * Constructs a new ClusterConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @classdesc Represents a ClusterConfig. + * @implements IClusterConfig + * @constructor + * @param {google.bigtable.admin.v2.Cluster.IClusterConfig=} [properties] Properties to set + */ + function ClusterConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterConfig clusterAutoscalingConfig. + * @member {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig|null|undefined} clusterAutoscalingConfig + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @instance + */ + ClusterConfig.prototype.clusterAutoscalingConfig = null; + + /** + * Creates a new ClusterConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster.ClusterConfig} ClusterConfig instance + */ + ClusterConfig.create = function create(properties) { + return new ClusterConfig(properties); + }; + + /** + * Encodes the specified ClusterConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterConfig} message ClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterConfig.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.clusterAutoscalingConfig != null && Object.hasOwnProperty.call(message, "clusterAutoscalingConfig")) + $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.encode(message.clusterAutoscalingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterConfig} message ClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ClusterConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @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.Cluster.ClusterConfig} ClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Cluster.ClusterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster.ClusterConfig} ClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.clusterAutoscalingConfig != null && Object.hasOwnProperty.call(message, "clusterAutoscalingConfig")) { + var error = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify(message.clusterAutoscalingConfig, long + 1); + if (error) + return "clusterAutoscalingConfig." + error; + } + return null; + }; + + /** + * Creates a ClusterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster.ClusterConfig} ClusterConfig + */ + ClusterConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterConfig) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterConfig: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Cluster.ClusterConfig(); + if (object.clusterAutoscalingConfig != null) { + if (!$util.isObject(object.clusterAutoscalingConfig)) + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterConfig.clusterAutoscalingConfig: object expected"); + message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.fromObject(object.clusterAutoscalingConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ClusterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.ClusterConfig} message ClusterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterConfig.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.clusterAutoscalingConfig = null; + if (message.clusterAutoscalingConfig != null && Object.hasOwnProperty.call(message, "clusterAutoscalingConfig")) + object.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.toObject(message.clusterAutoscalingConfig, options, q + 1); + return object; + }; + + /** + * Converts this ClusterConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @instance + * @returns {Object.} JSON object + */ + ClusterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterConfig + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Cluster.ClusterConfig"; + }; + + return ClusterConfig; + })(); + + Cluster.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @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.Cluster.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Cluster.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kmsKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.EncryptionConfig) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Cluster.EncryptionConfig: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Cluster.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Cluster.EncryptionConfig"; + }; + + return EncryptionConfig; + })(); + + return Cluster; + })(); + + v2.AppProfile = (function() { + + /** + * Properties of an AppProfile. + * @memberof google.bigtable.admin.v2 + * @interface IAppProfile + * @property {string|null} [name] AppProfile name + * @property {string|null} [etag] AppProfile etag + * @property {string|null} [description] AppProfile description + * @property {google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny|null} [multiClusterRoutingUseAny] AppProfile multiClusterRoutingUseAny + * @property {google.bigtable.admin.v2.AppProfile.ISingleClusterRouting|null} [singleClusterRouting] AppProfile singleClusterRouting + * @property {google.bigtable.admin.v2.AppProfile.Priority|null} [priority] AppProfile priority + * @property {google.bigtable.admin.v2.AppProfile.IStandardIsolation|null} [standardIsolation] AppProfile standardIsolation + * @property {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly|null} [dataBoostIsolationReadOnly] AppProfile dataBoostIsolationReadOnly + */ + + /** + * Constructs a new AppProfile. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an AppProfile. + * @implements IAppProfile + * @constructor + * @param {google.bigtable.admin.v2.IAppProfile=} [properties] Properties to set + */ + function AppProfile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppProfile name. + * @member {string} name + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.name = ""; + + /** + * AppProfile etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.etag = ""; + + /** + * AppProfile description. + * @member {string} description + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.description = ""; + + /** + * AppProfile multiClusterRoutingUseAny. + * @member {google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny|null|undefined} multiClusterRoutingUseAny + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.multiClusterRoutingUseAny = null; + + /** + * AppProfile singleClusterRouting. + * @member {google.bigtable.admin.v2.AppProfile.ISingleClusterRouting|null|undefined} singleClusterRouting + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.singleClusterRouting = null; + + /** + * AppProfile priority. + * @member {google.bigtable.admin.v2.AppProfile.Priority|null|undefined} priority + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.priority = null; + + /** + * AppProfile standardIsolation. + * @member {google.bigtable.admin.v2.AppProfile.IStandardIsolation|null|undefined} standardIsolation + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.standardIsolation = null; + + /** + * AppProfile dataBoostIsolationReadOnly. + * @member {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly|null|undefined} dataBoostIsolationReadOnly + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.dataBoostIsolationReadOnly = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AppProfile routingPolicy. + * @member {"multiClusterRoutingUseAny"|"singleClusterRouting"|undefined} routingPolicy + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + Object.defineProperty(AppProfile.prototype, "routingPolicy", { + get: $util.oneOfGetter($oneOfFields = ["multiClusterRoutingUseAny", "singleClusterRouting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AppProfile isolation. + * @member {"priority"|"standardIsolation"|"dataBoostIsolationReadOnly"|undefined} isolation + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + Object.defineProperty(AppProfile.prototype, "isolation", { + get: $util.oneOfGetter($oneOfFields = ["priority", "standardIsolation", "dataBoostIsolationReadOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AppProfile instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AppProfile + * @static + * @param {google.bigtable.admin.v2.IAppProfile=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AppProfile} AppProfile instance + */ + AppProfile.create = function create(properties) { + return new AppProfile(properties); + }; + + /** + * Encodes the specified AppProfile message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AppProfile + * @static + * @param {google.bigtable.admin.v2.IAppProfile} message AppProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppProfile.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.multiClusterRoutingUseAny != null && Object.hasOwnProperty.call(message, "multiClusterRoutingUseAny")) + $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.encode(message.multiClusterRoutingUseAny, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.singleClusterRouting != null && Object.hasOwnProperty.call(message, "singleClusterRouting")) + $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.encode(message.singleClusterRouting, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.priority); + if (message.dataBoostIsolationReadOnly != null && Object.hasOwnProperty.call(message, "dataBoostIsolationReadOnly")) + $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.encode(message.dataBoostIsolationReadOnly, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); + if (message.standardIsolation != null && Object.hasOwnProperty.call(message, "standardIsolation")) + $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.encode(message.standardIsolation, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified AppProfile message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile + * @static + * @param {google.bigtable.admin.v2.IAppProfile} message AppProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AppProfile message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AppProfile + * @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.AppProfile} AppProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppProfile.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AppProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 5: { + message.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.priority = reader.int32(); + break; + } + case 11: { + message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AppProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AppProfile} AppProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppProfile message. + * @function verify + * @memberof google.bigtable.admin.v2.AppProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppProfile.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.multiClusterRoutingUseAny != null && Object.hasOwnProperty.call(message, "multiClusterRoutingUseAny")) { + properties.routingPolicy = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.verify(message.multiClusterRoutingUseAny, long + 1); + if (error) + return "multiClusterRoutingUseAny." + error; + } + } + if (message.singleClusterRouting != null && Object.hasOwnProperty.call(message, "singleClusterRouting")) { + if (properties.routingPolicy === 1) + return "routingPolicy: multiple values"; + properties.routingPolicy = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.verify(message.singleClusterRouting, long + 1); + if (error) + return "singleClusterRouting." + error; + } + } + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) { + properties.isolation = 1; + switch (message.priority) { + default: + return "priority: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.standardIsolation != null && Object.hasOwnProperty.call(message, "standardIsolation")) { + if (properties.isolation === 1) + return "isolation: multiple values"; + properties.isolation = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.verify(message.standardIsolation, long + 1); + if (error) + return "standardIsolation." + error; + } + } + if (message.dataBoostIsolationReadOnly != null && Object.hasOwnProperty.call(message, "dataBoostIsolationReadOnly")) { + if (properties.isolation === 1) + return "isolation: multiple values"; + properties.isolation = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify(message.dataBoostIsolationReadOnly, long + 1); + if (error) + return "dataBoostIsolationReadOnly." + error; + } + } + return null; + }; + + /** + * Creates an AppProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AppProfile + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AppProfile} AppProfile + */ + AppProfile.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AppProfile(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.description != null) + message.description = String(object.description); + if (object.multiClusterRoutingUseAny != null) { + if (!$util.isObject(object.multiClusterRoutingUseAny)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.multiClusterRoutingUseAny: object expected"); + message.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.fromObject(object.multiClusterRoutingUseAny, long + 1); + } + if (object.singleClusterRouting != null) { + if (!$util.isObject(object.singleClusterRouting)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.singleClusterRouting: object expected"); + message.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.fromObject(object.singleClusterRouting, long + 1); + } + switch (object.priority) { + default: + if (typeof object.priority === "number") { + message.priority = object.priority; + break; + } + break; + case "PRIORITY_UNSPECIFIED": + case 0: + message.priority = 0; + break; + case "PRIORITY_LOW": + case 1: + message.priority = 1; + break; + case "PRIORITY_MEDIUM": + case 2: + message.priority = 2; + break; + case "PRIORITY_HIGH": + case 3: + message.priority = 3; + break; + } + if (object.standardIsolation != null) { + if (!$util.isObject(object.standardIsolation)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.standardIsolation: object expected"); + message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.fromObject(object.standardIsolation, long + 1); + } + if (object.dataBoostIsolationReadOnly != null) { + if (!$util.isObject(object.dataBoostIsolationReadOnly)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.dataBoostIsolationReadOnly: object expected"); + message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.fromObject(object.dataBoostIsolationReadOnly, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an AppProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AppProfile + * @static + * @param {google.bigtable.admin.v2.AppProfile} message AppProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppProfile.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.description = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.multiClusterRoutingUseAny != null && Object.hasOwnProperty.call(message, "multiClusterRoutingUseAny")) { + object.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.toObject(message.multiClusterRoutingUseAny, options, q + 1); + if (options.oneofs) + object.routingPolicy = "multiClusterRoutingUseAny"; + } + if (message.singleClusterRouting != null && Object.hasOwnProperty.call(message, "singleClusterRouting")) { + object.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.toObject(message.singleClusterRouting, options, q + 1); + if (options.oneofs) + object.routingPolicy = "singleClusterRouting"; + } + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) { + object.priority = options.enums === String ? $root.google.bigtable.admin.v2.AppProfile.Priority[message.priority] === undefined ? message.priority : $root.google.bigtable.admin.v2.AppProfile.Priority[message.priority] : message.priority; + if (options.oneofs) + object.isolation = "priority"; + } + if (message.dataBoostIsolationReadOnly != null && Object.hasOwnProperty.call(message, "dataBoostIsolationReadOnly")) { + object.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.toObject(message.dataBoostIsolationReadOnly, options, q + 1); + if (options.oneofs) + object.isolation = "dataBoostIsolationReadOnly"; + } + if (message.standardIsolation != null && Object.hasOwnProperty.call(message, "standardIsolation")) { + object.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.toObject(message.standardIsolation, options, q + 1); + if (options.oneofs) + object.isolation = "standardIsolation"; + } + return object; + }; + + /** + * Converts this AppProfile to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + * @returns {Object.} JSON object + */ + AppProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppProfile + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AppProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AppProfile"; + }; + + AppProfile.MultiClusterRoutingUseAny = (function() { + + /** + * Properties of a MultiClusterRoutingUseAny. + * @memberof google.bigtable.admin.v2.AppProfile + * @interface IMultiClusterRoutingUseAny + * @property {Array.|null} [clusterIds] MultiClusterRoutingUseAny clusterIds + * @property {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity|null} [rowAffinity] MultiClusterRoutingUseAny rowAffinity + */ + + /** + * Constructs a new MultiClusterRoutingUseAny. + * @memberof google.bigtable.admin.v2.AppProfile + * @classdesc Represents a MultiClusterRoutingUseAny. + * @implements IMultiClusterRoutingUseAny + * @constructor + * @param {google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny=} [properties] Properties to set + */ + function MultiClusterRoutingUseAny(properties) { + this.clusterIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MultiClusterRoutingUseAny clusterIds. + * @member {Array.} clusterIds + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @instance + */ + MultiClusterRoutingUseAny.prototype.clusterIds = $util.emptyArray; + + /** + * MultiClusterRoutingUseAny rowAffinity. + * @member {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity|null|undefined} rowAffinity + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @instance + */ + MultiClusterRoutingUseAny.prototype.rowAffinity = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MultiClusterRoutingUseAny affinity. + * @member {"rowAffinity"|undefined} affinity + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @instance + */ + Object.defineProperty(MultiClusterRoutingUseAny.prototype, "affinity", { + get: $util.oneOfGetter($oneOfFields = ["rowAffinity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MultiClusterRoutingUseAny instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @static + * @param {google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny} MultiClusterRoutingUseAny instance + */ + MultiClusterRoutingUseAny.create = function create(properties) { + return new MultiClusterRoutingUseAny(properties); + }; + + /** + * Encodes the specified MultiClusterRoutingUseAny message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @static + * @param {google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny} message MultiClusterRoutingUseAny message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiClusterRoutingUseAny.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.clusterIds != null && message.clusterIds.length) + for (var i = 0; i < message.clusterIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterIds[i]); + if (message.rowAffinity != null && Object.hasOwnProperty.call(message, "rowAffinity")) + $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.encode(message.rowAffinity, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified MultiClusterRoutingUseAny message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @static + * @param {google.bigtable.admin.v2.AppProfile.IMultiClusterRoutingUseAny} message MultiClusterRoutingUseAny message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiClusterRoutingUseAny.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MultiClusterRoutingUseAny message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @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.AppProfile.MultiClusterRoutingUseAny} MultiClusterRoutingUseAny + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiClusterRoutingUseAny.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.clusterIds && message.clusterIds.length)) + message.clusterIds = []; + message.clusterIds.push(reader.string()); + break; + } + case 3: { + message.rowAffinity = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MultiClusterRoutingUseAny message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny} MultiClusterRoutingUseAny + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiClusterRoutingUseAny.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiClusterRoutingUseAny message. + * @function verify + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiClusterRoutingUseAny.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.clusterIds != null && Object.hasOwnProperty.call(message, "clusterIds")) { + if (!Array.isArray(message.clusterIds)) + return "clusterIds: array expected"; + for (var i = 0; i < message.clusterIds.length; ++i) + if (!$util.isString(message.clusterIds[i])) + return "clusterIds: string[] expected"; + } + if (message.rowAffinity != null && Object.hasOwnProperty.call(message, "rowAffinity")) { + properties.affinity = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.verify(message.rowAffinity, long + 1); + if (error) + return "rowAffinity." + error; + } + } + return null; + }; + + /** + * Creates a MultiClusterRoutingUseAny message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny} MultiClusterRoutingUseAny + */ + MultiClusterRoutingUseAny.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny(); + if (object.clusterIds) { + if (!Array.isArray(object.clusterIds)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.clusterIds: array expected"); + message.clusterIds = []; + for (var i = 0; i < object.clusterIds.length; ++i) + message.clusterIds[i] = String(object.clusterIds[i]); + } + if (object.rowAffinity != null) { + if (!$util.isObject(object.rowAffinity)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.rowAffinity: object expected"); + message.rowAffinity = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.fromObject(object.rowAffinity, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MultiClusterRoutingUseAny message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @static + * @param {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny} message MultiClusterRoutingUseAny + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiClusterRoutingUseAny.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.clusterIds = []; + if (message.clusterIds && message.clusterIds.length) { + object.clusterIds = []; + for (var j = 0; j < message.clusterIds.length; ++j) + object.clusterIds[j] = message.clusterIds[j]; + } + if (message.rowAffinity != null && Object.hasOwnProperty.call(message, "rowAffinity")) { + object.rowAffinity = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.toObject(message.rowAffinity, options, q + 1); + if (options.oneofs) + object.affinity = "rowAffinity"; + } + return object; + }; + + /** + * Converts this MultiClusterRoutingUseAny to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @instance + * @returns {Object.} JSON object + */ + MultiClusterRoutingUseAny.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MultiClusterRoutingUseAny + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MultiClusterRoutingUseAny.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny"; + }; + + MultiClusterRoutingUseAny.RowAffinity = (function() { + + /** + * Properties of a RowAffinity. + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @interface IRowAffinity + */ + + /** + * Constructs a new RowAffinity. + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + * @classdesc Represents a RowAffinity. + * @implements IRowAffinity + * @constructor + * @param {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity=} [properties] Properties to set + */ + function RowAffinity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RowAffinity instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @static + * @param {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity} RowAffinity instance + */ + RowAffinity.create = function create(properties) { + return new RowAffinity(properties); + }; + + /** + * Encodes the specified RowAffinity message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @static + * @param {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity} message RowAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowAffinity.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified RowAffinity message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @static + * @param {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.IRowAffinity} message RowAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RowAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @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.AppProfile.MultiClusterRoutingUseAny.RowAffinity} RowAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowAffinity.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RowAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity} RowAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RowAffinity message. + * @function verify + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowAffinity.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a RowAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity} RowAffinity + */ + RowAffinity.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + return object; + return new $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity(); + }; + + /** + * Creates a plain object from a RowAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @static + * @param {google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity} message RowAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowAffinity.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RowAffinity to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @instance + * @returns {Object.} JSON object + */ + RowAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RowAffinity + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RowAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity"; + }; + + return RowAffinity; + })(); + + return MultiClusterRoutingUseAny; + })(); + + AppProfile.SingleClusterRouting = (function() { + + /** + * Properties of a SingleClusterRouting. + * @memberof google.bigtable.admin.v2.AppProfile + * @interface ISingleClusterRouting + * @property {string|null} [clusterId] SingleClusterRouting clusterId + * @property {boolean|null} [allowTransactionalWrites] SingleClusterRouting allowTransactionalWrites + */ + + /** + * Constructs a new SingleClusterRouting. + * @memberof google.bigtable.admin.v2.AppProfile + * @classdesc Represents a SingleClusterRouting. + * @implements ISingleClusterRouting + * @constructor + * @param {google.bigtable.admin.v2.AppProfile.ISingleClusterRouting=} [properties] Properties to set + */ + function SingleClusterRouting(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SingleClusterRouting clusterId. + * @member {string} clusterId + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @instance + */ + SingleClusterRouting.prototype.clusterId = ""; + + /** + * SingleClusterRouting allowTransactionalWrites. + * @member {boolean} allowTransactionalWrites + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @instance + */ + SingleClusterRouting.prototype.allowTransactionalWrites = false; + + /** + * Creates a new SingleClusterRouting instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @static + * @param {google.bigtable.admin.v2.AppProfile.ISingleClusterRouting=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AppProfile.SingleClusterRouting} SingleClusterRouting instance + */ + SingleClusterRouting.create = function create(properties) { + return new SingleClusterRouting(properties); + }; + + /** + * Encodes the specified SingleClusterRouting message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.SingleClusterRouting.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @static + * @param {google.bigtable.admin.v2.AppProfile.ISingleClusterRouting} message SingleClusterRouting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleClusterRouting.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId); + if (message.allowTransactionalWrites != null && Object.hasOwnProperty.call(message, "allowTransactionalWrites")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowTransactionalWrites); + return writer; + }; + + /** + * Encodes the specified SingleClusterRouting message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.SingleClusterRouting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @static + * @param {google.bigtable.admin.v2.AppProfile.ISingleClusterRouting} message SingleClusterRouting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleClusterRouting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SingleClusterRouting message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @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.AppProfile.SingleClusterRouting} SingleClusterRouting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleClusterRouting.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.clusterId = reader.string(); + break; + } + case 2: { + message.allowTransactionalWrites = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SingleClusterRouting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AppProfile.SingleClusterRouting} SingleClusterRouting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleClusterRouting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SingleClusterRouting message. + * @function verify + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SingleClusterRouting.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.allowTransactionalWrites != null && Object.hasOwnProperty.call(message, "allowTransactionalWrites")) + if (typeof message.allowTransactionalWrites !== "boolean") + return "allowTransactionalWrites: boolean expected"; + return null; + }; + + /** + * Creates a SingleClusterRouting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AppProfile.SingleClusterRouting} SingleClusterRouting + */ + SingleClusterRouting.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.SingleClusterRouting: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting(); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.allowTransactionalWrites != null) + message.allowTransactionalWrites = Boolean(object.allowTransactionalWrites); + return message; + }; + + /** + * Creates a plain object from a SingleClusterRouting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @static + * @param {google.bigtable.admin.v2.AppProfile.SingleClusterRouting} message SingleClusterRouting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SingleClusterRouting.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.clusterId = ""; + object.allowTransactionalWrites = false; + } + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + object.clusterId = message.clusterId; + if (message.allowTransactionalWrites != null && Object.hasOwnProperty.call(message, "allowTransactionalWrites")) + object.allowTransactionalWrites = message.allowTransactionalWrites; + return object; + }; + + /** + * Converts this SingleClusterRouting to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @instance + * @returns {Object.} JSON object + */ + SingleClusterRouting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SingleClusterRouting + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AppProfile.SingleClusterRouting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SingleClusterRouting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AppProfile.SingleClusterRouting"; + }; + + return SingleClusterRouting; + })(); + + /** + * Priority enum. + * @name google.bigtable.admin.v2.AppProfile.Priority + * @enum {number} + * @property {number} PRIORITY_UNSPECIFIED=0 PRIORITY_UNSPECIFIED value + * @property {number} PRIORITY_LOW=1 PRIORITY_LOW value + * @property {number} PRIORITY_MEDIUM=2 PRIORITY_MEDIUM value + * @property {number} PRIORITY_HIGH=3 PRIORITY_HIGH value + */ + AppProfile.Priority = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIORITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIORITY_LOW"] = 1; + values[valuesById[2] = "PRIORITY_MEDIUM"] = 2; + values[valuesById[3] = "PRIORITY_HIGH"] = 3; + return values; + })(); + + AppProfile.StandardIsolation = (function() { + + /** + * Properties of a StandardIsolation. + * @memberof google.bigtable.admin.v2.AppProfile + * @interface IStandardIsolation + * @property {google.bigtable.admin.v2.AppProfile.Priority|null} [priority] StandardIsolation priority + */ + + /** + * Constructs a new StandardIsolation. + * @memberof google.bigtable.admin.v2.AppProfile + * @classdesc Represents a StandardIsolation. + * @implements IStandardIsolation + * @constructor + * @param {google.bigtable.admin.v2.AppProfile.IStandardIsolation=} [properties] Properties to set + */ + function StandardIsolation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StandardIsolation priority. + * @member {google.bigtable.admin.v2.AppProfile.Priority} priority + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @instance + */ + StandardIsolation.prototype.priority = 0; + + /** + * Creates a new StandardIsolation instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @static + * @param {google.bigtable.admin.v2.AppProfile.IStandardIsolation=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AppProfile.StandardIsolation} StandardIsolation instance + */ + StandardIsolation.create = function create(properties) { + return new StandardIsolation(properties); + }; + + /** + * Encodes the specified StandardIsolation message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.StandardIsolation.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @static + * @param {google.bigtable.admin.v2.AppProfile.IStandardIsolation} message StandardIsolation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardIsolation.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.priority); + return writer; + }; + + /** + * Encodes the specified StandardIsolation message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.StandardIsolation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @static + * @param {google.bigtable.admin.v2.AppProfile.IStandardIsolation} message StandardIsolation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardIsolation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a StandardIsolation message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @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.AppProfile.StandardIsolation} StandardIsolation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardIsolation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AppProfile.StandardIsolation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.priority = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StandardIsolation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AppProfile.StandardIsolation} StandardIsolation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardIsolation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardIsolation message. + * @function verify + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardIsolation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + switch (message.priority) { + default: + return "priority: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a StandardIsolation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AppProfile.StandardIsolation} StandardIsolation + */ + StandardIsolation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.StandardIsolation) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.StandardIsolation: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AppProfile.StandardIsolation(); + switch (object.priority) { + default: + if (typeof object.priority === "number") { + message.priority = object.priority; + break; + } + break; + case "PRIORITY_UNSPECIFIED": + case 0: + message.priority = 0; + break; + case "PRIORITY_LOW": + case 1: + message.priority = 1; + break; + case "PRIORITY_MEDIUM": + case 2: + message.priority = 2; + break; + case "PRIORITY_HIGH": + case 3: + message.priority = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a StandardIsolation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @static + * @param {google.bigtable.admin.v2.AppProfile.StandardIsolation} message StandardIsolation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardIsolation.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.priority = options.enums === String ? "PRIORITY_UNSPECIFIED" : 0; + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + object.priority = options.enums === String ? $root.google.bigtable.admin.v2.AppProfile.Priority[message.priority] === undefined ? message.priority : $root.google.bigtable.admin.v2.AppProfile.Priority[message.priority] : message.priority; + return object; + }; + + /** + * Converts this StandardIsolation to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @instance + * @returns {Object.} JSON object + */ + StandardIsolation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardIsolation + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AppProfile.StandardIsolation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardIsolation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AppProfile.StandardIsolation"; + }; + + return StandardIsolation; + })(); + + AppProfile.DataBoostIsolationReadOnly = (function() { + + /** + * Properties of a DataBoostIsolationReadOnly. + * @memberof google.bigtable.admin.v2.AppProfile + * @interface IDataBoostIsolationReadOnly + * @property {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null} [computeBillingOwner] DataBoostIsolationReadOnly computeBillingOwner + */ + + /** + * Constructs a new DataBoostIsolationReadOnly. + * @memberof google.bigtable.admin.v2.AppProfile + * @classdesc Represents a DataBoostIsolationReadOnly. + * @implements IDataBoostIsolationReadOnly + * @constructor + * @param {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly=} [properties] Properties to set + */ + function DataBoostIsolationReadOnly(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataBoostIsolationReadOnly computeBillingOwner. + * @member {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null|undefined} computeBillingOwner + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @instance + */ + DataBoostIsolationReadOnly.prototype.computeBillingOwner = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataBoostIsolationReadOnly.prototype, "_computeBillingOwner", { + get: $util.oneOfGetter($oneOfFields = ["computeBillingOwner"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataBoostIsolationReadOnly instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} DataBoostIsolationReadOnly instance + */ + DataBoostIsolationReadOnly.create = function create(properties) { + return new DataBoostIsolationReadOnly(properties); + }; + + /** + * Encodes the specified DataBoostIsolationReadOnly message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly} message DataBoostIsolationReadOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataBoostIsolationReadOnly.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.computeBillingOwner != null && Object.hasOwnProperty.call(message, "computeBillingOwner")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.computeBillingOwner); + return writer; + }; + + /** + * Encodes the specified DataBoostIsolationReadOnly message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly} message DataBoostIsolationReadOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataBoostIsolationReadOnly.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DataBoostIsolationReadOnly message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @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.AppProfile.DataBoostIsolationReadOnly} DataBoostIsolationReadOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataBoostIsolationReadOnly.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.computeBillingOwner = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataBoostIsolationReadOnly message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} DataBoostIsolationReadOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataBoostIsolationReadOnly.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataBoostIsolationReadOnly message. + * @function verify + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataBoostIsolationReadOnly.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.computeBillingOwner != null && Object.hasOwnProperty.call(message, "computeBillingOwner")) { + properties._computeBillingOwner = 1; + switch (message.computeBillingOwner) { + default: + return "computeBillingOwner: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a DataBoostIsolationReadOnly message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} DataBoostIsolationReadOnly + */ + DataBoostIsolationReadOnly.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly(); + switch (object.computeBillingOwner) { + default: + if (typeof object.computeBillingOwner === "number") { + message.computeBillingOwner = object.computeBillingOwner; + break; + } + break; + case "COMPUTE_BILLING_OWNER_UNSPECIFIED": + case 0: + message.computeBillingOwner = 0; + break; + case "HOST_PAYS": + case 1: + message.computeBillingOwner = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataBoostIsolationReadOnly message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} message DataBoostIsolationReadOnly + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataBoostIsolationReadOnly.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.computeBillingOwner != null && Object.hasOwnProperty.call(message, "computeBillingOwner")) { + object.computeBillingOwner = options.enums === String ? $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner[message.computeBillingOwner] === undefined ? message.computeBillingOwner : $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner[message.computeBillingOwner] : message.computeBillingOwner; + if (options.oneofs) + object._computeBillingOwner = "computeBillingOwner"; + } + return object; + }; + + /** + * Converts this DataBoostIsolationReadOnly to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @instance + * @returns {Object.} JSON object + */ + DataBoostIsolationReadOnly.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataBoostIsolationReadOnly + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataBoostIsolationReadOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"; + }; + + /** + * ComputeBillingOwner enum. + * @name google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner + * @enum {number} + * @property {number} COMPUTE_BILLING_OWNER_UNSPECIFIED=0 COMPUTE_BILLING_OWNER_UNSPECIFIED value + * @property {number} HOST_PAYS=1 HOST_PAYS value + */ + DataBoostIsolationReadOnly.ComputeBillingOwner = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPUTE_BILLING_OWNER_UNSPECIFIED"] = 0; + values[valuesById[1] = "HOST_PAYS"] = 1; + return values; + })(); + + return DataBoostIsolationReadOnly; + })(); + + return AppProfile; + })(); + + v2.HotTablet = (function() { + + /** + * Properties of a HotTablet. + * @memberof google.bigtable.admin.v2 + * @interface IHotTablet + * @property {string|null} [name] HotTablet name + * @property {string|null} [tableName] HotTablet tableName + * @property {google.protobuf.ITimestamp|null} [startTime] HotTablet startTime + * @property {google.protobuf.ITimestamp|null} [endTime] HotTablet endTime + * @property {string|null} [startKey] HotTablet startKey + * @property {string|null} [endKey] HotTablet endKey + * @property {number|null} [nodeCpuUsagePercent] HotTablet nodeCpuUsagePercent + */ + + /** + * Constructs a new HotTablet. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a HotTablet. + * @implements IHotTablet + * @constructor + * @param {google.bigtable.admin.v2.IHotTablet=} [properties] Properties to set + */ + function HotTablet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HotTablet name. + * @member {string} name + * @memberof google.bigtable.admin.v2.HotTablet + * @instance + */ + HotTablet.prototype.name = ""; + + /** + * HotTablet tableName. + * @member {string} tableName + * @memberof google.bigtable.admin.v2.HotTablet + * @instance + */ + HotTablet.prototype.tableName = ""; + + /** + * HotTablet startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.HotTablet + * @instance + */ + HotTablet.prototype.startTime = null; + + /** + * HotTablet endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.HotTablet + * @instance + */ + HotTablet.prototype.endTime = null; + + /** + * HotTablet startKey. + * @member {string} startKey + * @memberof google.bigtable.admin.v2.HotTablet + * @instance + */ + HotTablet.prototype.startKey = ""; + + /** + * HotTablet endKey. + * @member {string} endKey + * @memberof google.bigtable.admin.v2.HotTablet + * @instance + */ + HotTablet.prototype.endKey = ""; + + /** + * HotTablet nodeCpuUsagePercent. + * @member {number} nodeCpuUsagePercent + * @memberof google.bigtable.admin.v2.HotTablet + * @instance + */ + HotTablet.prototype.nodeCpuUsagePercent = 0; + + /** + * Creates a new HotTablet instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.HotTablet + * @static + * @param {google.bigtable.admin.v2.IHotTablet=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.HotTablet} HotTablet instance + */ + HotTablet.create = function create(properties) { + return new HotTablet(properties); + }; + + /** + * Encodes the specified HotTablet message. Does not implicitly {@link google.bigtable.admin.v2.HotTablet.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.HotTablet + * @static + * @param {google.bigtable.admin.v2.IHotTablet} message HotTablet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HotTablet.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableName); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.startKey != null && Object.hasOwnProperty.call(message, "startKey")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.startKey); + if (message.endKey != null && Object.hasOwnProperty.call(message, "endKey")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.endKey); + if (message.nodeCpuUsagePercent != null && Object.hasOwnProperty.call(message, "nodeCpuUsagePercent")) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.nodeCpuUsagePercent); + return writer; + }; + + /** + * Encodes the specified HotTablet message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.HotTablet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.HotTablet + * @static + * @param {google.bigtable.admin.v2.IHotTablet} message HotTablet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HotTablet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a HotTablet message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.HotTablet + * @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.HotTablet} HotTablet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HotTablet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.HotTablet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.tableName = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.startKey = reader.string(); + break; + } + case 6: { + message.endKey = reader.string(); + break; + } + case 7: { + message.nodeCpuUsagePercent = reader.float(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HotTablet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.HotTablet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.HotTablet} HotTablet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HotTablet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HotTablet message. + * @function verify + * @memberof google.bigtable.admin.v2.HotTablet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HotTablet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + if (message.startKey != null && Object.hasOwnProperty.call(message, "startKey")) + if (!$util.isString(message.startKey)) + return "startKey: string expected"; + if (message.endKey != null && Object.hasOwnProperty.call(message, "endKey")) + if (!$util.isString(message.endKey)) + return "endKey: string expected"; + if (message.nodeCpuUsagePercent != null && Object.hasOwnProperty.call(message, "nodeCpuUsagePercent")) + if (typeof message.nodeCpuUsagePercent !== "number") + return "nodeCpuUsagePercent: number expected"; + return null; + }; + + /** + * Creates a HotTablet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.HotTablet + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.HotTablet} HotTablet + */ + HotTablet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.HotTablet) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.HotTablet: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.HotTablet(); + if (object.name != null) + message.name = String(object.name); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.HotTablet.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.HotTablet.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + if (object.startKey != null) + message.startKey = String(object.startKey); + if (object.endKey != null) + message.endKey = String(object.endKey); + if (object.nodeCpuUsagePercent != null) + message.nodeCpuUsagePercent = Number(object.nodeCpuUsagePercent); + return message; + }; + + /** + * Creates a plain object from a HotTablet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.HotTablet + * @static + * @param {google.bigtable.admin.v2.HotTablet} message HotTablet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HotTablet.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.tableName = ""; + object.startTime = null; + object.endTime = null; + object.startKey = ""; + object.endKey = ""; + object.nodeCpuUsagePercent = 0; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.startKey != null && Object.hasOwnProperty.call(message, "startKey")) + object.startKey = message.startKey; + if (message.endKey != null && Object.hasOwnProperty.call(message, "endKey")) + object.endKey = message.endKey; + if (message.nodeCpuUsagePercent != null && Object.hasOwnProperty.call(message, "nodeCpuUsagePercent")) + object.nodeCpuUsagePercent = options.json && !isFinite(message.nodeCpuUsagePercent) ? String(message.nodeCpuUsagePercent) : message.nodeCpuUsagePercent; + return object; + }; + + /** + * Converts this HotTablet to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.HotTablet + * @instance + * @returns {Object.} JSON object + */ + HotTablet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HotTablet + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.HotTablet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HotTablet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.HotTablet"; + }; + + return HotTablet; + })(); + + v2.LogicalView = (function() { + + /** + * Properties of a LogicalView. + * @memberof google.bigtable.admin.v2 + * @interface ILogicalView + * @property {string|null} [name] LogicalView name + * @property {string|null} [query] LogicalView query + * @property {string|null} [etag] LogicalView etag + * @property {boolean|null} [deletionProtection] LogicalView deletionProtection + */ + + /** + * Constructs a new LogicalView. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a LogicalView. + * @implements ILogicalView + * @constructor + * @param {google.bigtable.admin.v2.ILogicalView=} [properties] Properties to set + */ + function LogicalView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogicalView name. + * @member {string} name + * @memberof google.bigtable.admin.v2.LogicalView + * @instance + */ + LogicalView.prototype.name = ""; + + /** + * LogicalView query. + * @member {string} query + * @memberof google.bigtable.admin.v2.LogicalView + * @instance + */ + LogicalView.prototype.query = ""; + + /** + * LogicalView etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.LogicalView + * @instance + */ + LogicalView.prototype.etag = ""; + + /** + * LogicalView deletionProtection. + * @member {boolean} deletionProtection + * @memberof google.bigtable.admin.v2.LogicalView + * @instance + */ + LogicalView.prototype.deletionProtection = false; + + /** + * Creates a new LogicalView instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.LogicalView + * @static + * @param {google.bigtable.admin.v2.ILogicalView=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.LogicalView} LogicalView instance + */ + LogicalView.create = function create(properties) { + return new LogicalView(properties); + }; + + /** + * Encodes the specified LogicalView message. Does not implicitly {@link google.bigtable.admin.v2.LogicalView.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.LogicalView + * @static + * @param {google.bigtable.admin.v2.ILogicalView} message LogicalView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogicalView.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deletionProtection); + return writer; + }; + + /** + * Encodes the specified LogicalView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.LogicalView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.LogicalView + * @static + * @param {google.bigtable.admin.v2.ILogicalView} message LogicalView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogicalView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a LogicalView message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.LogicalView + * @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.LogicalView} LogicalView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogicalView.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.LogicalView(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.query = reader.string(); + break; + } + case 3: { + message.etag = reader.string(); + break; + } + case 6: { + message.deletionProtection = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LogicalView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.LogicalView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.LogicalView} LogicalView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogicalView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogicalView message. + * @function verify + * @memberof google.bigtable.admin.v2.LogicalView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogicalView.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + return null; + }; + + /** + * Creates a LogicalView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.LogicalView + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.LogicalView} LogicalView + */ + LogicalView.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.LogicalView) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.LogicalView: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.LogicalView(); + if (object.name != null) + message.name = String(object.name); + if (object.query != null) + message.query = String(object.query); + if (object.etag != null) + message.etag = String(object.etag); + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + return message; + }; + + /** + * Creates a plain object from a LogicalView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.LogicalView + * @static + * @param {google.bigtable.admin.v2.LogicalView} message LogicalView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogicalView.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.query = ""; + object.etag = ""; + object.deletionProtection = false; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + object.query = message.query; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + object.deletionProtection = message.deletionProtection; + return object; + }; + + /** + * Converts this LogicalView to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.LogicalView + * @instance + * @returns {Object.} JSON object + */ + LogicalView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LogicalView + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.LogicalView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogicalView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.LogicalView"; + }; + + return LogicalView; + })(); + + v2.MaterializedView = (function() { + + /** + * Properties of a MaterializedView. + * @memberof google.bigtable.admin.v2 + * @interface IMaterializedView + * @property {string|null} [name] MaterializedView name + * @property {string|null} [query] MaterializedView query + * @property {string|null} [etag] MaterializedView etag + * @property {boolean|null} [deletionProtection] MaterializedView deletionProtection + */ + + /** + * Constructs a new MaterializedView. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a MaterializedView. + * @implements IMaterializedView + * @constructor + * @param {google.bigtable.admin.v2.IMaterializedView=} [properties] Properties to set + */ + function MaterializedView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaterializedView name. + * @member {string} name + * @memberof google.bigtable.admin.v2.MaterializedView + * @instance + */ + MaterializedView.prototype.name = ""; + + /** + * MaterializedView query. + * @member {string} query + * @memberof google.bigtable.admin.v2.MaterializedView + * @instance + */ + MaterializedView.prototype.query = ""; + + /** + * MaterializedView etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.MaterializedView + * @instance + */ + MaterializedView.prototype.etag = ""; + + /** + * MaterializedView deletionProtection. + * @member {boolean} deletionProtection + * @memberof google.bigtable.admin.v2.MaterializedView + * @instance + */ + MaterializedView.prototype.deletionProtection = false; + + /** + * Creates a new MaterializedView instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.MaterializedView + * @static + * @param {google.bigtable.admin.v2.IMaterializedView=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.MaterializedView} MaterializedView instance + */ + MaterializedView.create = function create(properties) { + return new MaterializedView(properties); + }; + + /** + * Encodes the specified MaterializedView message. Does not implicitly {@link google.bigtable.admin.v2.MaterializedView.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.MaterializedView + * @static + * @param {google.bigtable.admin.v2.IMaterializedView} message MaterializedView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaterializedView.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deletionProtection); + return writer; + }; + + /** + * Encodes the specified MaterializedView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.MaterializedView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.MaterializedView + * @static + * @param {google.bigtable.admin.v2.IMaterializedView} message MaterializedView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaterializedView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MaterializedView message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.MaterializedView + * @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.MaterializedView} MaterializedView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaterializedView.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.MaterializedView(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.query = reader.string(); + break; + } + case 3: { + message.etag = reader.string(); + break; + } + case 6: { + message.deletionProtection = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MaterializedView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.MaterializedView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.MaterializedView} MaterializedView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaterializedView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaterializedView message. + * @function verify + * @memberof google.bigtable.admin.v2.MaterializedView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaterializedView.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + return null; + }; + + /** + * Creates a MaterializedView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.MaterializedView + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.MaterializedView} MaterializedView + */ + MaterializedView.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.MaterializedView) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.MaterializedView: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.MaterializedView(); + if (object.name != null) + message.name = String(object.name); + if (object.query != null) + message.query = String(object.query); + if (object.etag != null) + message.etag = String(object.etag); + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + return message; + }; + + /** + * Creates a plain object from a MaterializedView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.MaterializedView + * @static + * @param {google.bigtable.admin.v2.MaterializedView} message MaterializedView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaterializedView.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.query = ""; + object.etag = ""; + object.deletionProtection = false; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + object.query = message.query; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + object.deletionProtection = message.deletionProtection; + return object; + }; + + /** + * Converts this MaterializedView to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.MaterializedView + * @instance + * @returns {Object.} JSON object + */ + MaterializedView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaterializedView + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.MaterializedView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaterializedView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.MaterializedView"; + }; + + return MaterializedView; + })(); + + /** + * StorageType enum. + * @name google.bigtable.admin.v2.StorageType + * @enum {number} + * @property {number} STORAGE_TYPE_UNSPECIFIED=0 STORAGE_TYPE_UNSPECIFIED value + * @property {number} SSD=1 SSD value + * @property {number} HDD=2 HDD value + */ + v2.StorageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SSD"] = 1; + values[valuesById[2] = "HDD"] = 2; + return values; + })(); + + v2.OperationProgress = (function() { + + /** + * Properties of an OperationProgress. + * @memberof google.bigtable.admin.v2 + * @interface IOperationProgress + * @property {number|null} [progressPercent] OperationProgress progressPercent + * @property {google.protobuf.ITimestamp|null} [startTime] OperationProgress startTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationProgress endTime + */ + + /** + * Constructs a new OperationProgress. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an OperationProgress. + * @implements IOperationProgress + * @constructor + * @param {google.bigtable.admin.v2.IOperationProgress=} [properties] Properties to set + */ + function OperationProgress(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationProgress progressPercent. + * @member {number} progressPercent + * @memberof google.bigtable.admin.v2.OperationProgress + * @instance + */ + OperationProgress.prototype.progressPercent = 0; + + /** + * OperationProgress startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.OperationProgress + * @instance + */ + OperationProgress.prototype.startTime = null; + + /** + * OperationProgress endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.OperationProgress + * @instance + */ + OperationProgress.prototype.endTime = null; + + /** + * Creates a new OperationProgress instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.OperationProgress + * @static + * @param {google.bigtable.admin.v2.IOperationProgress=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.OperationProgress} OperationProgress instance + */ + OperationProgress.create = function create(properties) { + return new OperationProgress(properties); + }; + + /** + * Encodes the specified OperationProgress message. Does not implicitly {@link google.bigtable.admin.v2.OperationProgress.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.OperationProgress + * @static + * @param {google.bigtable.admin.v2.IOperationProgress} message OperationProgress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationProgress.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.progressPercent); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.OperationProgress.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.OperationProgress + * @static + * @param {google.bigtable.admin.v2.IOperationProgress} message OperationProgress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationProgress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OperationProgress message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.OperationProgress + * @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.OperationProgress} OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationProgress.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.OperationProgress(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.progressPercent = reader.int32(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OperationProgress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.OperationProgress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.OperationProgress} OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationProgress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationProgress message. + * @function verify + * @memberof google.bigtable.admin.v2.OperationProgress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationProgress.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (!$util.isInteger(message.progressPercent)) + return "progressPercent: integer expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an OperationProgress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.OperationProgress + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.OperationProgress} OperationProgress + */ + OperationProgress.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.OperationProgress) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.OperationProgress: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.OperationProgress(); + if (object.progressPercent != null) + message.progressPercent = object.progressPercent | 0; + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.OperationProgress.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.OperationProgress.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.OperationProgress + * @static + * @param {google.bigtable.admin.v2.OperationProgress} message OperationProgress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationProgress.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.progressPercent = 0; + object.startTime = null; + object.endTime = null; + } + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + object.progressPercent = message.progressPercent; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this OperationProgress to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.OperationProgress + * @instance + * @returns {Object.} JSON object + */ + OperationProgress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationProgress + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.OperationProgress + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationProgress.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.OperationProgress"; + }; + + return OperationProgress; + })(); + + v2.BigtableTableAdmin = (function() { + + /** + * Constructs a new BigtableTableAdmin service. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a BigtableTableAdmin + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function BigtableTableAdmin(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (BigtableTableAdmin.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BigtableTableAdmin; + + /** + * Creates new BigtableTableAdmin service using the specified rpc implementation. + * @function create + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {BigtableTableAdmin} RPC service. Useful where requests and/or responses are streamed. + */ + BigtableTableAdmin.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createTable}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef CreateTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Table} [response] Table + */ + + /** + * Calls CreateTable. + * @function createTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateTableRequest} request CreateTableRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.CreateTableCallback} callback Node-style callback called with the error, if any, and Table + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.createTable = function createTable(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createTable, $root.google.bigtable.admin.v2.CreateTableRequest, $root.google.bigtable.admin.v2.Table, request, callback); + }, "name", { value: "CreateTable" }); + + /** + * Calls CreateTable. + * @function createTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateTableRequest} request CreateTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createTableFromSnapshot}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef CreateTableFromSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateTableFromSnapshot. + * @function createTableFromSnapshot + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotRequest} request CreateTableFromSnapshotRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.createTableFromSnapshot = function createTableFromSnapshot(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createTableFromSnapshot, $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTableFromSnapshot" }); + + /** + * Calls CreateTableFromSnapshot. + * @function createTableFromSnapshot + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotRequest} request CreateTableFromSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listTables}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef ListTablesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListTablesResponse} [response] ListTablesResponse + */ + + /** + * Calls ListTables. + * @function listTables + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListTablesRequest} request ListTablesRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.ListTablesCallback} callback Node-style callback called with the error, if any, and ListTablesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.listTables = function listTables(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listTables, $root.google.bigtable.admin.v2.ListTablesRequest, $root.google.bigtable.admin.v2.ListTablesResponse, request, callback); + }, "name", { value: "ListTables" }); + + /** + * Calls ListTables. + * @function listTables + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListTablesRequest} request ListTablesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getTable}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef GetTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Table} [response] Table + */ + + /** + * Calls GetTable. + * @function getTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetTableRequest} request GetTableRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.GetTableCallback} callback Node-style callback called with the error, if any, and Table + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.getTable = function getTable(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getTable, $root.google.bigtable.admin.v2.GetTableRequest, $root.google.bigtable.admin.v2.Table, request, callback); + }, "name", { value: "GetTable" }); + + /** + * Calls GetTable. + * @function getTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetTableRequest} request GetTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateTable}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef UpdateTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateTable. + * @function updateTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateTableRequest} request UpdateTableRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.UpdateTableCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.updateTable = function updateTable(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateTable, $root.google.bigtable.admin.v2.UpdateTableRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTable" }); + + /** + * Calls UpdateTable. + * @function updateTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateTableRequest} request UpdateTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteTable}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef DeleteTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTable. + * @function deleteTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteTableRequest} request DeleteTableRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.DeleteTableCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.deleteTable = function deleteTable(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteTable, $root.google.bigtable.admin.v2.DeleteTableRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTable" }); + + /** + * Calls DeleteTable. + * @function deleteTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteTableRequest} request DeleteTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|undeleteTable}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef UndeleteTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UndeleteTable. + * @function undeleteTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUndeleteTableRequest} request UndeleteTableRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTableCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.undeleteTable = function undeleteTable(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, undeleteTable, $root.google.bigtable.admin.v2.UndeleteTableRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UndeleteTable" }); + + /** + * Calls UndeleteTable. + * @function undeleteTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUndeleteTableRequest} request UndeleteTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createAuthorizedView}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef CreateAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAuthorizedView. + * @function createAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest} request CreateAuthorizedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedViewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.createAuthorizedView = function createAuthorizedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createAuthorizedView, $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAuthorizedView" }); + + /** + * Calls CreateAuthorizedView. + * @function createAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest} request CreateAuthorizedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listAuthorizedViews}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef ListAuthorizedViewsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListAuthorizedViewsResponse} [response] ListAuthorizedViewsResponse + */ + + /** + * Calls ListAuthorizedViews. + * @function listAuthorizedViews + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest} request ListAuthorizedViewsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViewsCallback} callback Node-style callback called with the error, if any, and ListAuthorizedViewsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.listAuthorizedViews = function listAuthorizedViews(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listAuthorizedViews, $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest, $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse, request, callback); + }, "name", { value: "ListAuthorizedViews" }); + + /** + * Calls ListAuthorizedViews. + * @function listAuthorizedViews + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest} request ListAuthorizedViewsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getAuthorizedView}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef GetAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.AuthorizedView} [response] AuthorizedView + */ + + /** + * Calls GetAuthorizedView. + * @function getAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest} request GetAuthorizedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedViewCallback} callback Node-style callback called with the error, if any, and AuthorizedView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.getAuthorizedView = function getAuthorizedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getAuthorizedView, $root.google.bigtable.admin.v2.GetAuthorizedViewRequest, $root.google.bigtable.admin.v2.AuthorizedView, request, callback); + }, "name", { value: "GetAuthorizedView" }); + + /** + * Calls GetAuthorizedView. + * @function getAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest} request GetAuthorizedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateAuthorizedView}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef UpdateAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAuthorizedView. + * @function updateAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest} request UpdateAuthorizedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedViewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.updateAuthorizedView = function updateAuthorizedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateAuthorizedView, $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAuthorizedView" }); + + /** + * Calls UpdateAuthorizedView. + * @function updateAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest} request UpdateAuthorizedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteAuthorizedView}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef DeleteAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAuthorizedView. + * @function deleteAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest} request DeleteAuthorizedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedViewCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.deleteAuthorizedView = function deleteAuthorizedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteAuthorizedView, $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAuthorizedView" }); + + /** + * Calls DeleteAuthorizedView. + * @function deleteAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest} request DeleteAuthorizedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|modifyColumnFamilies}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef ModifyColumnFamiliesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Table} [response] Table + */ + + /** + * Calls ModifyColumnFamilies. + * @function modifyColumnFamilies + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IModifyColumnFamiliesRequest} request ModifyColumnFamiliesRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamiliesCallback} callback Node-style callback called with the error, if any, and Table + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.modifyColumnFamilies = function modifyColumnFamilies(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, modifyColumnFamilies, $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest, $root.google.bigtable.admin.v2.Table, request, callback); + }, "name", { value: "ModifyColumnFamilies" }); + + /** + * Calls ModifyColumnFamilies. + * @function modifyColumnFamilies + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IModifyColumnFamiliesRequest} request ModifyColumnFamiliesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|dropRowRange}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef DropRowRangeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DropRowRange. + * @function dropRowRange + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDropRowRangeRequest} request DropRowRangeRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.DropRowRangeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.dropRowRange = function dropRowRange(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, dropRowRange, $root.google.bigtable.admin.v2.DropRowRangeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DropRowRange" }); + + /** + * Calls DropRowRange. + * @function dropRowRange + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDropRowRangeRequest} request DropRowRangeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|generateConsistencyToken}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef GenerateConsistencyTokenCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.GenerateConsistencyTokenResponse} [response] GenerateConsistencyTokenResponse + */ + + /** + * Calls GenerateConsistencyToken. + * @function generateConsistencyToken + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenRequest} request GenerateConsistencyTokenRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyTokenCallback} callback Node-style callback called with the error, if any, and GenerateConsistencyTokenResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.generateConsistencyToken = function generateConsistencyToken(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, generateConsistencyToken, $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest, $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse, request, callback); + }, "name", { value: "GenerateConsistencyToken" }); + + /** + * Calls GenerateConsistencyToken. + * @function generateConsistencyToken + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenRequest} request GenerateConsistencyTokenRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|checkConsistency}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef CheckConsistencyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.CheckConsistencyResponse} [response] CheckConsistencyResponse + */ + + /** + * Calls CheckConsistency. + * @function checkConsistency + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICheckConsistencyRequest} request CheckConsistencyRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistencyCallback} callback Node-style callback called with the error, if any, and CheckConsistencyResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.checkConsistency = function checkConsistency(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, checkConsistency, $root.google.bigtable.admin.v2.CheckConsistencyRequest, $root.google.bigtable.admin.v2.CheckConsistencyResponse, request, callback); + }, "name", { value: "CheckConsistency" }); + + /** + * Calls CheckConsistency. + * @function checkConsistency + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICheckConsistencyRequest} request CheckConsistencyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|snapshotTable}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef SnapshotTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SnapshotTable. + * @function snapshotTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ISnapshotTableRequest} request SnapshotTableRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTableCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.snapshotTable = function snapshotTable(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, snapshotTable, $root.google.bigtable.admin.v2.SnapshotTableRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SnapshotTable" }); + + /** + * Calls SnapshotTable. + * @function snapshotTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ISnapshotTableRequest} request SnapshotTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getSnapshot}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef GetSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Snapshot} [response] Snapshot + */ + + /** + * Calls GetSnapshot. + * @function getSnapshot + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetSnapshotRequest} request GetSnapshotRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshotCallback} callback Node-style callback called with the error, if any, and Snapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.getSnapshot = function getSnapshot(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getSnapshot, $root.google.bigtable.admin.v2.GetSnapshotRequest, $root.google.bigtable.admin.v2.Snapshot, request, callback); + }, "name", { value: "GetSnapshot" }); + + /** + * Calls GetSnapshot. + * @function getSnapshot + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetSnapshotRequest} request GetSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listSnapshots}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef ListSnapshotsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListSnapshotsResponse} [response] ListSnapshotsResponse + */ + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ListSnapshotsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.listSnapshots = function listSnapshots(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listSnapshots, $root.google.bigtable.admin.v2.ListSnapshotsRequest, $root.google.bigtable.admin.v2.ListSnapshotsResponse, request, callback); + }, "name", { value: "ListSnapshots" }); + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteSnapshot}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef DeleteSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSnapshot. + * @function deleteSnapshot + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshotCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.deleteSnapshot = function deleteSnapshot(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteSnapshot, $root.google.bigtable.admin.v2.DeleteSnapshotRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSnapshot" }); + + /** + * Calls DeleteSnapshot. + * @function deleteSnapshot + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createBackup}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef CreateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackup. + * @function createBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.CreateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.createBackup = function createBackup(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createBackup, $root.google.bigtable.admin.v2.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackup" }); + + /** + * Calls CreateBackup. + * @function createBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getBackup}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef GetBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Backup} [response] Backup + */ + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetBackupRequest} request GetBackupRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.getBackup = function getBackup(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getBackup, $root.google.bigtable.admin.v2.GetBackupRequest, $root.google.bigtable.admin.v2.Backup, request, callback); + }, "name", { value: "GetBackup" }); + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetBackupRequest} request GetBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateBackup}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef UpdateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.Backup} [response] Backup + */ + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.updateBackup = function updateBackup(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateBackup, $root.google.bigtable.admin.v2.UpdateBackupRequest, $root.google.bigtable.admin.v2.Backup, request, callback); + }, "name", { value: "UpdateBackup" }); + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteBackup}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef DeleteBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.deleteBackup = function deleteBackup(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteBackup, $root.google.bigtable.admin.v2.DeleteBackupRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteBackup" }); + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listBackups}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef ListBackupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListBackupsResponse} [response] ListBackupsResponse + */ + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListBackupsRequest} request ListBackupsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.listBackups = function listBackups(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listBackups, $root.google.bigtable.admin.v2.ListBackupsRequest, $root.google.bigtable.admin.v2.ListBackupsResponse, request, callback); + }, "name", { value: "ListBackups" }); + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListBackupsRequest} request ListBackupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|restoreTable}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef RestoreTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreTable. + * @function restoreTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IRestoreTableRequest} request RestoreTableRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.RestoreTableCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.restoreTable = function restoreTable(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, restoreTable, $root.google.bigtable.admin.v2.RestoreTableRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreTable" }); + + /** + * Calls RestoreTable. + * @function restoreTable + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IRestoreTableRequest} request RestoreTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|copyBackup}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef CopyBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CopyBackup. + * @function copyBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICopyBackupRequest} request CopyBackupRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.CopyBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.copyBackup = function copyBackup(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, copyBackup, $root.google.bigtable.admin.v2.CopyBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CopyBackup" }); + + /** + * Calls CopyBackup. + * @function copyBackup + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICopyBackupRequest} request CopyBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getIamPolicy}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|setIamPolicy}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|testIamPermissions}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createSchemaBundle}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef CreateSchemaBundleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateSchemaBundle. + * @function createSchemaBundle + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateSchemaBundleRequest} request CreateSchemaBundleRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundleCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.createSchemaBundle = function createSchemaBundle(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createSchemaBundle, $root.google.bigtable.admin.v2.CreateSchemaBundleRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateSchemaBundle" }); + + /** + * Calls CreateSchemaBundle. + * @function createSchemaBundle + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateSchemaBundleRequest} request CreateSchemaBundleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateSchemaBundle}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef UpdateSchemaBundleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateSchemaBundle. + * @function updateSchemaBundle + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleRequest} request UpdateSchemaBundleRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundleCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.updateSchemaBundle = function updateSchemaBundle(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateSchemaBundle, $root.google.bigtable.admin.v2.UpdateSchemaBundleRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateSchemaBundle" }); + + /** + * Calls UpdateSchemaBundle. + * @function updateSchemaBundle + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleRequest} request UpdateSchemaBundleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getSchemaBundle}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef GetSchemaBundleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.SchemaBundle} [response] SchemaBundle + */ + + /** + * Calls GetSchemaBundle. + * @function getSchemaBundle + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetSchemaBundleRequest} request GetSchemaBundleRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundleCallback} callback Node-style callback called with the error, if any, and SchemaBundle + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.getSchemaBundle = function getSchemaBundle(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getSchemaBundle, $root.google.bigtable.admin.v2.GetSchemaBundleRequest, $root.google.bigtable.admin.v2.SchemaBundle, request, callback); + }, "name", { value: "GetSchemaBundle" }); + + /** + * Calls GetSchemaBundle. + * @function getSchemaBundle + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetSchemaBundleRequest} request GetSchemaBundleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listSchemaBundles}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef ListSchemaBundlesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListSchemaBundlesResponse} [response] ListSchemaBundlesResponse + */ + + /** + * Calls ListSchemaBundles. + * @function listSchemaBundles + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListSchemaBundlesRequest} request ListSchemaBundlesRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundlesCallback} callback Node-style callback called with the error, if any, and ListSchemaBundlesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.listSchemaBundles = function listSchemaBundles(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listSchemaBundles, $root.google.bigtable.admin.v2.ListSchemaBundlesRequest, $root.google.bigtable.admin.v2.ListSchemaBundlesResponse, request, callback); + }, "name", { value: "ListSchemaBundles" }); + + /** + * Calls ListSchemaBundles. + * @function listSchemaBundles + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListSchemaBundlesRequest} request ListSchemaBundlesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteSchemaBundle}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef DeleteSchemaBundleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSchemaBundle. + * @function deleteSchemaBundle + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteSchemaBundleRequest} request DeleteSchemaBundleRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.deleteSchemaBundle = function deleteSchemaBundle(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteSchemaBundle, $root.google.bigtable.admin.v2.DeleteSchemaBundleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSchemaBundle" }); + + /** + * Calls DeleteSchemaBundle. + * @function deleteSchemaBundle + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteSchemaBundleRequest} request DeleteSchemaBundleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BigtableTableAdmin; + })(); + + v2.RestoreTableRequest = (function() { + + /** + * Properties of a RestoreTableRequest. + * @memberof google.bigtable.admin.v2 + * @interface IRestoreTableRequest + * @property {string|null} [parent] RestoreTableRequest parent + * @property {string|null} [tableId] RestoreTableRequest tableId + * @property {string|null} [backup] RestoreTableRequest backup + */ + + /** + * Constructs a new RestoreTableRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a RestoreTableRequest. + * @implements IRestoreTableRequest + * @constructor + * @param {google.bigtable.admin.v2.IRestoreTableRequest=} [properties] Properties to set + */ + function RestoreTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreTableRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @instance + */ + RestoreTableRequest.prototype.parent = ""; + + /** + * RestoreTableRequest tableId. + * @member {string} tableId + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @instance + */ + RestoreTableRequest.prototype.tableId = ""; + + /** + * RestoreTableRequest backup. + * @member {string|null|undefined} backup + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @instance + */ + RestoreTableRequest.prototype.backup = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreTableRequest source. + * @member {"backup"|undefined} source + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @instance + */ + Object.defineProperty(RestoreTableRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["backup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreTableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @static + * @param {google.bigtable.admin.v2.IRestoreTableRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.RestoreTableRequest} RestoreTableRequest instance + */ + RestoreTableRequest.create = function create(properties) { + return new RestoreTableRequest(properties); + }; + + /** + * Encodes the specified RestoreTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.RestoreTableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @static + * @param {google.bigtable.admin.v2.IRestoreTableRequest} message RestoreTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreTableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableId); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backup); + return writer; + }; + + /** + * Encodes the specified RestoreTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @static + * @param {google.bigtable.admin.v2.IRestoreTableRequest} message RestoreTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RestoreTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @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.RestoreTableRequest} RestoreTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreTableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.RestoreTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.tableId = reader.string(); + break; + } + case 3: { + message.backup = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.RestoreTableRequest} RestoreTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreTableRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreTableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) { + properties.source = 1; + if (!$util.isString(message.backup)) + return "backup: string expected"; + } + return null; + }; + + /** + * Creates a RestoreTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.RestoreTableRequest} RestoreTableRequest + */ + RestoreTableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.RestoreTableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.RestoreTableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.RestoreTableRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.backup != null) + message.backup = String(object.backup); + return message; + }; + + /** + * Creates a plain object from a RestoreTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @static + * @param {google.bigtable.admin.v2.RestoreTableRequest} message RestoreTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreTableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.tableId = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + object.tableId = message.tableId; + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) { + object.backup = message.backup; + if (options.oneofs) + object.source = "backup"; + } + return object; + }; + + /** + * Converts this RestoreTableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @instance + * @returns {Object.} JSON object + */ + RestoreTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreTableRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.RestoreTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.RestoreTableRequest"; + }; + + return RestoreTableRequest; + })(); + + v2.RestoreTableMetadata = (function() { + + /** + * Properties of a RestoreTableMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IRestoreTableMetadata + * @property {string|null} [name] RestoreTableMetadata name + * @property {google.bigtable.admin.v2.RestoreSourceType|null} [sourceType] RestoreTableMetadata sourceType + * @property {google.bigtable.admin.v2.IBackupInfo|null} [backupInfo] RestoreTableMetadata backupInfo + * @property {string|null} [optimizeTableOperationName] RestoreTableMetadata optimizeTableOperationName + * @property {google.bigtable.admin.v2.IOperationProgress|null} [progress] RestoreTableMetadata progress + */ + + /** + * Constructs a new RestoreTableMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a RestoreTableMetadata. + * @implements IRestoreTableMetadata + * @constructor + * @param {google.bigtable.admin.v2.IRestoreTableMetadata=} [properties] Properties to set + */ + function RestoreTableMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreTableMetadata name. + * @member {string} name + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @instance + */ + RestoreTableMetadata.prototype.name = ""; + + /** + * RestoreTableMetadata sourceType. + * @member {google.bigtable.admin.v2.RestoreSourceType} sourceType + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @instance + */ + RestoreTableMetadata.prototype.sourceType = 0; + + /** + * RestoreTableMetadata backupInfo. + * @member {google.bigtable.admin.v2.IBackupInfo|null|undefined} backupInfo + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @instance + */ + RestoreTableMetadata.prototype.backupInfo = null; + + /** + * RestoreTableMetadata optimizeTableOperationName. + * @member {string} optimizeTableOperationName + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @instance + */ + RestoreTableMetadata.prototype.optimizeTableOperationName = ""; + + /** + * RestoreTableMetadata progress. + * @member {google.bigtable.admin.v2.IOperationProgress|null|undefined} progress + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @instance + */ + RestoreTableMetadata.prototype.progress = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreTableMetadata sourceInfo. + * @member {"backupInfo"|undefined} sourceInfo + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @instance + */ + Object.defineProperty(RestoreTableMetadata.prototype, "sourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["backupInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreTableMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @static + * @param {google.bigtable.admin.v2.IRestoreTableMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.RestoreTableMetadata} RestoreTableMetadata instance + */ + RestoreTableMetadata.create = function create(properties) { + return new RestoreTableMetadata(properties); + }; + + /** + * Encodes the specified RestoreTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.RestoreTableMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @static + * @param {google.bigtable.admin.v2.IRestoreTableMetadata} message RestoreTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreTableMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sourceType); + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) + $root.google.bigtable.admin.v2.BackupInfo.encode(message.backupInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.optimizeTableOperationName != null && Object.hasOwnProperty.call(message, "optimizeTableOperationName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.optimizeTableOperationName); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreTableMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @static + * @param {google.bigtable.admin.v2.IRestoreTableMetadata} message RestoreTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RestoreTableMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @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.RestoreTableMetadata} RestoreTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreTableMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.RestoreTableMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceType = reader.int32(); + break; + } + case 3: { + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.optimizeTableOperationName = reader.string(); + break; + } + case 5: { + message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreTableMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.RestoreTableMetadata} RestoreTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreTableMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreTableMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreTableMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + break; + } + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) { + properties.sourceInfo = 1; + { + var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo, long + 1); + if (error) + return "backupInfo." + error; + } + } + if (message.optimizeTableOperationName != null && Object.hasOwnProperty.call(message, "optimizeTableOperationName")) + if (!$util.isString(message.optimizeTableOperationName)) + return "optimizeTableOperationName: string expected"; + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) { + var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress, long + 1); + if (error) + return "progress." + error; + } + return null; + }; + + /** + * Creates a RestoreTableMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.RestoreTableMetadata} RestoreTableMetadata + */ + RestoreTableMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.RestoreTableMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.RestoreTableMetadata(); + if (object.name != null) + message.name = String(object.name); + switch (object.sourceType) { + default: + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; + break; + } + break; + case "RESTORE_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.sourceType = 0; + break; + case "BACKUP": + case 1: + message.sourceType = 1; + break; + } + if (object.backupInfo != null) { + if (!$util.isObject(object.backupInfo)) + throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata.backupInfo: object expected"); + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo, long + 1); + } + if (object.optimizeTableOperationName != null) + message.optimizeTableOperationName = String(object.optimizeTableOperationName); + if (object.progress != null) { + if (!$util.isObject(object.progress)) + throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata.progress: object expected"); + message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RestoreTableMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @static + * @param {google.bigtable.admin.v2.RestoreTableMetadata} message RestoreTableMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreTableMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.sourceType = options.enums === String ? "RESTORE_SOURCE_TYPE_UNSPECIFIED" : 0; + object.optimizeTableOperationName = ""; + object.progress = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + object.sourceType = options.enums === String ? $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] === undefined ? message.sourceType : $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] : message.sourceType; + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) { + object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options, q + 1); + if (options.oneofs) + object.sourceInfo = "backupInfo"; + } + if (message.optimizeTableOperationName != null && Object.hasOwnProperty.call(message, "optimizeTableOperationName")) + object.optimizeTableOperationName = message.optimizeTableOperationName; + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options, q + 1); + return object; + }; + + /** + * Converts this RestoreTableMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @instance + * @returns {Object.} JSON object + */ + RestoreTableMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreTableMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.RestoreTableMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreTableMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.RestoreTableMetadata"; + }; + + return RestoreTableMetadata; + })(); + + v2.OptimizeRestoredTableMetadata = (function() { + + /** + * Properties of an OptimizeRestoredTableMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IOptimizeRestoredTableMetadata + * @property {string|null} [name] OptimizeRestoredTableMetadata name + * @property {google.bigtable.admin.v2.IOperationProgress|null} [progress] OptimizeRestoredTableMetadata progress + */ + + /** + * Constructs a new OptimizeRestoredTableMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an OptimizeRestoredTableMetadata. + * @implements IOptimizeRestoredTableMetadata + * @constructor + * @param {google.bigtable.admin.v2.IOptimizeRestoredTableMetadata=} [properties] Properties to set + */ + function OptimizeRestoredTableMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OptimizeRestoredTableMetadata name. + * @member {string} name + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @instance + */ + OptimizeRestoredTableMetadata.prototype.name = ""; + + /** + * OptimizeRestoredTableMetadata progress. + * @member {google.bigtable.admin.v2.IOperationProgress|null|undefined} progress + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @instance + */ + OptimizeRestoredTableMetadata.prototype.progress = null; + + /** + * Creates a new OptimizeRestoredTableMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @static + * @param {google.bigtable.admin.v2.IOptimizeRestoredTableMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.OptimizeRestoredTableMetadata} OptimizeRestoredTableMetadata instance + */ + OptimizeRestoredTableMetadata.create = function create(properties) { + return new OptimizeRestoredTableMetadata(properties); + }; + + /** + * Encodes the specified OptimizeRestoredTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.OptimizeRestoredTableMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @static + * @param {google.bigtable.admin.v2.IOptimizeRestoredTableMetadata} message OptimizeRestoredTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OptimizeRestoredTableMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified OptimizeRestoredTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.OptimizeRestoredTableMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @static + * @param {google.bigtable.admin.v2.IOptimizeRestoredTableMetadata} message OptimizeRestoredTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OptimizeRestoredTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OptimizeRestoredTableMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @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.OptimizeRestoredTableMetadata} OptimizeRestoredTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OptimizeRestoredTableMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.OptimizeRestoredTableMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OptimizeRestoredTableMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.OptimizeRestoredTableMetadata} OptimizeRestoredTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OptimizeRestoredTableMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OptimizeRestoredTableMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OptimizeRestoredTableMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) { + var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress, long + 1); + if (error) + return "progress." + error; + } + return null; + }; + + /** + * Creates an OptimizeRestoredTableMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.OptimizeRestoredTableMetadata} OptimizeRestoredTableMetadata + */ + OptimizeRestoredTableMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.OptimizeRestoredTableMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.OptimizeRestoredTableMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.OptimizeRestoredTableMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.progress != null) { + if (!$util.isObject(object.progress)) + throw TypeError(".google.bigtable.admin.v2.OptimizeRestoredTableMetadata.progress: object expected"); + message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OptimizeRestoredTableMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @static + * @param {google.bigtable.admin.v2.OptimizeRestoredTableMetadata} message OptimizeRestoredTableMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OptimizeRestoredTableMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.progress = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options, q + 1); + return object; + }; + + /** + * Converts this OptimizeRestoredTableMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @instance + * @returns {Object.} JSON object + */ + OptimizeRestoredTableMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OptimizeRestoredTableMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.OptimizeRestoredTableMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OptimizeRestoredTableMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.OptimizeRestoredTableMetadata"; + }; + + return OptimizeRestoredTableMetadata; + })(); + + v2.CreateTableRequest = (function() { + + /** + * Properties of a CreateTableRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateTableRequest + * @property {string|null} [parent] CreateTableRequest parent + * @property {string|null} [tableId] CreateTableRequest tableId + * @property {google.bigtable.admin.v2.ITable|null} [table] CreateTableRequest table + * @property {Array.|null} [initialSplits] CreateTableRequest initialSplits + */ + + /** + * Constructs a new CreateTableRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateTableRequest. + * @implements ICreateTableRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateTableRequest=} [properties] Properties to set + */ + function CreateTableRequest(properties) { + this.initialSplits = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTableRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @instance + */ + CreateTableRequest.prototype.parent = ""; + + /** + * CreateTableRequest tableId. + * @member {string} tableId + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @instance + */ + CreateTableRequest.prototype.tableId = ""; + + /** + * CreateTableRequest table. + * @member {google.bigtable.admin.v2.ITable|null|undefined} table + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @instance + */ + CreateTableRequest.prototype.table = null; + + /** + * CreateTableRequest initialSplits. + * @member {Array.} initialSplits + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @instance + */ + CreateTableRequest.prototype.initialSplits = $util.emptyArray; + + /** + * Creates a new CreateTableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @static + * @param {google.bigtable.admin.v2.ICreateTableRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateTableRequest} CreateTableRequest instance + */ + CreateTableRequest.create = function create(properties) { + return new CreateTableRequest(properties); + }; + + /** + * Encodes the specified CreateTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateTableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @static + * @param {google.bigtable.admin.v2.ICreateTableRequest} message CreateTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableId); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.bigtable.admin.v2.Table.encode(message.table, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.initialSplits != null && message.initialSplits.length) + for (var i = 0; i < message.initialSplits.length; ++i) + $root.google.bigtable.admin.v2.CreateTableRequest.Split.encode(message.initialSplits[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @static + * @param {google.bigtable.admin.v2.ICreateTableRequest} message CreateTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @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.CreateTableRequest} CreateTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.tableId = reader.string(); + break; + } + case 3: { + message.table = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + if (!(message.initialSplits && message.initialSplits.length)) + message.initialSplits = []; + message.initialSplits.push($root.google.bigtable.admin.v2.CreateTableRequest.Split.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateTableRequest} CreateTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTableRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.table != null && Object.hasOwnProperty.call(message, "table")) { + var error = $root.google.bigtable.admin.v2.Table.verify(message.table, long + 1); + if (error) + return "table." + error; + } + if (message.initialSplits != null && Object.hasOwnProperty.call(message, "initialSplits")) { + if (!Array.isArray(message.initialSplits)) + return "initialSplits: array expected"; + for (var i = 0; i < message.initialSplits.length; ++i) { + var error = $root.google.bigtable.admin.v2.CreateTableRequest.Split.verify(message.initialSplits[i], long + 1); + if (error) + return "initialSplits." + error; + } + } + return null; + }; + + /** + * Creates a CreateTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateTableRequest} CreateTableRequest + */ + CreateTableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateTableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateTableRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.table != null) { + if (!$util.isObject(object.table)) + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.table: object expected"); + message.table = $root.google.bigtable.admin.v2.Table.fromObject(object.table, long + 1); + } + if (object.initialSplits) { + if (!Array.isArray(object.initialSplits)) + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.initialSplits: array expected"); + message.initialSplits = []; + for (var i = 0; i < object.initialSplits.length; ++i) { + if (!$util.isObject(object.initialSplits[i])) + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.initialSplits: object expected"); + message.initialSplits[i] = $root.google.bigtable.admin.v2.CreateTableRequest.Split.fromObject(object.initialSplits[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a CreateTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @static + * @param {google.bigtable.admin.v2.CreateTableRequest} message CreateTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.initialSplits = []; + if (options.defaults) { + object.parent = ""; + object.tableId = ""; + object.table = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + object.tableId = message.tableId; + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options, q + 1); + if (message.initialSplits && message.initialSplits.length) { + object.initialSplits = []; + for (var j = 0; j < message.initialSplits.length; ++j) + object.initialSplits[j] = $root.google.bigtable.admin.v2.CreateTableRequest.Split.toObject(message.initialSplits[j], options, q + 1); + } + return object; + }; + + /** + * Converts this CreateTableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTableRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateTableRequest"; + }; + + CreateTableRequest.Split = (function() { + + /** + * Properties of a Split. + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @interface ISplit + * @property {Uint8Array|null} [key] Split key + */ + + /** + * Constructs a new Split. + * @memberof google.bigtable.admin.v2.CreateTableRequest + * @classdesc Represents a Split. + * @implements ISplit + * @constructor + * @param {google.bigtable.admin.v2.CreateTableRequest.ISplit=} [properties] Properties to set + */ + function Split(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Split key. + * @member {Uint8Array} key + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @instance + */ + Split.prototype.key = $util.newBuffer([]); + + /** + * Creates a new Split instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @static + * @param {google.bigtable.admin.v2.CreateTableRequest.ISplit=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateTableRequest.Split} Split instance + */ + Split.create = function create(properties) { + return new Split(properties); + }; + + /** + * Encodes the specified Split message. Does not implicitly {@link google.bigtable.admin.v2.CreateTableRequest.Split.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @static + * @param {google.bigtable.admin.v2.CreateTableRequest.ISplit} message Split message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Split.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified Split message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateTableRequest.Split.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @static + * @param {google.bigtable.admin.v2.CreateTableRequest.ISplit} message Split message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Split.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Split message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @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.CreateTableRequest.Split} Split + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Split.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateTableRequest.Split(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Split message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateTableRequest.Split} Split + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Split.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Split message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Split.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates a Split message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateTableRequest.Split} Split + */ + Split.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateTableRequest.Split) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.Split: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateTableRequest.Split(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length >= 0) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from a Split message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @static + * @param {google.bigtable.admin.v2.CreateTableRequest.Split} message Split + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Split.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this Split to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @instance + * @returns {Object.} JSON object + */ + Split.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Split + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateTableRequest.Split + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Split.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateTableRequest.Split"; + }; + + return Split; + })(); + + return CreateTableRequest; + })(); + + v2.CreateTableFromSnapshotRequest = (function() { + + /** + * Properties of a CreateTableFromSnapshotRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateTableFromSnapshotRequest + * @property {string|null} [parent] CreateTableFromSnapshotRequest parent + * @property {string|null} [tableId] CreateTableFromSnapshotRequest tableId + * @property {string|null} [sourceSnapshot] CreateTableFromSnapshotRequest sourceSnapshot + */ + + /** + * Constructs a new CreateTableFromSnapshotRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateTableFromSnapshotRequest. + * @implements ICreateTableFromSnapshotRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotRequest=} [properties] Properties to set + */ + function CreateTableFromSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTableFromSnapshotRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @instance + */ + CreateTableFromSnapshotRequest.prototype.parent = ""; + + /** + * CreateTableFromSnapshotRequest tableId. + * @member {string} tableId + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @instance + */ + CreateTableFromSnapshotRequest.prototype.tableId = ""; + + /** + * CreateTableFromSnapshotRequest sourceSnapshot. + * @member {string} sourceSnapshot + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @instance + */ + CreateTableFromSnapshotRequest.prototype.sourceSnapshot = ""; + + /** + * Creates a new CreateTableFromSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateTableFromSnapshotRequest} CreateTableFromSnapshotRequest instance + */ + CreateTableFromSnapshotRequest.create = function create(properties) { + return new CreateTableFromSnapshotRequest(properties); + }; + + /** + * Encodes the specified CreateTableFromSnapshotRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateTableFromSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotRequest} message CreateTableFromSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTableFromSnapshotRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableId); + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceSnapshot); + return writer; + }; + + /** + * Encodes the specified CreateTableFromSnapshotRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateTableFromSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotRequest} message CreateTableFromSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTableFromSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateTableFromSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @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.CreateTableFromSnapshotRequest} CreateTableFromSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTableFromSnapshotRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.tableId = reader.string(); + break; + } + case 3: { + message.sourceSnapshot = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTableFromSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateTableFromSnapshotRequest} CreateTableFromSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTableFromSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTableFromSnapshotRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTableFromSnapshotRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) + if (!$util.isString(message.sourceSnapshot)) + return "sourceSnapshot: string expected"; + return null; + }; + + /** + * Creates a CreateTableFromSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateTableFromSnapshotRequest} CreateTableFromSnapshotRequest + */ + CreateTableFromSnapshotRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.sourceSnapshot != null) + message.sourceSnapshot = String(object.sourceSnapshot); + return message; + }; + + /** + * Creates a plain object from a CreateTableFromSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.CreateTableFromSnapshotRequest} message CreateTableFromSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTableFromSnapshotRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.tableId = ""; + object.sourceSnapshot = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + object.tableId = message.tableId; + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) + object.sourceSnapshot = message.sourceSnapshot; + return object; + }; + + /** + * Converts this CreateTableFromSnapshotRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTableFromSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTableFromSnapshotRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTableFromSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateTableFromSnapshotRequest"; + }; + + return CreateTableFromSnapshotRequest; + })(); + + v2.DropRowRangeRequest = (function() { + + /** + * Properties of a DropRowRangeRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDropRowRangeRequest + * @property {string|null} [name] DropRowRangeRequest name + * @property {Uint8Array|null} [rowKeyPrefix] DropRowRangeRequest rowKeyPrefix + * @property {boolean|null} [deleteAllDataFromTable] DropRowRangeRequest deleteAllDataFromTable + */ + + /** + * Constructs a new DropRowRangeRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DropRowRangeRequest. + * @implements IDropRowRangeRequest + * @constructor + * @param {google.bigtable.admin.v2.IDropRowRangeRequest=} [properties] Properties to set + */ + function DropRowRangeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DropRowRangeRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @instance + */ + DropRowRangeRequest.prototype.name = ""; + + /** + * DropRowRangeRequest rowKeyPrefix. + * @member {Uint8Array|null|undefined} rowKeyPrefix + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @instance + */ + DropRowRangeRequest.prototype.rowKeyPrefix = null; + + /** + * DropRowRangeRequest deleteAllDataFromTable. + * @member {boolean|null|undefined} deleteAllDataFromTable + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @instance + */ + DropRowRangeRequest.prototype.deleteAllDataFromTable = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DropRowRangeRequest target. + * @member {"rowKeyPrefix"|"deleteAllDataFromTable"|undefined} target + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @instance + */ + Object.defineProperty(DropRowRangeRequest.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["rowKeyPrefix", "deleteAllDataFromTable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DropRowRangeRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @static + * @param {google.bigtable.admin.v2.IDropRowRangeRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DropRowRangeRequest} DropRowRangeRequest instance + */ + DropRowRangeRequest.create = function create(properties) { + return new DropRowRangeRequest(properties); + }; + + /** + * Encodes the specified DropRowRangeRequest message. Does not implicitly {@link google.bigtable.admin.v2.DropRowRangeRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @static + * @param {google.bigtable.admin.v2.IDropRowRangeRequest} message DropRowRangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropRowRangeRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.rowKeyPrefix != null && Object.hasOwnProperty.call(message, "rowKeyPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKeyPrefix); + if (message.deleteAllDataFromTable != null && Object.hasOwnProperty.call(message, "deleteAllDataFromTable")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deleteAllDataFromTable); + return writer; + }; + + /** + * Encodes the specified DropRowRangeRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DropRowRangeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @static + * @param {google.bigtable.admin.v2.IDropRowRangeRequest} message DropRowRangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropRowRangeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DropRowRangeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @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.DropRowRangeRequest} DropRowRangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropRowRangeRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DropRowRangeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.rowKeyPrefix = reader.bytes(); + break; + } + case 3: { + message.deleteAllDataFromTable = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DropRowRangeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DropRowRangeRequest} DropRowRangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropRowRangeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DropRowRangeRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DropRowRangeRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.rowKeyPrefix != null && Object.hasOwnProperty.call(message, "rowKeyPrefix")) { + properties.target = 1; + if (!(message.rowKeyPrefix && typeof message.rowKeyPrefix.length === "number" || $util.isString(message.rowKeyPrefix))) + return "rowKeyPrefix: buffer expected"; + } + if (message.deleteAllDataFromTable != null && Object.hasOwnProperty.call(message, "deleteAllDataFromTable")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (typeof message.deleteAllDataFromTable !== "boolean") + return "deleteAllDataFromTable: boolean expected"; + } + return null; + }; + + /** + * Creates a DropRowRangeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DropRowRangeRequest} DropRowRangeRequest + */ + DropRowRangeRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DropRowRangeRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DropRowRangeRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DropRowRangeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.rowKeyPrefix != null) + if (typeof object.rowKeyPrefix === "string") + $util.base64.decode(object.rowKeyPrefix, message.rowKeyPrefix = $util.newBuffer($util.base64.length(object.rowKeyPrefix)), 0); + else if (object.rowKeyPrefix.length >= 0) + message.rowKeyPrefix = object.rowKeyPrefix; + if (object.deleteAllDataFromTable != null) + message.deleteAllDataFromTable = Boolean(object.deleteAllDataFromTable); + return message; + }; + + /** + * Creates a plain object from a DropRowRangeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @static + * @param {google.bigtable.admin.v2.DropRowRangeRequest} message DropRowRangeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DropRowRangeRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.rowKeyPrefix != null && Object.hasOwnProperty.call(message, "rowKeyPrefix")) { + object.rowKeyPrefix = options.bytes === String ? $util.base64.encode(message.rowKeyPrefix, 0, message.rowKeyPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKeyPrefix) : message.rowKeyPrefix; + if (options.oneofs) + object.target = "rowKeyPrefix"; + } + if (message.deleteAllDataFromTable != null && Object.hasOwnProperty.call(message, "deleteAllDataFromTable")) { + object.deleteAllDataFromTable = message.deleteAllDataFromTable; + if (options.oneofs) + object.target = "deleteAllDataFromTable"; + } + return object; + }; + + /** + * Converts this DropRowRangeRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @instance + * @returns {Object.} JSON object + */ + DropRowRangeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DropRowRangeRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DropRowRangeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DropRowRangeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DropRowRangeRequest"; + }; + + return DropRowRangeRequest; + })(); + + v2.ListTablesRequest = (function() { + + /** + * Properties of a ListTablesRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListTablesRequest + * @property {string|null} [parent] ListTablesRequest parent + * @property {google.bigtable.admin.v2.Table.View|null} [view] ListTablesRequest view + * @property {number|null} [pageSize] ListTablesRequest pageSize + * @property {string|null} [pageToken] ListTablesRequest pageToken + */ + + /** + * Constructs a new ListTablesRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListTablesRequest. + * @implements IListTablesRequest + * @constructor + * @param {google.bigtable.admin.v2.IListTablesRequest=} [properties] Properties to set + */ + function ListTablesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTablesRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @instance + */ + ListTablesRequest.prototype.parent = ""; + + /** + * ListTablesRequest view. + * @member {google.bigtable.admin.v2.Table.View} view + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @instance + */ + ListTablesRequest.prototype.view = 0; + + /** + * ListTablesRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @instance + */ + ListTablesRequest.prototype.pageSize = 0; + + /** + * ListTablesRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @instance + */ + ListTablesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListTablesRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @static + * @param {google.bigtable.admin.v2.IListTablesRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListTablesRequest} ListTablesRequest instance + */ + ListTablesRequest.create = function create(properties) { + return new ListTablesRequest(properties); + }; + + /** + * Encodes the specified ListTablesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListTablesRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @static + * @param {google.bigtable.admin.v2.IListTablesRequest} message ListTablesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTablesRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListTablesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListTablesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @static + * @param {google.bigtable.admin.v2.IListTablesRequest} message ListTablesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTablesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListTablesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @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.ListTablesRequest} ListTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTablesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListTablesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + case 4: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListTablesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListTablesRequest} ListTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTablesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTablesRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTablesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 4: + break; + } + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListTablesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListTablesRequest} ListTablesRequest + */ + ListTablesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListTablesRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListTablesRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListTablesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "NAME_ONLY": + case 1: + message.view = 1; + break; + case "SCHEMA_VIEW": + case 2: + message.view = 2; + break; + case "REPLICATION_VIEW": + case 3: + message.view = 3; + break; + case "ENCRYPTION_VIEW": + case 5: + message.view = 5; + break; + case "FULL": + case 4: + message.view = 4; + break; + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListTablesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @static + * @param {google.bigtable.admin.v2.ListTablesRequest} message ListTablesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTablesRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + object.view = options.enums === String ? $root.google.bigtable.admin.v2.Table.View[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.Table.View[message.view] : message.view; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListTablesRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @instance + * @returns {Object.} JSON object + */ + ListTablesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTablesRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListTablesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTablesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListTablesRequest"; + }; + + return ListTablesRequest; + })(); + + v2.ListTablesResponse = (function() { + + /** + * Properties of a ListTablesResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListTablesResponse + * @property {Array.|null} [tables] ListTablesResponse tables + * @property {string|null} [nextPageToken] ListTablesResponse nextPageToken + */ + + /** + * Constructs a new ListTablesResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListTablesResponse. + * @implements IListTablesResponse + * @constructor + * @param {google.bigtable.admin.v2.IListTablesResponse=} [properties] Properties to set + */ + function ListTablesResponse(properties) { + this.tables = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTablesResponse tables. + * @member {Array.} tables + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @instance + */ + ListTablesResponse.prototype.tables = $util.emptyArray; + + /** + * ListTablesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @instance + */ + ListTablesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTablesResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @static + * @param {google.bigtable.admin.v2.IListTablesResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListTablesResponse} ListTablesResponse instance + */ + ListTablesResponse.create = function create(properties) { + return new ListTablesResponse(properties); + }; + + /** + * Encodes the specified ListTablesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListTablesResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @static + * @param {google.bigtable.admin.v2.IListTablesResponse} message ListTablesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTablesResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + $root.google.bigtable.admin.v2.Table.encode(message.tables[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListTablesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListTablesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @static + * @param {google.bigtable.admin.v2.IListTablesResponse} message ListTablesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTablesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListTablesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @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.ListTablesResponse} ListTablesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTablesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListTablesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push($root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListTablesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListTablesResponse} ListTablesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTablesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTablesResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTablesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) { + var error = $root.google.bigtable.admin.v2.Table.verify(message.tables[i], long + 1); + if (error) + return "tables." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTablesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListTablesResponse} ListTablesResponse + */ + ListTablesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListTablesResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListTablesResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListTablesResponse(); + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".google.bigtable.admin.v2.ListTablesResponse.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) { + if (!$util.isObject(object.tables[i])) + throw TypeError(".google.bigtable.admin.v2.ListTablesResponse.tables: object expected"); + message.tables[i] = $root.google.bigtable.admin.v2.Table.fromObject(object.tables[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTablesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @static + * @param {google.bigtable.admin.v2.ListTablesResponse} message ListTablesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTablesResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.tables = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = $root.google.bigtable.admin.v2.Table.toObject(message.tables[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTablesResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @instance + * @returns {Object.} JSON object + */ + ListTablesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTablesResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListTablesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTablesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListTablesResponse"; + }; + + return ListTablesResponse; + })(); + + v2.GetTableRequest = (function() { + + /** + * Properties of a GetTableRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetTableRequest + * @property {string|null} [name] GetTableRequest name + * @property {google.bigtable.admin.v2.Table.View|null} [view] GetTableRequest view + */ + + /** + * Constructs a new GetTableRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetTableRequest. + * @implements IGetTableRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetTableRequest=} [properties] Properties to set + */ + function GetTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTableRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetTableRequest + * @instance + */ + GetTableRequest.prototype.name = ""; + + /** + * GetTableRequest view. + * @member {google.bigtable.admin.v2.Table.View} view + * @memberof google.bigtable.admin.v2.GetTableRequest + * @instance + */ + GetTableRequest.prototype.view = 0; + + /** + * Creates a new GetTableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetTableRequest + * @static + * @param {google.bigtable.admin.v2.IGetTableRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetTableRequest} GetTableRequest instance + */ + GetTableRequest.create = function create(properties) { + return new GetTableRequest(properties); + }; + + /** + * Encodes the specified GetTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetTableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetTableRequest + * @static + * @param {google.bigtable.admin.v2.IGetTableRequest} message GetTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetTableRequest + * @static + * @param {google.bigtable.admin.v2.IGetTableRequest} message GetTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetTableRequest + * @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.GetTableRequest} GetTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetTableRequest} GetTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTableRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 4: + break; + } + return null; + }; + + /** + * Creates a GetTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetTableRequest} GetTableRequest + */ + GetTableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetTableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetTableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetTableRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "NAME_ONLY": + case 1: + message.view = 1; + break; + case "SCHEMA_VIEW": + case 2: + message.view = 2; + break; + case "REPLICATION_VIEW": + case 3: + message.view = 3; + break; + case "ENCRYPTION_VIEW": + case 5: + message.view = 5; + break; + case "FULL": + case 4: + message.view = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetTableRequest + * @static + * @param {google.bigtable.admin.v2.GetTableRequest} message GetTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + object.view = options.enums === String ? $root.google.bigtable.admin.v2.Table.View[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.Table.View[message.view] : message.view; + return object; + }; + + /** + * Converts this GetTableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetTableRequest + * @instance + * @returns {Object.} JSON object + */ + GetTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTableRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetTableRequest"; + }; + + return GetTableRequest; + })(); + + v2.UpdateTableRequest = (function() { + + /** + * Properties of an UpdateTableRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateTableRequest + * @property {google.bigtable.admin.v2.ITable|null} [table] UpdateTableRequest table + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTableRequest updateMask + * @property {boolean|null} [ignoreWarnings] UpdateTableRequest ignoreWarnings + */ + + /** + * Constructs a new UpdateTableRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateTableRequest. + * @implements IUpdateTableRequest + * @constructor + * @param {google.bigtable.admin.v2.IUpdateTableRequest=} [properties] Properties to set + */ + function UpdateTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateTableRequest table. + * @member {google.bigtable.admin.v2.ITable|null|undefined} table + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @instance + */ + UpdateTableRequest.prototype.table = null; + + /** + * UpdateTableRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @instance + */ + UpdateTableRequest.prototype.updateMask = null; + + /** + * UpdateTableRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @instance + */ + UpdateTableRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new UpdateTableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateTableRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateTableRequest} UpdateTableRequest instance + */ + UpdateTableRequest.create = function create(properties) { + return new UpdateTableRequest(properties); + }; + + /** + * Encodes the specified UpdateTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateTableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateTableRequest} message UpdateTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.bigtable.admin.v2.Table.encode(message.table, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); + return writer; + }; + + /** + * Encodes the specified UpdateTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateTableRequest} message UpdateTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @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.UpdateTableRequest} UpdateTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.table = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateTableRequest} UpdateTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTableRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.table != null && Object.hasOwnProperty.call(message, "table")) { + var error = $root.google.bigtable.admin.v2.Table.verify(message.table, long + 1); + if (error) + return "table." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; + return null; + }; + + /** + * Creates an UpdateTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateTableRequest} UpdateTableRequest + */ + UpdateTableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateTableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateTableRequest(); + if (object.table != null) { + if (!$util.isObject(object.table)) + throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest.table: object expected"); + message.table = $root.google.bigtable.admin.v2.Table.fromObject(object.table, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); + return message; + }; + + /** + * Creates a plain object from an UpdateTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @static + * @param {google.bigtable.admin.v2.UpdateTableRequest} message UpdateTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.table = null; + object.updateMask = null; + object.ignoreWarnings = false; + } + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; + return object; + }; + + /** + * Converts this UpdateTableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTableRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateTableRequest"; + }; + + return UpdateTableRequest; + })(); + + v2.UpdateTableMetadata = (function() { + + /** + * Properties of an UpdateTableMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateTableMetadata + * @property {string|null} [name] UpdateTableMetadata name + * @property {google.protobuf.ITimestamp|null} [startTime] UpdateTableMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UpdateTableMetadata endTime + */ + + /** + * Constructs a new UpdateTableMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateTableMetadata. + * @implements IUpdateTableMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateTableMetadata=} [properties] Properties to set + */ + function UpdateTableMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateTableMetadata name. + * @member {string} name + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @instance + */ + UpdateTableMetadata.prototype.name = ""; + + /** + * UpdateTableMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @instance + */ + UpdateTableMetadata.prototype.startTime = null; + + /** + * UpdateTableMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @instance + */ + UpdateTableMetadata.prototype.endTime = null; + + /** + * Creates a new UpdateTableMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateTableMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateTableMetadata} UpdateTableMetadata instance + */ + UpdateTableMetadata.create = function create(properties) { + return new UpdateTableMetadata(properties); + }; + + /** + * Encodes the specified UpdateTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateTableMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateTableMetadata} message UpdateTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTableMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateTableMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateTableMetadata} message UpdateTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateTableMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @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.UpdateTableMetadata} UpdateTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTableMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateTableMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTableMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateTableMetadata} UpdateTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTableMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTableMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTableMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an UpdateTableMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateTableMetadata} UpdateTableMetadata + */ + UpdateTableMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateTableMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateTableMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateTableMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateTableMetadata} message UpdateTableMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTableMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this UpdateTableMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateTableMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTableMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateTableMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTableMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateTableMetadata"; + }; + + return UpdateTableMetadata; + })(); + + v2.DeleteTableRequest = (function() { + + /** + * Properties of a DeleteTableRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteTableRequest + * @property {string|null} [name] DeleteTableRequest name + */ + + /** + * Constructs a new DeleteTableRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteTableRequest. + * @implements IDeleteTableRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteTableRequest=} [properties] Properties to set + */ + function DeleteTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteTableRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @instance + */ + DeleteTableRequest.prototype.name = ""; + + /** + * Creates a new DeleteTableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteTableRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteTableRequest} DeleteTableRequest instance + */ + DeleteTableRequest.create = function create(properties) { + return new DeleteTableRequest(properties); + }; + + /** + * Encodes the specified DeleteTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteTableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteTableRequest} message DeleteTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteTableRequest} message DeleteTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @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.DeleteTableRequest} DeleteTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteTableRequest} DeleteTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTableRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteTableRequest} DeleteTableRequest + */ + DeleteTableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteTableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteTableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteTableRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @static + * @param {google.bigtable.admin.v2.DeleteTableRequest} message DeleteTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteTableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTableRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteTableRequest"; + }; + + return DeleteTableRequest; + })(); + + v2.UndeleteTableRequest = (function() { + + /** + * Properties of an UndeleteTableRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUndeleteTableRequest + * @property {string|null} [name] UndeleteTableRequest name + */ + + /** + * Constructs a new UndeleteTableRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UndeleteTableRequest. + * @implements IUndeleteTableRequest + * @constructor + * @param {google.bigtable.admin.v2.IUndeleteTableRequest=} [properties] Properties to set + */ + function UndeleteTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeleteTableRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @instance + */ + UndeleteTableRequest.prototype.name = ""; + + /** + * Creates a new UndeleteTableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @static + * @param {google.bigtable.admin.v2.IUndeleteTableRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UndeleteTableRequest} UndeleteTableRequest instance + */ + UndeleteTableRequest.create = function create(properties) { + return new UndeleteTableRequest(properties); + }; + + /** + * Encodes the specified UndeleteTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.UndeleteTableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @static + * @param {google.bigtable.admin.v2.IUndeleteTableRequest} message UndeleteTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteTableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified UndeleteTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UndeleteTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @static + * @param {google.bigtable.admin.v2.IUndeleteTableRequest} message UndeleteTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UndeleteTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @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.UndeleteTableRequest} UndeleteTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteTableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UndeleteTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UndeleteTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UndeleteTableRequest} UndeleteTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeleteTableRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeleteTableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an UndeleteTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UndeleteTableRequest} UndeleteTableRequest + */ + UndeleteTableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UndeleteTableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UndeleteTableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UndeleteTableRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an UndeleteTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @static + * @param {google.bigtable.admin.v2.UndeleteTableRequest} message UndeleteTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeleteTableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this UndeleteTableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @instance + * @returns {Object.} JSON object + */ + UndeleteTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UndeleteTableRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UndeleteTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeleteTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UndeleteTableRequest"; + }; + + return UndeleteTableRequest; + })(); + + v2.UndeleteTableMetadata = (function() { + + /** + * Properties of an UndeleteTableMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUndeleteTableMetadata + * @property {string|null} [name] UndeleteTableMetadata name + * @property {google.protobuf.ITimestamp|null} [startTime] UndeleteTableMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UndeleteTableMetadata endTime + */ + + /** + * Constructs a new UndeleteTableMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UndeleteTableMetadata. + * @implements IUndeleteTableMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUndeleteTableMetadata=} [properties] Properties to set + */ + function UndeleteTableMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeleteTableMetadata name. + * @member {string} name + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @instance + */ + UndeleteTableMetadata.prototype.name = ""; + + /** + * UndeleteTableMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @instance + */ + UndeleteTableMetadata.prototype.startTime = null; + + /** + * UndeleteTableMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @instance + */ + UndeleteTableMetadata.prototype.endTime = null; + + /** + * Creates a new UndeleteTableMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @static + * @param {google.bigtable.admin.v2.IUndeleteTableMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UndeleteTableMetadata} UndeleteTableMetadata instance + */ + UndeleteTableMetadata.create = function create(properties) { + return new UndeleteTableMetadata(properties); + }; + + /** + * Encodes the specified UndeleteTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UndeleteTableMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @static + * @param {google.bigtable.admin.v2.IUndeleteTableMetadata} message UndeleteTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteTableMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UndeleteTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UndeleteTableMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @static + * @param {google.bigtable.admin.v2.IUndeleteTableMetadata} message UndeleteTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UndeleteTableMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @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.UndeleteTableMetadata} UndeleteTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteTableMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UndeleteTableMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UndeleteTableMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UndeleteTableMetadata} UndeleteTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteTableMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeleteTableMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeleteTableMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an UndeleteTableMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UndeleteTableMetadata} UndeleteTableMetadata + */ + UndeleteTableMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UndeleteTableMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UndeleteTableMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UndeleteTableMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @static + * @param {google.bigtable.admin.v2.UndeleteTableMetadata} message UndeleteTableMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeleteTableMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this UndeleteTableMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @instance + * @returns {Object.} JSON object + */ + UndeleteTableMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UndeleteTableMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UndeleteTableMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeleteTableMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UndeleteTableMetadata"; + }; + + return UndeleteTableMetadata; + })(); + + v2.ModifyColumnFamiliesRequest = (function() { + + /** + * Properties of a ModifyColumnFamiliesRequest. + * @memberof google.bigtable.admin.v2 + * @interface IModifyColumnFamiliesRequest + * @property {string|null} [name] ModifyColumnFamiliesRequest name + * @property {Array.|null} [modifications] ModifyColumnFamiliesRequest modifications + * @property {boolean|null} [ignoreWarnings] ModifyColumnFamiliesRequest ignoreWarnings + */ + + /** + * Constructs a new ModifyColumnFamiliesRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ModifyColumnFamiliesRequest. + * @implements IModifyColumnFamiliesRequest + * @constructor + * @param {google.bigtable.admin.v2.IModifyColumnFamiliesRequest=} [properties] Properties to set + */ + function ModifyColumnFamiliesRequest(properties) { + this.modifications = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModifyColumnFamiliesRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @instance + */ + ModifyColumnFamiliesRequest.prototype.name = ""; + + /** + * ModifyColumnFamiliesRequest modifications. + * @member {Array.} modifications + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @instance + */ + ModifyColumnFamiliesRequest.prototype.modifications = $util.emptyArray; + + /** + * ModifyColumnFamiliesRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @instance + */ + ModifyColumnFamiliesRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new ModifyColumnFamiliesRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @static + * @param {google.bigtable.admin.v2.IModifyColumnFamiliesRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ModifyColumnFamiliesRequest} ModifyColumnFamiliesRequest instance + */ + ModifyColumnFamiliesRequest.create = function create(properties) { + return new ModifyColumnFamiliesRequest(properties); + }; + + /** + * Encodes the specified ModifyColumnFamiliesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ModifyColumnFamiliesRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @static + * @param {google.bigtable.admin.v2.IModifyColumnFamiliesRequest} message ModifyColumnFamiliesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModifyColumnFamiliesRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.modifications != null && message.modifications.length) + for (var i = 0; i < message.modifications.length; ++i) + $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.encode(message.modifications[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); + return writer; + }; + + /** + * Encodes the specified ModifyColumnFamiliesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ModifyColumnFamiliesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @static + * @param {google.bigtable.admin.v2.IModifyColumnFamiliesRequest} message ModifyColumnFamiliesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModifyColumnFamiliesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ModifyColumnFamiliesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @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.ModifyColumnFamiliesRequest} ModifyColumnFamiliesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModifyColumnFamiliesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.modifications && message.modifications.length)) + message.modifications = []; + message.modifications.push($root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ModifyColumnFamiliesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ModifyColumnFamiliesRequest} ModifyColumnFamiliesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModifyColumnFamiliesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModifyColumnFamiliesRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModifyColumnFamiliesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.modifications != null && Object.hasOwnProperty.call(message, "modifications")) { + if (!Array.isArray(message.modifications)) + return "modifications: array expected"; + for (var i = 0; i < message.modifications.length; ++i) { + var error = $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.verify(message.modifications[i], long + 1); + if (error) + return "modifications." + error; + } + } + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; + return null; + }; + + /** + * Creates a ModifyColumnFamiliesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ModifyColumnFamiliesRequest} ModifyColumnFamiliesRequest + */ + ModifyColumnFamiliesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.modifications) { + if (!Array.isArray(object.modifications)) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.modifications: array expected"); + message.modifications = []; + for (var i = 0; i < object.modifications.length; ++i) { + if (!$util.isObject(object.modifications[i])) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.modifications: object expected"); + message.modifications[i] = $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.fromObject(object.modifications[i], long + 1); + } + } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); + return message; + }; + + /** + * Creates a plain object from a ModifyColumnFamiliesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @static + * @param {google.bigtable.admin.v2.ModifyColumnFamiliesRequest} message ModifyColumnFamiliesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModifyColumnFamiliesRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.modifications = []; + if (options.defaults) { + object.name = ""; + object.ignoreWarnings = false; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.modifications && message.modifications.length) { + object.modifications = []; + for (var j = 0; j < message.modifications.length; ++j) + object.modifications[j] = $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.toObject(message.modifications[j], options, q + 1); + } + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; + return object; + }; + + /** + * Converts this ModifyColumnFamiliesRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @instance + * @returns {Object.} JSON object + */ + ModifyColumnFamiliesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ModifyColumnFamiliesRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModifyColumnFamiliesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ModifyColumnFamiliesRequest"; + }; + + ModifyColumnFamiliesRequest.Modification = (function() { + + /** + * Properties of a Modification. + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @interface IModification + * @property {string|null} [id] Modification id + * @property {google.bigtable.admin.v2.IColumnFamily|null} [create] Modification create + * @property {google.bigtable.admin.v2.IColumnFamily|null} [update] Modification update + * @property {boolean|null} [drop] Modification drop + * @property {google.protobuf.IFieldMask|null} [updateMask] Modification updateMask + */ + + /** + * Constructs a new Modification. + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest + * @classdesc Represents a Modification. + * @implements IModification + * @constructor + * @param {google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification=} [properties] Properties to set + */ + function Modification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Modification id. + * @member {string} id + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @instance + */ + Modification.prototype.id = ""; + + /** + * Modification create. + * @member {google.bigtable.admin.v2.IColumnFamily|null|undefined} create + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @instance + */ + Modification.prototype.create = null; + + /** + * Modification update. + * @member {google.bigtable.admin.v2.IColumnFamily|null|undefined} update + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @instance + */ + Modification.prototype.update = null; + + /** + * Modification drop. + * @member {boolean|null|undefined} drop + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @instance + */ + Modification.prototype.drop = null; + + /** + * Modification updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @instance + */ + Modification.prototype.updateMask = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Modification mod. + * @member {"create"|"update"|"drop"|undefined} mod + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @instance + */ + Object.defineProperty(Modification.prototype, "mod", { + get: $util.oneOfGetter($oneOfFields = ["create", "update", "drop"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Modification instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @static + * @param {google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification} Modification instance + */ + Modification.create = function create(properties) { + return new Modification(properties); + }; + + /** + * Encodes the specified Modification message. Does not implicitly {@link google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @static + * @param {google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification} message Modification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Modification.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.create != null && Object.hasOwnProperty.call(message, "create")) + $root.google.bigtable.admin.v2.ColumnFamily.encode(message.create, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.update != null && Object.hasOwnProperty.call(message, "update")) + $root.google.bigtable.admin.v2.ColumnFamily.encode(message.update, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.drop); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Modification message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @static + * @param {google.bigtable.admin.v2.ModifyColumnFamiliesRequest.IModification} message Modification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Modification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Modification message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @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.ModifyColumnFamiliesRequest.Modification} Modification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Modification.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.create = $root.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.update = $root.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.drop = reader.bool(); + break; + } + case 6: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Modification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification} Modification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Modification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Modification message. + * @function verify + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Modification.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.create != null && Object.hasOwnProperty.call(message, "create")) { + properties.mod = 1; + { + var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.create, long + 1); + if (error) + return "create." + error; + } + } + if (message.update != null && Object.hasOwnProperty.call(message, "update")) { + if (properties.mod === 1) + return "mod: multiple values"; + properties.mod = 1; + { + var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.update, long + 1); + if (error) + return "update." + error; + } + } + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) { + if (properties.mod === 1) + return "mod: multiple values"; + properties.mod = 1; + if (typeof message.drop !== "boolean") + return "drop: boolean expected"; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a Modification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification} Modification + */ + Modification.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification(); + if (object.id != null) + message.id = String(object.id); + if (object.create != null) { + if (!$util.isObject(object.create)) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.create: object expected"); + message.create = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.create, long + 1); + } + if (object.update != null) { + if (!$util.isObject(object.update)) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.update: object expected"); + message.update = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.update, long + 1); + } + if (object.drop != null) + message.drop = Boolean(object.drop); + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Modification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @static + * @param {google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification} message Modification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Modification.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.id = ""; + object.updateMask = null; + } + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + object.id = message.id; + if (message.create != null && Object.hasOwnProperty.call(message, "create")) { + object.create = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.create, options, q + 1); + if (options.oneofs) + object.mod = "create"; + } + if (message.update != null && Object.hasOwnProperty.call(message, "update")) { + object.update = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.update, options, q + 1); + if (options.oneofs) + object.mod = "update"; + } + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) { + object.drop = message.drop; + if (options.oneofs) + object.mod = "drop"; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + return object; + }; + + /** + * Converts this Modification to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @instance + * @returns {Object.} JSON object + */ + Modification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Modification + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Modification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification"; + }; + + return Modification; + })(); + + return ModifyColumnFamiliesRequest; + })(); + + v2.GenerateConsistencyTokenRequest = (function() { + + /** + * Properties of a GenerateConsistencyTokenRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGenerateConsistencyTokenRequest + * @property {string|null} [name] GenerateConsistencyTokenRequest name + */ + + /** + * Constructs a new GenerateConsistencyTokenRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GenerateConsistencyTokenRequest. + * @implements IGenerateConsistencyTokenRequest + * @constructor + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenRequest=} [properties] Properties to set + */ + function GenerateConsistencyTokenRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateConsistencyTokenRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @instance + */ + GenerateConsistencyTokenRequest.prototype.name = ""; + + /** + * Creates a new GenerateConsistencyTokenRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @static + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GenerateConsistencyTokenRequest} GenerateConsistencyTokenRequest instance + */ + GenerateConsistencyTokenRequest.create = function create(properties) { + return new GenerateConsistencyTokenRequest(properties); + }; + + /** + * Encodes the specified GenerateConsistencyTokenRequest message. Does not implicitly {@link google.bigtable.admin.v2.GenerateConsistencyTokenRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @static + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenRequest} message GenerateConsistencyTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConsistencyTokenRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GenerateConsistencyTokenRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GenerateConsistencyTokenRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @static + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenRequest} message GenerateConsistencyTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConsistencyTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GenerateConsistencyTokenRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @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.GenerateConsistencyTokenRequest} GenerateConsistencyTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConsistencyTokenRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateConsistencyTokenRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GenerateConsistencyTokenRequest} GenerateConsistencyTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConsistencyTokenRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateConsistencyTokenRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateConsistencyTokenRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GenerateConsistencyTokenRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GenerateConsistencyTokenRequest} GenerateConsistencyTokenRequest + */ + GenerateConsistencyTokenRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GenerateConsistencyTokenRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GenerateConsistencyTokenRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @static + * @param {google.bigtable.admin.v2.GenerateConsistencyTokenRequest} message GenerateConsistencyTokenRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateConsistencyTokenRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GenerateConsistencyTokenRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateConsistencyTokenRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateConsistencyTokenRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateConsistencyTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GenerateConsistencyTokenRequest"; + }; + + return GenerateConsistencyTokenRequest; + })(); + + v2.GenerateConsistencyTokenResponse = (function() { + + /** + * Properties of a GenerateConsistencyTokenResponse. + * @memberof google.bigtable.admin.v2 + * @interface IGenerateConsistencyTokenResponse + * @property {string|null} [consistencyToken] GenerateConsistencyTokenResponse consistencyToken + */ + + /** + * Constructs a new GenerateConsistencyTokenResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GenerateConsistencyTokenResponse. + * @implements IGenerateConsistencyTokenResponse + * @constructor + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenResponse=} [properties] Properties to set + */ + function GenerateConsistencyTokenResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateConsistencyTokenResponse consistencyToken. + * @member {string} consistencyToken + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @instance + */ + GenerateConsistencyTokenResponse.prototype.consistencyToken = ""; + + /** + * Creates a new GenerateConsistencyTokenResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @static + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GenerateConsistencyTokenResponse} GenerateConsistencyTokenResponse instance + */ + GenerateConsistencyTokenResponse.create = function create(properties) { + return new GenerateConsistencyTokenResponse(properties); + }; + + /** + * Encodes the specified GenerateConsistencyTokenResponse message. Does not implicitly {@link google.bigtable.admin.v2.GenerateConsistencyTokenResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @static + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenResponse} message GenerateConsistencyTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConsistencyTokenResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.consistencyToken); + return writer; + }; + + /** + * Encodes the specified GenerateConsistencyTokenResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GenerateConsistencyTokenResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @static + * @param {google.bigtable.admin.v2.IGenerateConsistencyTokenResponse} message GenerateConsistencyTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConsistencyTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GenerateConsistencyTokenResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @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.GenerateConsistencyTokenResponse} GenerateConsistencyTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConsistencyTokenResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.consistencyToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateConsistencyTokenResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GenerateConsistencyTokenResponse} GenerateConsistencyTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConsistencyTokenResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateConsistencyTokenResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateConsistencyTokenResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) + if (!$util.isString(message.consistencyToken)) + return "consistencyToken: string expected"; + return null; + }; + + /** + * Creates a GenerateConsistencyTokenResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GenerateConsistencyTokenResponse} GenerateConsistencyTokenResponse + */ + GenerateConsistencyTokenResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GenerateConsistencyTokenResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse(); + if (object.consistencyToken != null) + message.consistencyToken = String(object.consistencyToken); + return message; + }; + + /** + * Creates a plain object from a GenerateConsistencyTokenResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @static + * @param {google.bigtable.admin.v2.GenerateConsistencyTokenResponse} message GenerateConsistencyTokenResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateConsistencyTokenResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.consistencyToken = ""; + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) + object.consistencyToken = message.consistencyToken; + return object; + }; + + /** + * Converts this GenerateConsistencyTokenResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateConsistencyTokenResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateConsistencyTokenResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GenerateConsistencyTokenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateConsistencyTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GenerateConsistencyTokenResponse"; + }; + + return GenerateConsistencyTokenResponse; + })(); + + v2.CheckConsistencyRequest = (function() { + + /** + * Properties of a CheckConsistencyRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICheckConsistencyRequest + * @property {string|null} [name] CheckConsistencyRequest name + * @property {string|null} [consistencyToken] CheckConsistencyRequest consistencyToken + * @property {google.bigtable.admin.v2.IStandardReadRemoteWrites|null} [standardReadRemoteWrites] CheckConsistencyRequest standardReadRemoteWrites + * @property {google.bigtable.admin.v2.IDataBoostReadLocalWrites|null} [dataBoostReadLocalWrites] CheckConsistencyRequest dataBoostReadLocalWrites + */ + + /** + * Constructs a new CheckConsistencyRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CheckConsistencyRequest. + * @implements ICheckConsistencyRequest + * @constructor + * @param {google.bigtable.admin.v2.ICheckConsistencyRequest=} [properties] Properties to set + */ + function CheckConsistencyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckConsistencyRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + */ + CheckConsistencyRequest.prototype.name = ""; + + /** + * CheckConsistencyRequest consistencyToken. + * @member {string} consistencyToken + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + */ + CheckConsistencyRequest.prototype.consistencyToken = ""; + + /** + * CheckConsistencyRequest standardReadRemoteWrites. + * @member {google.bigtable.admin.v2.IStandardReadRemoteWrites|null|undefined} standardReadRemoteWrites + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + */ + CheckConsistencyRequest.prototype.standardReadRemoteWrites = null; + + /** + * CheckConsistencyRequest dataBoostReadLocalWrites. + * @member {google.bigtable.admin.v2.IDataBoostReadLocalWrites|null|undefined} dataBoostReadLocalWrites + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + */ + CheckConsistencyRequest.prototype.dataBoostReadLocalWrites = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CheckConsistencyRequest mode. + * @member {"standardReadRemoteWrites"|"dataBoostReadLocalWrites"|undefined} mode + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + */ + Object.defineProperty(CheckConsistencyRequest.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["standardReadRemoteWrites", "dataBoostReadLocalWrites"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CheckConsistencyRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @static + * @param {google.bigtable.admin.v2.ICheckConsistencyRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CheckConsistencyRequest} CheckConsistencyRequest instance + */ + CheckConsistencyRequest.create = function create(properties) { + return new CheckConsistencyRequest(properties); + }; + + /** + * Encodes the specified CheckConsistencyRequest message. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @static + * @param {google.bigtable.admin.v2.ICheckConsistencyRequest} message CheckConsistencyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckConsistencyRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.consistencyToken); + if (message.standardReadRemoteWrites != null && Object.hasOwnProperty.call(message, "standardReadRemoteWrites")) + $root.google.bigtable.admin.v2.StandardReadRemoteWrites.encode(message.standardReadRemoteWrites, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.dataBoostReadLocalWrites != null && Object.hasOwnProperty.call(message, "dataBoostReadLocalWrites")) + $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.encode(message.dataBoostReadLocalWrites, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckConsistencyRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @static + * @param {google.bigtable.admin.v2.ICheckConsistencyRequest} message CheckConsistencyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckConsistencyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CheckConsistencyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @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.CheckConsistencyRequest} CheckConsistencyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckConsistencyRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CheckConsistencyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.consistencyToken = reader.string(); + break; + } + case 3: { + message.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CheckConsistencyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CheckConsistencyRequest} CheckConsistencyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckConsistencyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckConsistencyRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckConsistencyRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) + if (!$util.isString(message.consistencyToken)) + return "consistencyToken: string expected"; + if (message.standardReadRemoteWrites != null && Object.hasOwnProperty.call(message, "standardReadRemoteWrites")) { + properties.mode = 1; + { + var error = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.verify(message.standardReadRemoteWrites, long + 1); + if (error) + return "standardReadRemoteWrites." + error; + } + } + if (message.dataBoostReadLocalWrites != null && Object.hasOwnProperty.call(message, "dataBoostReadLocalWrites")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.verify(message.dataBoostReadLocalWrites, long + 1); + if (error) + return "dataBoostReadLocalWrites." + error; + } + } + return null; + }; + + /** + * Creates a CheckConsistencyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CheckConsistencyRequest} CheckConsistencyRequest + */ + CheckConsistencyRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CheckConsistencyRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CheckConsistencyRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.consistencyToken != null) + message.consistencyToken = String(object.consistencyToken); + if (object.standardReadRemoteWrites != null) { + if (!$util.isObject(object.standardReadRemoteWrites)) + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.standardReadRemoteWrites: object expected"); + message.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.fromObject(object.standardReadRemoteWrites, long + 1); + } + if (object.dataBoostReadLocalWrites != null) { + if (!$util.isObject(object.dataBoostReadLocalWrites)) + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.dataBoostReadLocalWrites: object expected"); + message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.fromObject(object.dataBoostReadLocalWrites, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CheckConsistencyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @static + * @param {google.bigtable.admin.v2.CheckConsistencyRequest} message CheckConsistencyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckConsistencyRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.consistencyToken = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) + object.consistencyToken = message.consistencyToken; + if (message.standardReadRemoteWrites != null && Object.hasOwnProperty.call(message, "standardReadRemoteWrites")) { + object.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.toObject(message.standardReadRemoteWrites, options, q + 1); + if (options.oneofs) + object.mode = "standardReadRemoteWrites"; + } + if (message.dataBoostReadLocalWrites != null && Object.hasOwnProperty.call(message, "dataBoostReadLocalWrites")) { + object.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.toObject(message.dataBoostReadLocalWrites, options, q + 1); + if (options.oneofs) + object.mode = "dataBoostReadLocalWrites"; + } + return object; + }; + + /** + * Converts this CheckConsistencyRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + * @returns {Object.} JSON object + */ + CheckConsistencyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckConsistencyRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckConsistencyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CheckConsistencyRequest"; + }; + + return CheckConsistencyRequest; + })(); + + v2.StandardReadRemoteWrites = (function() { + + /** + * Properties of a StandardReadRemoteWrites. + * @memberof google.bigtable.admin.v2 + * @interface IStandardReadRemoteWrites + */ + + /** + * Constructs a new StandardReadRemoteWrites. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a StandardReadRemoteWrites. + * @implements IStandardReadRemoteWrites + * @constructor + * @param {google.bigtable.admin.v2.IStandardReadRemoteWrites=} [properties] Properties to set + */ + function StandardReadRemoteWrites(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new StandardReadRemoteWrites instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {google.bigtable.admin.v2.IStandardReadRemoteWrites=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.StandardReadRemoteWrites} StandardReadRemoteWrites instance + */ + StandardReadRemoteWrites.create = function create(properties) { + return new StandardReadRemoteWrites(properties); + }; + + /** + * Encodes the specified StandardReadRemoteWrites message. Does not implicitly {@link google.bigtable.admin.v2.StandardReadRemoteWrites.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {google.bigtable.admin.v2.IStandardReadRemoteWrites} message StandardReadRemoteWrites message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardReadRemoteWrites.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified StandardReadRemoteWrites message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.StandardReadRemoteWrites.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {google.bigtable.admin.v2.IStandardReadRemoteWrites} message StandardReadRemoteWrites message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardReadRemoteWrites.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a StandardReadRemoteWrites message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @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.StandardReadRemoteWrites} StandardReadRemoteWrites + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardReadRemoteWrites.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.StandardReadRemoteWrites(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StandardReadRemoteWrites message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.StandardReadRemoteWrites} StandardReadRemoteWrites + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardReadRemoteWrites.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardReadRemoteWrites message. + * @function verify + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardReadRemoteWrites.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a StandardReadRemoteWrites message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.StandardReadRemoteWrites} StandardReadRemoteWrites + */ + StandardReadRemoteWrites.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.StandardReadRemoteWrites) + return object; + return new $root.google.bigtable.admin.v2.StandardReadRemoteWrites(); + }; + + /** + * Creates a plain object from a StandardReadRemoteWrites message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {google.bigtable.admin.v2.StandardReadRemoteWrites} message StandardReadRemoteWrites + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardReadRemoteWrites.toObject = function toObject() { + return {}; + }; + + /** + * Converts this StandardReadRemoteWrites to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @instance + * @returns {Object.} JSON object + */ + StandardReadRemoteWrites.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardReadRemoteWrites + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardReadRemoteWrites.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.StandardReadRemoteWrites"; + }; + + return StandardReadRemoteWrites; + })(); + + v2.DataBoostReadLocalWrites = (function() { + + /** + * Properties of a DataBoostReadLocalWrites. + * @memberof google.bigtable.admin.v2 + * @interface IDataBoostReadLocalWrites + */ + + /** + * Constructs a new DataBoostReadLocalWrites. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DataBoostReadLocalWrites. + * @implements IDataBoostReadLocalWrites + * @constructor + * @param {google.bigtable.admin.v2.IDataBoostReadLocalWrites=} [properties] Properties to set + */ + function DataBoostReadLocalWrites(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new DataBoostReadLocalWrites instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {google.bigtable.admin.v2.IDataBoostReadLocalWrites=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DataBoostReadLocalWrites} DataBoostReadLocalWrites instance + */ + DataBoostReadLocalWrites.create = function create(properties) { + return new DataBoostReadLocalWrites(properties); + }; + + /** + * Encodes the specified DataBoostReadLocalWrites message. Does not implicitly {@link google.bigtable.admin.v2.DataBoostReadLocalWrites.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {google.bigtable.admin.v2.IDataBoostReadLocalWrites} message DataBoostReadLocalWrites message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataBoostReadLocalWrites.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified DataBoostReadLocalWrites message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DataBoostReadLocalWrites.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {google.bigtable.admin.v2.IDataBoostReadLocalWrites} message DataBoostReadLocalWrites message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataBoostReadLocalWrites.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DataBoostReadLocalWrites message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @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.DataBoostReadLocalWrites} DataBoostReadLocalWrites + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataBoostReadLocalWrites.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DataBoostReadLocalWrites(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataBoostReadLocalWrites message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DataBoostReadLocalWrites} DataBoostReadLocalWrites + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataBoostReadLocalWrites.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataBoostReadLocalWrites message. + * @function verify + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataBoostReadLocalWrites.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a DataBoostReadLocalWrites message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DataBoostReadLocalWrites} DataBoostReadLocalWrites + */ + DataBoostReadLocalWrites.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DataBoostReadLocalWrites) + return object; + return new $root.google.bigtable.admin.v2.DataBoostReadLocalWrites(); + }; + + /** + * Creates a plain object from a DataBoostReadLocalWrites message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {google.bigtable.admin.v2.DataBoostReadLocalWrites} message DataBoostReadLocalWrites + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataBoostReadLocalWrites.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DataBoostReadLocalWrites to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @instance + * @returns {Object.} JSON object + */ + DataBoostReadLocalWrites.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataBoostReadLocalWrites + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataBoostReadLocalWrites.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DataBoostReadLocalWrites"; + }; + + return DataBoostReadLocalWrites; + })(); + + v2.CheckConsistencyResponse = (function() { + + /** + * Properties of a CheckConsistencyResponse. + * @memberof google.bigtable.admin.v2 + * @interface ICheckConsistencyResponse + * @property {boolean|null} [consistent] CheckConsistencyResponse consistent + */ + + /** + * Constructs a new CheckConsistencyResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CheckConsistencyResponse. + * @implements ICheckConsistencyResponse + * @constructor + * @param {google.bigtable.admin.v2.ICheckConsistencyResponse=} [properties] Properties to set + */ + function CheckConsistencyResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckConsistencyResponse consistent. + * @member {boolean} consistent + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @instance + */ + CheckConsistencyResponse.prototype.consistent = false; + + /** + * Creates a new CheckConsistencyResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @static + * @param {google.bigtable.admin.v2.ICheckConsistencyResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CheckConsistencyResponse} CheckConsistencyResponse instance + */ + CheckConsistencyResponse.create = function create(properties) { + return new CheckConsistencyResponse(properties); + }; + + /** + * Encodes the specified CheckConsistencyResponse message. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @static + * @param {google.bigtable.admin.v2.ICheckConsistencyResponse} message CheckConsistencyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckConsistencyResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.consistent != null && Object.hasOwnProperty.call(message, "consistent")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.consistent); + return writer; + }; + + /** + * Encodes the specified CheckConsistencyResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @static + * @param {google.bigtable.admin.v2.ICheckConsistencyResponse} message CheckConsistencyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckConsistencyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CheckConsistencyResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @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.CheckConsistencyResponse} CheckConsistencyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckConsistencyResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CheckConsistencyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.consistent = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CheckConsistencyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CheckConsistencyResponse} CheckConsistencyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckConsistencyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckConsistencyResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckConsistencyResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.consistent != null && Object.hasOwnProperty.call(message, "consistent")) + if (typeof message.consistent !== "boolean") + return "consistent: boolean expected"; + return null; + }; + + /** + * Creates a CheckConsistencyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CheckConsistencyResponse} CheckConsistencyResponse + */ + CheckConsistencyResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CheckConsistencyResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CheckConsistencyResponse(); + if (object.consistent != null) + message.consistent = Boolean(object.consistent); + return message; + }; + + /** + * Creates a plain object from a CheckConsistencyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @static + * @param {google.bigtable.admin.v2.CheckConsistencyResponse} message CheckConsistencyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckConsistencyResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.consistent = false; + if (message.consistent != null && Object.hasOwnProperty.call(message, "consistent")) + object.consistent = message.consistent; + return object; + }; + + /** + * Converts this CheckConsistencyResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @instance + * @returns {Object.} JSON object + */ + CheckConsistencyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckConsistencyResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CheckConsistencyResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckConsistencyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CheckConsistencyResponse"; + }; + + return CheckConsistencyResponse; + })(); + + v2.SnapshotTableRequest = (function() { + + /** + * Properties of a SnapshotTableRequest. + * @memberof google.bigtable.admin.v2 + * @interface ISnapshotTableRequest + * @property {string|null} [name] SnapshotTableRequest name + * @property {string|null} [cluster] SnapshotTableRequest cluster + * @property {string|null} [snapshotId] SnapshotTableRequest snapshotId + * @property {google.protobuf.IDuration|null} [ttl] SnapshotTableRequest ttl + * @property {string|null} [description] SnapshotTableRequest description + */ + + /** + * Constructs a new SnapshotTableRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a SnapshotTableRequest. + * @implements ISnapshotTableRequest + * @constructor + * @param {google.bigtable.admin.v2.ISnapshotTableRequest=} [properties] Properties to set + */ + function SnapshotTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SnapshotTableRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @instance + */ + SnapshotTableRequest.prototype.name = ""; + + /** + * SnapshotTableRequest cluster. + * @member {string} cluster + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @instance + */ + SnapshotTableRequest.prototype.cluster = ""; + + /** + * SnapshotTableRequest snapshotId. + * @member {string} snapshotId + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @instance + */ + SnapshotTableRequest.prototype.snapshotId = ""; + + /** + * SnapshotTableRequest ttl. + * @member {google.protobuf.IDuration|null|undefined} ttl + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @instance + */ + SnapshotTableRequest.prototype.ttl = null; + + /** + * SnapshotTableRequest description. + * @member {string} description + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @instance + */ + SnapshotTableRequest.prototype.description = ""; + + /** + * Creates a new SnapshotTableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @static + * @param {google.bigtable.admin.v2.ISnapshotTableRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.SnapshotTableRequest} SnapshotTableRequest instance + */ + SnapshotTableRequest.create = function create(properties) { + return new SnapshotTableRequest(properties); + }; + + /** + * Encodes the specified SnapshotTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @static + * @param {google.bigtable.admin.v2.ISnapshotTableRequest} message SnapshotTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotTableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cluster); + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotId); + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) + $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + return writer; + }; + + /** + * Encodes the specified SnapshotTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @static + * @param {google.bigtable.admin.v2.ISnapshotTableRequest} message SnapshotTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SnapshotTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @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.SnapshotTableRequest} SnapshotTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotTableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.SnapshotTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.cluster = reader.string(); + break; + } + case 3: { + message.snapshotId = reader.string(); + break; + } + case 4: { + message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SnapshotTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.SnapshotTableRequest} SnapshotTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnapshotTableRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SnapshotTableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) + if (!$util.isString(message.snapshotId)) + return "snapshotId: string expected"; + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) { + var error = $root.google.protobuf.Duration.verify(message.ttl, long + 1); + if (error) + return "ttl." + error; + } + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a SnapshotTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.SnapshotTableRequest} SnapshotTableRequest + */ + SnapshotTableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.SnapshotTableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.SnapshotTableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.SnapshotTableRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cluster != null) + message.cluster = String(object.cluster); + if (object.snapshotId != null) + message.snapshotId = String(object.snapshotId); + if (object.ttl != null) { + if (!$util.isObject(object.ttl)) + throw TypeError(".google.bigtable.admin.v2.SnapshotTableRequest.ttl: object expected"); + message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl, long + 1); + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a SnapshotTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @static + * @param {google.bigtable.admin.v2.SnapshotTableRequest} message SnapshotTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnapshotTableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.cluster = ""; + object.snapshotId = ""; + object.ttl = null; + object.description = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + object.cluster = message.cluster; + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) + object.snapshotId = message.snapshotId; + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) + object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options, q + 1); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + return object; + }; + + /** + * Converts this SnapshotTableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @instance + * @returns {Object.} JSON object + */ + SnapshotTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SnapshotTableRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.SnapshotTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SnapshotTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.SnapshotTableRequest"; + }; + + return SnapshotTableRequest; + })(); + + v2.GetSnapshotRequest = (function() { + + /** + * Properties of a GetSnapshotRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetSnapshotRequest + * @property {string|null} [name] GetSnapshotRequest name + */ + + /** + * Constructs a new GetSnapshotRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetSnapshotRequest. + * @implements IGetSnapshotRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetSnapshotRequest=} [properties] Properties to set + */ + function GetSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSnapshotRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @instance + */ + GetSnapshotRequest.prototype.name = ""; + + /** + * Creates a new GetSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.IGetSnapshotRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetSnapshotRequest} GetSnapshotRequest instance + */ + GetSnapshotRequest.create = function create(properties) { + return new GetSnapshotRequest(properties); + }; + + /** + * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSnapshotRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @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.GetSnapshotRequest} GetSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSnapshotRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetSnapshotRequest} GetSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSnapshotRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSnapshotRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetSnapshotRequest} GetSnapshotRequest + */ + GetSnapshotRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetSnapshotRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetSnapshotRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.GetSnapshotRequest} message GetSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSnapshotRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetSnapshotRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + GetSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSnapshotRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetSnapshotRequest"; + }; + + return GetSnapshotRequest; + })(); + + v2.ListSnapshotsRequest = (function() { + + /** + * Properties of a ListSnapshotsRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListSnapshotsRequest + * @property {string|null} [parent] ListSnapshotsRequest parent + * @property {number|null} [pageSize] ListSnapshotsRequest pageSize + * @property {string|null} [pageToken] ListSnapshotsRequest pageToken + */ + + /** + * Constructs a new ListSnapshotsRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListSnapshotsRequest. + * @implements IListSnapshotsRequest + * @constructor + * @param {google.bigtable.admin.v2.IListSnapshotsRequest=} [properties] Properties to set + */ + function ListSnapshotsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSnapshotsRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.parent = ""; + + /** + * ListSnapshotsRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.pageSize = 0; + + /** + * ListSnapshotsRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListSnapshotsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @static + * @param {google.bigtable.admin.v2.IListSnapshotsRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListSnapshotsRequest} ListSnapshotsRequest instance + */ + ListSnapshotsRequest.create = function create(properties) { + return new ListSnapshotsRequest(properties); + }; + + /** + * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListSnapshotsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @static + * @param {google.bigtable.admin.v2.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListSnapshotsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @static + * @param {google.bigtable.admin.v2.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @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.ListSnapshotsRequest} ListSnapshotsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListSnapshotsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListSnapshotsRequest} ListSnapshotsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSnapshotsRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSnapshotsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListSnapshotsRequest} ListSnapshotsRequest + */ + ListSnapshotsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListSnapshotsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListSnapshotsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListSnapshotsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @static + * @param {google.bigtable.admin.v2.ListSnapshotsRequest} message ListSnapshotsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSnapshotsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListSnapshotsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSnapshotsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSnapshotsRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListSnapshotsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSnapshotsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListSnapshotsRequest"; + }; + + return ListSnapshotsRequest; + })(); + + v2.ListSnapshotsResponse = (function() { + + /** + * Properties of a ListSnapshotsResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListSnapshotsResponse + * @property {Array.|null} [snapshots] ListSnapshotsResponse snapshots + * @property {string|null} [nextPageToken] ListSnapshotsResponse nextPageToken + */ + + /** + * Constructs a new ListSnapshotsResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListSnapshotsResponse. + * @implements IListSnapshotsResponse + * @constructor + * @param {google.bigtable.admin.v2.IListSnapshotsResponse=} [properties] Properties to set + */ + function ListSnapshotsResponse(properties) { + this.snapshots = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSnapshotsResponse snapshots. + * @member {Array.} snapshots + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @instance + */ + ListSnapshotsResponse.prototype.snapshots = $util.emptyArray; + + /** + * ListSnapshotsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @instance + */ + ListSnapshotsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSnapshotsResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @static + * @param {google.bigtable.admin.v2.IListSnapshotsResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListSnapshotsResponse} ListSnapshotsResponse instance + */ + ListSnapshotsResponse.create = function create(properties) { + return new ListSnapshotsResponse(properties); + }; + + /** + * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListSnapshotsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @static + * @param {google.bigtable.admin.v2.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.snapshots != null && message.snapshots.length) + for (var i = 0; i < message.snapshots.length; ++i) + $root.google.bigtable.admin.v2.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListSnapshotsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @static + * @param {google.bigtable.admin.v2.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @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.ListSnapshotsResponse} ListSnapshotsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListSnapshotsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.snapshots && message.snapshots.length)) + message.snapshots = []; + message.snapshots.push($root.google.bigtable.admin.v2.Snapshot.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListSnapshotsResponse} ListSnapshotsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSnapshotsResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSnapshotsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.snapshots != null && Object.hasOwnProperty.call(message, "snapshots")) { + if (!Array.isArray(message.snapshots)) + return "snapshots: array expected"; + for (var i = 0; i < message.snapshots.length; ++i) { + var error = $root.google.bigtable.admin.v2.Snapshot.verify(message.snapshots[i], long + 1); + if (error) + return "snapshots." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListSnapshotsResponse} ListSnapshotsResponse + */ + ListSnapshotsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListSnapshotsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListSnapshotsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListSnapshotsResponse(); + if (object.snapshots) { + if (!Array.isArray(object.snapshots)) + throw TypeError(".google.bigtable.admin.v2.ListSnapshotsResponse.snapshots: array expected"); + message.snapshots = []; + for (var i = 0; i < object.snapshots.length; ++i) { + if (!$util.isObject(object.snapshots[i])) + throw TypeError(".google.bigtable.admin.v2.ListSnapshotsResponse.snapshots: object expected"); + message.snapshots[i] = $root.google.bigtable.admin.v2.Snapshot.fromObject(object.snapshots[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @static + * @param {google.bigtable.admin.v2.ListSnapshotsResponse} message ListSnapshotsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSnapshotsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.snapshots = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.snapshots && message.snapshots.length) { + object.snapshots = []; + for (var j = 0; j < message.snapshots.length; ++j) + object.snapshots[j] = $root.google.bigtable.admin.v2.Snapshot.toObject(message.snapshots[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSnapshotsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @instance + * @returns {Object.} JSON object + */ + ListSnapshotsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSnapshotsResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListSnapshotsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSnapshotsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListSnapshotsResponse"; + }; + + return ListSnapshotsResponse; + })(); + + v2.DeleteSnapshotRequest = (function() { + + /** + * Properties of a DeleteSnapshotRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteSnapshotRequest + * @property {string|null} [name] DeleteSnapshotRequest name + */ + + /** + * Constructs a new DeleteSnapshotRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteSnapshotRequest. + * @implements IDeleteSnapshotRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteSnapshotRequest=} [properties] Properties to set + */ + function DeleteSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSnapshotRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @instance + */ + DeleteSnapshotRequest.prototype.name = ""; + + /** + * Creates a new DeleteSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteSnapshotRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteSnapshotRequest} DeleteSnapshotRequest instance + */ + DeleteSnapshotRequest.create = function create(properties) { + return new DeleteSnapshotRequest(properties); + }; + + /** + * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSnapshotRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @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.DeleteSnapshotRequest} DeleteSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSnapshotRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteSnapshotRequest} DeleteSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSnapshotRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSnapshotRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteSnapshotRequest} DeleteSnapshotRequest + */ + DeleteSnapshotRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteSnapshotRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteSnapshotRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @static + * @param {google.bigtable.admin.v2.DeleteSnapshotRequest} message DeleteSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSnapshotRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteSnapshotRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSnapshotRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteSnapshotRequest"; + }; + + return DeleteSnapshotRequest; + })(); + + v2.SnapshotTableMetadata = (function() { + + /** + * Properties of a SnapshotTableMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ISnapshotTableMetadata + * @property {google.bigtable.admin.v2.ISnapshotTableRequest|null} [originalRequest] SnapshotTableMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] SnapshotTableMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] SnapshotTableMetadata finishTime + */ + + /** + * Constructs a new SnapshotTableMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a SnapshotTableMetadata. + * @implements ISnapshotTableMetadata + * @constructor + * @param {google.bigtable.admin.v2.ISnapshotTableMetadata=} [properties] Properties to set + */ + function SnapshotTableMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SnapshotTableMetadata originalRequest. + * @member {google.bigtable.admin.v2.ISnapshotTableRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @instance + */ + SnapshotTableMetadata.prototype.originalRequest = null; + + /** + * SnapshotTableMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @instance + */ + SnapshotTableMetadata.prototype.requestTime = null; + + /** + * SnapshotTableMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @instance + */ + SnapshotTableMetadata.prototype.finishTime = null; + + /** + * Creates a new SnapshotTableMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @static + * @param {google.bigtable.admin.v2.ISnapshotTableMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.SnapshotTableMetadata} SnapshotTableMetadata instance + */ + SnapshotTableMetadata.create = function create(properties) { + return new SnapshotTableMetadata(properties); + }; + + /** + * Encodes the specified SnapshotTableMetadata message. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @static + * @param {google.bigtable.admin.v2.ISnapshotTableMetadata} message SnapshotTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotTableMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.SnapshotTableRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SnapshotTableMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @static + * @param {google.bigtable.admin.v2.ISnapshotTableMetadata} message SnapshotTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SnapshotTableMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @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.SnapshotTableMetadata} SnapshotTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotTableMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.SnapshotTableMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SnapshotTableMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.SnapshotTableMetadata} SnapshotTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotTableMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnapshotTableMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SnapshotTableMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.SnapshotTableRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + return null; + }; + + /** + * Creates a SnapshotTableMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.SnapshotTableMetadata} SnapshotTableMetadata + */ + SnapshotTableMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.SnapshotTableMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.SnapshotTableMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.fromObject(object.originalRequest, long + 1); + } + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SnapshotTableMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @static + * @param {google.bigtable.admin.v2.SnapshotTableMetadata} message SnapshotTableMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnapshotTableMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + return object; + }; + + /** + * Converts this SnapshotTableMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @instance + * @returns {Object.} JSON object + */ + SnapshotTableMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SnapshotTableMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.SnapshotTableMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SnapshotTableMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.SnapshotTableMetadata"; + }; + + return SnapshotTableMetadata; + })(); + + v2.CreateTableFromSnapshotMetadata = (function() { + + /** + * Properties of a CreateTableFromSnapshotMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICreateTableFromSnapshotMetadata + * @property {google.bigtable.admin.v2.ICreateTableFromSnapshotRequest|null} [originalRequest] CreateTableFromSnapshotMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] CreateTableFromSnapshotMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] CreateTableFromSnapshotMetadata finishTime + */ + + /** + * Constructs a new CreateTableFromSnapshotMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateTableFromSnapshotMetadata. + * @implements ICreateTableFromSnapshotMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata=} [properties] Properties to set + */ + function CreateTableFromSnapshotMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTableFromSnapshotMetadata originalRequest. + * @member {google.bigtable.admin.v2.ICreateTableFromSnapshotRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @instance + */ + CreateTableFromSnapshotMetadata.prototype.originalRequest = null; + + /** + * CreateTableFromSnapshotMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @instance + */ + CreateTableFromSnapshotMetadata.prototype.requestTime = null; + + /** + * CreateTableFromSnapshotMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @instance + */ + CreateTableFromSnapshotMetadata.prototype.finishTime = null; + + /** + * Creates a new CreateTableFromSnapshotMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateTableFromSnapshotMetadata} CreateTableFromSnapshotMetadata instance + */ + CreateTableFromSnapshotMetadata.create = function create(properties) { + return new CreateTableFromSnapshotMetadata(properties); + }; + + /** + * Encodes the specified CreateTableFromSnapshotMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata} message CreateTableFromSnapshotMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTableFromSnapshotMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTableFromSnapshotMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata} message CreateTableFromSnapshotMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTableFromSnapshotMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateTableFromSnapshotMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @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.CreateTableFromSnapshotMetadata} CreateTableFromSnapshotMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTableFromSnapshotMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTableFromSnapshotMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateTableFromSnapshotMetadata} CreateTableFromSnapshotMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTableFromSnapshotMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTableFromSnapshotMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTableFromSnapshotMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + return null; + }; + + /** + * Creates a CreateTableFromSnapshotMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateTableFromSnapshotMetadata} CreateTableFromSnapshotMetadata + */ + CreateTableFromSnapshotMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.fromObject(object.originalRequest, long + 1); + } + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateTableFromSnapshotMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @static + * @param {google.bigtable.admin.v2.CreateTableFromSnapshotMetadata} message CreateTableFromSnapshotMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTableFromSnapshotMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + return object; + }; + + /** + * Converts this CreateTableFromSnapshotMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateTableFromSnapshotMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTableFromSnapshotMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTableFromSnapshotMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateTableFromSnapshotMetadata"; + }; + + return CreateTableFromSnapshotMetadata; + })(); + + v2.CreateBackupRequest = (function() { + + /** + * Properties of a CreateBackupRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateBackupRequest + * @property {string|null} [parent] CreateBackupRequest parent + * @property {string|null} [backupId] CreateBackupRequest backupId + * @property {google.bigtable.admin.v2.IBackup|null} [backup] CreateBackupRequest backup + */ + + /** + * Constructs a new CreateBackupRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateBackupRequest. + * @implements ICreateBackupRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateBackupRequest=} [properties] Properties to set + */ + function CreateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.parent = ""; + + /** + * CreateBackupRequest backupId. + * @member {string} backupId + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.backupId = ""; + + /** + * CreateBackupRequest backup. + * @member {google.bigtable.admin.v2.IBackup|null|undefined} backup + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.backup = null; + + /** + * Creates a new CreateBackupRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @static + * @param {google.bigtable.admin.v2.ICreateBackupRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateBackupRequest} CreateBackupRequest instance + */ + CreateBackupRequest.create = function create(properties) { + return new CreateBackupRequest(properties); + }; + + /** + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @static + * @param {google.bigtable.admin.v2.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.bigtable.admin.v2.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @static + * @param {google.bigtable.admin.v2.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @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.CreateBackupRequest} CreateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupId = reader.string(); + break; + } + case 3: { + message.backup = $root.google.bigtable.admin.v2.Backup.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateBackupRequest} CreateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) { + var error = $root.google.bigtable.admin.v2.Backup.verify(message.backup, long + 1); + if (error) + return "backup." + error; + } + return null; + }; + + /** + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateBackupRequest} CreateBackupRequest + */ + CreateBackupRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateBackupRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateBackupRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateBackupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.backup != null) { + if (!$util.isObject(object.backup)) + throw TypeError(".google.bigtable.admin.v2.CreateBackupRequest.backup: object expected"); + message.backup = $root.google.bigtable.admin.v2.Backup.fromObject(object.backup, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @static + * @param {google.bigtable.admin.v2.CreateBackupRequest} message CreateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupId = ""; + object.backup = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + object.backupId = message.backupId; + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options, q + 1); + return object; + }; + + /** + * Converts this CreateBackupRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateBackupRequest"; + }; + + return CreateBackupRequest; + })(); + + v2.CreateBackupMetadata = (function() { + + /** + * Properties of a CreateBackupMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICreateBackupMetadata + * @property {string|null} [name] CreateBackupMetadata name + * @property {string|null} [sourceTable] CreateBackupMetadata sourceTable + * @property {google.protobuf.ITimestamp|null} [startTime] CreateBackupMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] CreateBackupMetadata endTime + */ + + /** + * Constructs a new CreateBackupMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateBackupMetadata. + * @implements ICreateBackupMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICreateBackupMetadata=} [properties] Properties to set + */ + function CreateBackupMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupMetadata name. + * @member {string} name + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @instance + */ + CreateBackupMetadata.prototype.name = ""; + + /** + * CreateBackupMetadata sourceTable. + * @member {string} sourceTable + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @instance + */ + CreateBackupMetadata.prototype.sourceTable = ""; + + /** + * CreateBackupMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @instance + */ + CreateBackupMetadata.prototype.startTime = null; + + /** + * CreateBackupMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @instance + */ + CreateBackupMetadata.prototype.endTime = null; + + /** + * Creates a new CreateBackupMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateBackupMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateBackupMetadata} CreateBackupMetadata instance + */ + CreateBackupMetadata.create = function create(properties) { + return new CreateBackupMetadata(properties); + }; + + /** + * Encodes the specified CreateBackupMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateBackupMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateBackupMetadata} message CreateBackupMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceTable); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateBackupMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateBackupMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateBackupMetadata} message CreateBackupMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateBackupMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @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.CreateBackupMetadata} CreateBackupMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateBackupMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceTable = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateBackupMetadata} CreateBackupMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + if (!$util.isString(message.sourceTable)) + return "sourceTable: string expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a CreateBackupMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateBackupMetadata} CreateBackupMetadata + */ + CreateBackupMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateBackupMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateBackupMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.sourceTable != null) + message.sourceTable = String(object.sourceTable); + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateBackupMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @static + * @param {google.bigtable.admin.v2.CreateBackupMetadata} message CreateBackupMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.sourceTable = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + object.sourceTable = message.sourceTable; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this CreateBackupMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateBackupMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateBackupMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateBackupMetadata"; + }; + + return CreateBackupMetadata; + })(); + + v2.UpdateBackupRequest = (function() { + + /** + * Properties of an UpdateBackupRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateBackupRequest + * @property {google.bigtable.admin.v2.IBackup|null} [backup] UpdateBackupRequest backup + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask + */ + + /** + * Constructs a new UpdateBackupRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateBackupRequest. + * @implements IUpdateBackupRequest + * @constructor + * @param {google.bigtable.admin.v2.IUpdateBackupRequest=} [properties] Properties to set + */ + function UpdateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupRequest backup. + * @member {google.bigtable.admin.v2.IBackup|null|undefined} backup + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.backup = null; + + /** + * UpdateBackupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateBackupRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateBackupRequest} UpdateBackupRequest instance + */ + UpdateBackupRequest.create = function create(properties) { + return new UpdateBackupRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.bigtable.admin.v2.Backup.encode(message.backup, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @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.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.backup = $root.google.bigtable.admin.v2.Backup.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) { + var error = $root.google.bigtable.admin.v2.Backup.verify(message.backup, long + 1); + if (error) + return "backup." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateBackupRequest} UpdateBackupRequest + */ + UpdateBackupRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateBackupRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateBackupRequest(); + if (object.backup != null) { + if (!$util.isObject(object.backup)) + throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.bigtable.admin.v2.Backup.fromObject(object.backup, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @static + * @param {google.bigtable.admin.v2.UpdateBackupRequest} message UpdateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.backup = null; + object.updateMask = null; + } + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + return object; + }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateBackupRequest"; + }; + + return UpdateBackupRequest; + })(); + + v2.GetBackupRequest = (function() { + + /** + * Properties of a GetBackupRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + */ + + /** + * Constructs a new GetBackupRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetBackupRequest=} [properties] Properties to set + */ + function GetBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.name = ""; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @static + * @param {google.bigtable.admin.v2.IGetBackupRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetBackupRequest} GetBackupRequest instance + */ + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); + }; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @static + * @param {google.bigtable.admin.v2.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @static + * @param {google.bigtable.admin.v2.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @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.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetBackupRequest} GetBackupRequest + */ + GetBackupRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetBackupRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetBackupRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @static + * @param {google.bigtable.admin.v2.GetBackupRequest} message GetBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetBackupRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetBackupRequest"; + }; + + return GetBackupRequest; + })(); + + v2.DeleteBackupRequest = (function() { + + /** + * Properties of a DeleteBackupRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + */ + + /** + * Constructs a new DeleteBackupRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteBackupRequest=} [properties] Properties to set + */ + function DeleteBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.name = ""; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteBackupRequest} DeleteBackupRequest instance + */ + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @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.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteBackupRequest} DeleteBackupRequest + */ + DeleteBackupRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteBackupRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteBackupRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteBackupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @static + * @param {google.bigtable.admin.v2.DeleteBackupRequest} message DeleteBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteBackupRequest"; + }; + + return DeleteBackupRequest; + })(); + + v2.ListBackupsRequest = (function() { + + /** + * Properties of a ListBackupsRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + */ + + /** + * Constructs a new ListBackupsRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest + * @constructor + * @param {google.bigtable.admin.v2.IListBackupsRequest=} [properties] Properties to set + */ + function ListBackupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.parent = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageSize = 0; + + /** + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @static + * @param {google.bigtable.admin.v2.IListBackupsRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListBackupsRequest} ListBackupsRequest instance + */ + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); + }; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListBackupsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @static + * @param {google.bigtable.admin.v2.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListBackupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @static + * @param {google.bigtable.admin.v2.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @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.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListBackupsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.orderBy = reader.string(); + break; + } + case 4: { + message.pageSize = reader.int32(); + break; + } + case 5: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListBackupsRequest} ListBackupsRequest + */ + ListBackupsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListBackupsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListBackupsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListBackupsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @static + * @param {google.bigtable.admin.v2.ListBackupsRequest} message ListBackupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.orderBy = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + object.filter = message.filter; + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + object.orderBy = message.orderBy; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListBackupsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListBackupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListBackupsRequest"; + }; + + return ListBackupsRequest; + })(); + + v2.ListBackupsResponse = (function() { + + /** + * Properties of a ListBackupsResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + */ + + /** + * Constructs a new ListBackupsResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse + * @constructor + * @param {google.bigtable.admin.v2.IListBackupsResponse=} [properties] Properties to set + */ + function ListBackupsResponse(properties) { + this.backups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.backups = $util.emptyArray; + + /** + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @static + * @param {google.bigtable.admin.v2.IListBackupsResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListBackupsResponse} ListBackupsResponse instance + */ + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); + }; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListBackupsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @static + * @param {google.bigtable.admin.v2.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.bigtable.admin.v2.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListBackupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @static + * @param {google.bigtable.admin.v2.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @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.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListBackupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.bigtable.admin.v2.Backup.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.backups != null && Object.hasOwnProperty.call(message, "backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.bigtable.admin.v2.Backup.verify(message.backups[i], long + 1); + if (error) + return "backups." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListBackupsResponse} ListBackupsResponse + */ + ListBackupsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListBackupsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListBackupsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.bigtable.admin.v2.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (!$util.isObject(object.backups[i])) + throw TypeError(".google.bigtable.admin.v2.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.bigtable.admin.v2.Backup.fromObject(object.backups[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @static + * @param {google.bigtable.admin.v2.ListBackupsResponse} message ListBackupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.backups = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.bigtable.admin.v2.Backup.toObject(message.backups[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListBackupsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListBackupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListBackupsResponse"; + }; + + return ListBackupsResponse; + })(); + + v2.CopyBackupRequest = (function() { + + /** + * Properties of a CopyBackupRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICopyBackupRequest + * @property {string|null} [parent] CopyBackupRequest parent + * @property {string|null} [backupId] CopyBackupRequest backupId + * @property {string|null} [sourceBackup] CopyBackupRequest sourceBackup + * @property {google.protobuf.ITimestamp|null} [expireTime] CopyBackupRequest expireTime + */ + + /** + * Constructs a new CopyBackupRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CopyBackupRequest. + * @implements ICopyBackupRequest + * @constructor + * @param {google.bigtable.admin.v2.ICopyBackupRequest=} [properties] Properties to set + */ + function CopyBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CopyBackupRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @instance + */ + CopyBackupRequest.prototype.parent = ""; + + /** + * CopyBackupRequest backupId. + * @member {string} backupId + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @instance + */ + CopyBackupRequest.prototype.backupId = ""; + + /** + * CopyBackupRequest sourceBackup. + * @member {string} sourceBackup + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @instance + */ + CopyBackupRequest.prototype.sourceBackup = ""; + + /** + * CopyBackupRequest expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @instance + */ + CopyBackupRequest.prototype.expireTime = null; + + /** + * Creates a new CopyBackupRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @static + * @param {google.bigtable.admin.v2.ICopyBackupRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CopyBackupRequest} CopyBackupRequest instance + */ + CopyBackupRequest.create = function create(properties) { + return new CopyBackupRequest(properties); + }; + + /** + * Encodes the specified CopyBackupRequest message. Does not implicitly {@link google.bigtable.admin.v2.CopyBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @static + * @param {google.bigtable.admin.v2.ICopyBackupRequest} message CopyBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyBackupRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceBackup); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CopyBackupRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CopyBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @static + * @param {google.bigtable.admin.v2.ICopyBackupRequest} message CopyBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CopyBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @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.CopyBackupRequest} CopyBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyBackupRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CopyBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupId = reader.string(); + break; + } + case 3: { + message.sourceBackup = reader.string(); + break; + } + case 4: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CopyBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CopyBackupRequest} CopyBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CopyBackupRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopyBackupRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + if (!$util.isString(message.sourceBackup)) + return "sourceBackup: string expected"; + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates a CopyBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CopyBackupRequest} CopyBackupRequest + */ + CopyBackupRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CopyBackupRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CopyBackupRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CopyBackupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.sourceBackup != null) + message.sourceBackup = String(object.sourceBackup); + if (object.expireTime != null) { + if (!$util.isObject(object.expireTime)) + throw TypeError(".google.bigtable.admin.v2.CopyBackupRequest.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CopyBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @static + * @param {google.bigtable.admin.v2.CopyBackupRequest} message CopyBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopyBackupRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupId = ""; + object.sourceBackup = ""; + object.expireTime = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + object.backupId = message.backupId; + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + object.sourceBackup = message.sourceBackup; + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); + return object; + }; + + /** + * Converts this CopyBackupRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @instance + * @returns {Object.} JSON object + */ + CopyBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CopyBackupRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CopyBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopyBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CopyBackupRequest"; + }; + + return CopyBackupRequest; + })(); + + v2.CopyBackupMetadata = (function() { + + /** + * Properties of a CopyBackupMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICopyBackupMetadata + * @property {string|null} [name] CopyBackupMetadata name + * @property {google.bigtable.admin.v2.IBackupInfo|null} [sourceBackupInfo] CopyBackupMetadata sourceBackupInfo + * @property {google.bigtable.admin.v2.IOperationProgress|null} [progress] CopyBackupMetadata progress + */ + + /** + * Constructs a new CopyBackupMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CopyBackupMetadata. + * @implements ICopyBackupMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICopyBackupMetadata=} [properties] Properties to set + */ + function CopyBackupMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CopyBackupMetadata name. + * @member {string} name + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @instance + */ + CopyBackupMetadata.prototype.name = ""; + + /** + * CopyBackupMetadata sourceBackupInfo. + * @member {google.bigtable.admin.v2.IBackupInfo|null|undefined} sourceBackupInfo + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @instance + */ + CopyBackupMetadata.prototype.sourceBackupInfo = null; + + /** + * CopyBackupMetadata progress. + * @member {google.bigtable.admin.v2.IOperationProgress|null|undefined} progress + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @instance + */ + CopyBackupMetadata.prototype.progress = null; + + /** + * Creates a new CopyBackupMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @static + * @param {google.bigtable.admin.v2.ICopyBackupMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CopyBackupMetadata} CopyBackupMetadata instance + */ + CopyBackupMetadata.create = function create(properties) { + return new CopyBackupMetadata(properties); + }; + + /** + * Encodes the specified CopyBackupMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CopyBackupMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @static + * @param {google.bigtable.admin.v2.ICopyBackupMetadata} message CopyBackupMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyBackupMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sourceBackupInfo != null && Object.hasOwnProperty.call(message, "sourceBackupInfo")) + $root.google.bigtable.admin.v2.BackupInfo.encode(message.sourceBackupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CopyBackupMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CopyBackupMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @static + * @param {google.bigtable.admin.v2.ICopyBackupMetadata} message CopyBackupMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyBackupMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CopyBackupMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @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.CopyBackupMetadata} CopyBackupMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyBackupMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CopyBackupMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.progress = $root.google.bigtable.admin.v2.OperationProgress.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CopyBackupMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CopyBackupMetadata} CopyBackupMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyBackupMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CopyBackupMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopyBackupMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceBackupInfo != null && Object.hasOwnProperty.call(message, "sourceBackupInfo")) { + var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.sourceBackupInfo, long + 1); + if (error) + return "sourceBackupInfo." + error; + } + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) { + var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress, long + 1); + if (error) + return "progress." + error; + } + return null; + }; + + /** + * Creates a CopyBackupMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CopyBackupMetadata} CopyBackupMetadata + */ + CopyBackupMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CopyBackupMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CopyBackupMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.sourceBackupInfo != null) { + if (!$util.isObject(object.sourceBackupInfo)) + throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata.sourceBackupInfo: object expected"); + message.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.sourceBackupInfo, long + 1); + } + if (object.progress != null) { + if (!$util.isObject(object.progress)) + throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata.progress: object expected"); + message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CopyBackupMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @static + * @param {google.bigtable.admin.v2.CopyBackupMetadata} message CopyBackupMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopyBackupMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.sourceBackupInfo = null; + object.progress = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.sourceBackupInfo != null && Object.hasOwnProperty.call(message, "sourceBackupInfo")) + object.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.sourceBackupInfo, options, q + 1); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options, q + 1); + return object; + }; + + /** + * Converts this CopyBackupMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @instance + * @returns {Object.} JSON object + */ + CopyBackupMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CopyBackupMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CopyBackupMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopyBackupMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CopyBackupMetadata"; + }; + + return CopyBackupMetadata; + })(); + + v2.CreateAuthorizedViewRequest = (function() { + + /** + * Properties of a CreateAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateAuthorizedViewRequest + * @property {string|null} [parent] CreateAuthorizedViewRequest parent + * @property {string|null} [authorizedViewId] CreateAuthorizedViewRequest authorizedViewId + * @property {google.bigtable.admin.v2.IAuthorizedView|null} [authorizedView] CreateAuthorizedViewRequest authorizedView + */ + + /** + * Constructs a new CreateAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateAuthorizedViewRequest. + * @implements ICreateAuthorizedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest=} [properties] Properties to set + */ + function CreateAuthorizedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAuthorizedViewRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @instance + */ + CreateAuthorizedViewRequest.prototype.parent = ""; + + /** + * CreateAuthorizedViewRequest authorizedViewId. + * @member {string} authorizedViewId + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @instance + */ + CreateAuthorizedViewRequest.prototype.authorizedViewId = ""; + + /** + * CreateAuthorizedViewRequest authorizedView. + * @member {google.bigtable.admin.v2.IAuthorizedView|null|undefined} authorizedView + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @instance + */ + CreateAuthorizedViewRequest.prototype.authorizedView = null; + + /** + * Creates a new CreateAuthorizedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewRequest} CreateAuthorizedViewRequest instance + */ + CreateAuthorizedViewRequest.create = function create(properties) { + return new CreateAuthorizedViewRequest(properties); + }; + + /** + * Encodes the specified CreateAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest} message CreateAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAuthorizedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.authorizedViewId != null && Object.hasOwnProperty.call(message, "authorizedViewId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.authorizedViewId); + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedView, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest} message CreateAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateAuthorizedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @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.CreateAuthorizedViewRequest} CreateAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAuthorizedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.authorizedViewId = reader.string(); + break; + } + case 3: { + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewRequest} CreateAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAuthorizedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAuthorizedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.authorizedViewId != null && Object.hasOwnProperty.call(message, "authorizedViewId")) + if (!$util.isString(message.authorizedViewId)) + return "authorizedViewId: string expected"; + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView, long + 1); + if (error) + return "authorizedView." + error; + } + return null; + }; + + /** + * Creates a CreateAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewRequest} CreateAuthorizedViewRequest + */ + CreateAuthorizedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.authorizedViewId != null) + message.authorizedViewId = String(object.authorizedViewId); + if (object.authorizedView != null) { + if (!$util.isObject(object.authorizedView)) + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewRequest.authorizedView: object expected"); + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateAuthorizedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.CreateAuthorizedViewRequest} message CreateAuthorizedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAuthorizedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.authorizedViewId = ""; + object.authorizedView = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.authorizedViewId != null && Object.hasOwnProperty.call(message, "authorizedViewId")) + object.authorizedViewId = message.authorizedViewId; + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) + object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options, q + 1); + return object; + }; + + /** + * Converts this CreateAuthorizedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAuthorizedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAuthorizedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateAuthorizedViewRequest"; + }; + + return CreateAuthorizedViewRequest; + })(); + + v2.CreateAuthorizedViewMetadata = (function() { + + /** + * Properties of a CreateAuthorizedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICreateAuthorizedViewMetadata + * @property {google.bigtable.admin.v2.ICreateAuthorizedViewRequest|null} [originalRequest] CreateAuthorizedViewMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] CreateAuthorizedViewMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] CreateAuthorizedViewMetadata finishTime + */ + + /** + * Constructs a new CreateAuthorizedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateAuthorizedViewMetadata. + * @implements ICreateAuthorizedViewMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewMetadata=} [properties] Properties to set + */ + function CreateAuthorizedViewMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAuthorizedViewMetadata originalRequest. + * @member {google.bigtable.admin.v2.ICreateAuthorizedViewRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @instance + */ + CreateAuthorizedViewMetadata.prototype.originalRequest = null; + + /** + * CreateAuthorizedViewMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @instance + */ + CreateAuthorizedViewMetadata.prototype.requestTime = null; + + /** + * CreateAuthorizedViewMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @instance + */ + CreateAuthorizedViewMetadata.prototype.finishTime = null; + + /** + * Creates a new CreateAuthorizedViewMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} CreateAuthorizedViewMetadata instance + */ + CreateAuthorizedViewMetadata.create = function create(properties) { + return new CreateAuthorizedViewMetadata(properties); + }; + + /** + * Encodes the specified CreateAuthorizedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewMetadata} message CreateAuthorizedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAuthorizedViewMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAuthorizedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewMetadata} message CreateAuthorizedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAuthorizedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateAuthorizedViewMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @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.CreateAuthorizedViewMetadata} CreateAuthorizedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAuthorizedViewMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAuthorizedViewMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} CreateAuthorizedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAuthorizedViewMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAuthorizedViewMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAuthorizedViewMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + return null; + }; + + /** + * Creates a CreateAuthorizedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} CreateAuthorizedViewMetadata + */ + CreateAuthorizedViewMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.fromObject(object.originalRequest, long + 1); + } + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateAuthorizedViewMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} message CreateAuthorizedViewMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAuthorizedViewMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + return object; + }; + + /** + * Converts this CreateAuthorizedViewMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateAuthorizedViewMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAuthorizedViewMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAuthorizedViewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"; + }; + + return CreateAuthorizedViewMetadata; + })(); + + v2.ListAuthorizedViewsRequest = (function() { + + /** + * Properties of a ListAuthorizedViewsRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListAuthorizedViewsRequest + * @property {string|null} [parent] ListAuthorizedViewsRequest parent + * @property {number|null} [pageSize] ListAuthorizedViewsRequest pageSize + * @property {string|null} [pageToken] ListAuthorizedViewsRequest pageToken + * @property {google.bigtable.admin.v2.AuthorizedView.ResponseView|null} [view] ListAuthorizedViewsRequest view + */ + + /** + * Constructs a new ListAuthorizedViewsRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListAuthorizedViewsRequest. + * @implements IListAuthorizedViewsRequest + * @constructor + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest=} [properties] Properties to set + */ + function ListAuthorizedViewsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAuthorizedViewsRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @instance + */ + ListAuthorizedViewsRequest.prototype.parent = ""; + + /** + * ListAuthorizedViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @instance + */ + ListAuthorizedViewsRequest.prototype.pageSize = 0; + + /** + * ListAuthorizedViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @instance + */ + ListAuthorizedViewsRequest.prototype.pageToken = ""; + + /** + * ListAuthorizedViewsRequest view. + * @member {google.bigtable.admin.v2.AuthorizedView.ResponseView} view + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @instance + */ + ListAuthorizedViewsRequest.prototype.view = 0; + + /** + * Creates a new ListAuthorizedViewsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsRequest} ListAuthorizedViewsRequest instance + */ + ListAuthorizedViewsRequest.create = function create(properties) { + return new ListAuthorizedViewsRequest(properties); + }; + + /** + * Encodes the specified ListAuthorizedViewsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest} message ListAuthorizedViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAuthorizedViewsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListAuthorizedViewsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @static + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest} message ListAuthorizedViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAuthorizedViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListAuthorizedViewsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @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.ListAuthorizedViewsRequest} ListAuthorizedViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAuthorizedViewsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListAuthorizedViewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsRequest} ListAuthorizedViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAuthorizedViewsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAuthorizedViewsRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAuthorizedViewsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a ListAuthorizedViewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsRequest} ListAuthorizedViewsRequest + */ + ListAuthorizedViewsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "RESPONSE_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "NAME_ONLY": + case 1: + message.view = 1; + break; + case "BASIC": + case 2: + message.view = 2; + break; + case "FULL": + case 3: + message.view = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListAuthorizedViewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @static + * @param {google.bigtable.admin.v2.ListAuthorizedViewsRequest} message ListAuthorizedViewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAuthorizedViewsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "RESPONSE_VIEW_UNSPECIFIED" : 0; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + object.view = options.enums === String ? $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListAuthorizedViewsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAuthorizedViewsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAuthorizedViewsRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAuthorizedViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListAuthorizedViewsRequest"; + }; + + return ListAuthorizedViewsRequest; + })(); + + v2.ListAuthorizedViewsResponse = (function() { + + /** + * Properties of a ListAuthorizedViewsResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListAuthorizedViewsResponse + * @property {Array.|null} [authorizedViews] ListAuthorizedViewsResponse authorizedViews + * @property {string|null} [nextPageToken] ListAuthorizedViewsResponse nextPageToken + */ + + /** + * Constructs a new ListAuthorizedViewsResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListAuthorizedViewsResponse. + * @implements IListAuthorizedViewsResponse + * @constructor + * @param {google.bigtable.admin.v2.IListAuthorizedViewsResponse=} [properties] Properties to set + */ + function ListAuthorizedViewsResponse(properties) { + this.authorizedViews = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAuthorizedViewsResponse authorizedViews. + * @member {Array.} authorizedViews + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @instance + */ + ListAuthorizedViewsResponse.prototype.authorizedViews = $util.emptyArray; + + /** + * ListAuthorizedViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @instance + */ + ListAuthorizedViewsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAuthorizedViewsResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListAuthorizedViewsResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsResponse} ListAuthorizedViewsResponse instance + */ + ListAuthorizedViewsResponse.create = function create(properties) { + return new ListAuthorizedViewsResponse(properties); + }; + + /** + * Encodes the specified ListAuthorizedViewsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListAuthorizedViewsResponse} message ListAuthorizedViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAuthorizedViewsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.authorizedViews != null && message.authorizedViews.length) + for (var i = 0; i < message.authorizedViews.length; ++i) + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListAuthorizedViewsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @static + * @param {google.bigtable.admin.v2.IListAuthorizedViewsResponse} message ListAuthorizedViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAuthorizedViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListAuthorizedViewsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @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.ListAuthorizedViewsResponse} ListAuthorizedViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAuthorizedViewsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.authorizedViews && message.authorizedViews.length)) + message.authorizedViews = []; + message.authorizedViews.push($root.google.bigtable.admin.v2.AuthorizedView.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListAuthorizedViewsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsResponse} ListAuthorizedViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAuthorizedViewsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAuthorizedViewsResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAuthorizedViewsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.authorizedViews != null && Object.hasOwnProperty.call(message, "authorizedViews")) { + if (!Array.isArray(message.authorizedViews)) + return "authorizedViews: array expected"; + for (var i = 0; i < message.authorizedViews.length; ++i) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedViews[i], long + 1); + if (error) + return "authorizedViews." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAuthorizedViewsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsResponse} ListAuthorizedViewsResponse + */ + ListAuthorizedViewsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse(); + if (object.authorizedViews) { + if (!Array.isArray(object.authorizedViews)) + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse.authorizedViews: array expected"); + message.authorizedViews = []; + for (var i = 0; i < object.authorizedViews.length; ++i) { + if (!$util.isObject(object.authorizedViews[i])) + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse.authorizedViews: object expected"); + message.authorizedViews[i] = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedViews[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAuthorizedViewsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @static + * @param {google.bigtable.admin.v2.ListAuthorizedViewsResponse} message ListAuthorizedViewsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAuthorizedViewsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.authorizedViews = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.authorizedViews && message.authorizedViews.length) { + object.authorizedViews = []; + for (var j = 0; j < message.authorizedViews.length; ++j) + object.authorizedViews[j] = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedViews[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAuthorizedViewsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAuthorizedViewsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAuthorizedViewsResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAuthorizedViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListAuthorizedViewsResponse"; + }; + + return ListAuthorizedViewsResponse; + })(); + + v2.GetAuthorizedViewRequest = (function() { + + /** + * Properties of a GetAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetAuthorizedViewRequest + * @property {string|null} [name] GetAuthorizedViewRequest name + * @property {google.bigtable.admin.v2.AuthorizedView.ResponseView|null} [view] GetAuthorizedViewRequest view + */ + + /** + * Constructs a new GetAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetAuthorizedViewRequest. + * @implements IGetAuthorizedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest=} [properties] Properties to set + */ + function GetAuthorizedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAuthorizedViewRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @instance + */ + GetAuthorizedViewRequest.prototype.name = ""; + + /** + * GetAuthorizedViewRequest view. + * @member {google.bigtable.admin.v2.AuthorizedView.ResponseView} view + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @instance + */ + GetAuthorizedViewRequest.prototype.view = 0; + + /** + * Creates a new GetAuthorizedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetAuthorizedViewRequest} GetAuthorizedViewRequest instance + */ + GetAuthorizedViewRequest.create = function create(properties) { + return new GetAuthorizedViewRequest(properties); + }; + + /** + * Encodes the specified GetAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetAuthorizedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest} message GetAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAuthorizedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetAuthorizedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest} message GetAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetAuthorizedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @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.GetAuthorizedViewRequest} GetAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAuthorizedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetAuthorizedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetAuthorizedViewRequest} GetAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAuthorizedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAuthorizedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a GetAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetAuthorizedViewRequest} GetAuthorizedViewRequest + */ + GetAuthorizedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetAuthorizedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetAuthorizedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetAuthorizedViewRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "RESPONSE_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "NAME_ONLY": + case 1: + message.view = 1; + break; + case "BASIC": + case 2: + message.view = 2; + break; + case "FULL": + case 3: + message.view = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetAuthorizedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.GetAuthorizedViewRequest} message GetAuthorizedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAuthorizedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "RESPONSE_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + object.view = options.enums === String ? $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetAuthorizedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @instance + * @returns {Object.} JSON object + */ + GetAuthorizedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAuthorizedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetAuthorizedViewRequest"; + }; + + return GetAuthorizedViewRequest; + })(); + + v2.UpdateAuthorizedViewRequest = (function() { + + /** + * Properties of an UpdateAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateAuthorizedViewRequest + * @property {google.bigtable.admin.v2.IAuthorizedView|null} [authorizedView] UpdateAuthorizedViewRequest authorizedView + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAuthorizedViewRequest updateMask + * @property {boolean|null} [ignoreWarnings] UpdateAuthorizedViewRequest ignoreWarnings + */ + + /** + * Constructs a new UpdateAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateAuthorizedViewRequest. + * @implements IUpdateAuthorizedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest=} [properties] Properties to set + */ + function UpdateAuthorizedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAuthorizedViewRequest authorizedView. + * @member {google.bigtable.admin.v2.IAuthorizedView|null|undefined} authorizedView + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @instance + */ + UpdateAuthorizedViewRequest.prototype.authorizedView = null; + + /** + * UpdateAuthorizedViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @instance + */ + UpdateAuthorizedViewRequest.prototype.updateMask = null; + + /** + * UpdateAuthorizedViewRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @instance + */ + UpdateAuthorizedViewRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new UpdateAuthorizedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} UpdateAuthorizedViewRequest instance + */ + UpdateAuthorizedViewRequest.create = function create(properties) { + return new UpdateAuthorizedViewRequest(properties); + }; + + /** + * Encodes the specified UpdateAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest} message UpdateAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAuthorizedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedView, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); + return writer; + }; + + /** + * Encodes the specified UpdateAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest} message UpdateAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateAuthorizedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @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.UpdateAuthorizedViewRequest} UpdateAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAuthorizedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} UpdateAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAuthorizedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAuthorizedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView, long + 1); + if (error) + return "authorizedView." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; + return null; + }; + + /** + * Creates an UpdateAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} UpdateAuthorizedViewRequest + */ + UpdateAuthorizedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(); + if (object.authorizedView != null) { + if (!$util.isObject(object.authorizedView)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.authorizedView: object expected"); + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); + return message; + }; + + /** + * Creates a plain object from an UpdateAuthorizedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} message UpdateAuthorizedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAuthorizedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.authorizedView = null; + object.updateMask = null; + object.ignoreWarnings = false; + } + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) + object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; + return object; + }; + + /** + * Converts this UpdateAuthorizedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAuthorizedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAuthorizedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"; + }; + + return UpdateAuthorizedViewRequest; + })(); + + v2.UpdateAuthorizedViewMetadata = (function() { + + /** + * Properties of an UpdateAuthorizedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateAuthorizedViewMetadata + * @property {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest|null} [originalRequest] UpdateAuthorizedViewMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] UpdateAuthorizedViewMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] UpdateAuthorizedViewMetadata finishTime + */ + + /** + * Constructs a new UpdateAuthorizedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateAuthorizedViewMetadata. + * @implements IUpdateAuthorizedViewMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata=} [properties] Properties to set + */ + function UpdateAuthorizedViewMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAuthorizedViewMetadata originalRequest. + * @member {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @instance + */ + UpdateAuthorizedViewMetadata.prototype.originalRequest = null; + + /** + * UpdateAuthorizedViewMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @instance + */ + UpdateAuthorizedViewMetadata.prototype.requestTime = null; + + /** + * UpdateAuthorizedViewMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @instance + */ + UpdateAuthorizedViewMetadata.prototype.finishTime = null; + + /** + * Creates a new UpdateAuthorizedViewMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} UpdateAuthorizedViewMetadata instance + */ + UpdateAuthorizedViewMetadata.create = function create(properties) { + return new UpdateAuthorizedViewMetadata(properties); + }; + + /** + * Encodes the specified UpdateAuthorizedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata} message UpdateAuthorizedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAuthorizedViewMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateAuthorizedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata} message UpdateAuthorizedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAuthorizedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateAuthorizedViewMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @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.UpdateAuthorizedViewMetadata} UpdateAuthorizedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAuthorizedViewMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAuthorizedViewMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} UpdateAuthorizedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAuthorizedViewMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAuthorizedViewMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAuthorizedViewMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { + var error = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify(message.originalRequest, long + 1); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); + if (error) + return "finishTime." + error; + } + return null; + }; + + /** + * Creates an UpdateAuthorizedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} UpdateAuthorizedViewMetadata + */ + UpdateAuthorizedViewMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata(); + if (object.originalRequest != null) { + if (!$util.isObject(object.originalRequest)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.fromObject(object.originalRequest, long + 1); + } + if (object.requestTime != null) { + if (!$util.isObject(object.requestTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); + } + if (object.finishTime != null) { + if (!$util.isObject(object.finishTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAuthorizedViewMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} message UpdateAuthorizedViewMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAuthorizedViewMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + return object; + }; + + /** + * Converts this UpdateAuthorizedViewMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateAuthorizedViewMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAuthorizedViewMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAuthorizedViewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"; + }; + + return UpdateAuthorizedViewMetadata; + })(); + + v2.DeleteAuthorizedViewRequest = (function() { + + /** + * Properties of a DeleteAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteAuthorizedViewRequest + * @property {string|null} [name] DeleteAuthorizedViewRequest name + * @property {string|null} [etag] DeleteAuthorizedViewRequest etag + */ + + /** + * Constructs a new DeleteAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteAuthorizedViewRequest. + * @implements IDeleteAuthorizedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest=} [properties] Properties to set + */ + function DeleteAuthorizedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAuthorizedViewRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @instance + */ + DeleteAuthorizedViewRequest.prototype.name = ""; + + /** + * DeleteAuthorizedViewRequest etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @instance + */ + DeleteAuthorizedViewRequest.prototype.etag = ""; + + /** + * Creates a new DeleteAuthorizedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} DeleteAuthorizedViewRequest instance + */ + DeleteAuthorizedViewRequest.create = function create(properties) { + return new DeleteAuthorizedViewRequest(properties); + }; + + /** + * Encodes the specified DeleteAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteAuthorizedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest} message DeleteAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAuthorizedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteAuthorizedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest} message DeleteAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteAuthorizedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @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.DeleteAuthorizedViewRequest} DeleteAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAuthorizedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} DeleteAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAuthorizedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAuthorizedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} DeleteAuthorizedViewRequest + */ + DeleteAuthorizedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteAuthorizedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteAuthorizedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} message DeleteAuthorizedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAuthorizedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteAuthorizedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAuthorizedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAuthorizedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"; + }; + + return DeleteAuthorizedViewRequest; + })(); + + v2.CreateSchemaBundleRequest = (function() { + + /** + * Properties of a CreateSchemaBundleRequest. + * @memberof google.bigtable.admin.v2 + * @interface ICreateSchemaBundleRequest + * @property {string|null} [parent] CreateSchemaBundleRequest parent + * @property {string|null} [schemaBundleId] CreateSchemaBundleRequest schemaBundleId + * @property {google.bigtable.admin.v2.ISchemaBundle|null} [schemaBundle] CreateSchemaBundleRequest schemaBundle + */ + + /** + * Constructs a new CreateSchemaBundleRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateSchemaBundleRequest. + * @implements ICreateSchemaBundleRequest + * @constructor + * @param {google.bigtable.admin.v2.ICreateSchemaBundleRequest=} [properties] Properties to set + */ + function CreateSchemaBundleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSchemaBundleRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @instance + */ + CreateSchemaBundleRequest.prototype.parent = ""; + + /** + * CreateSchemaBundleRequest schemaBundleId. + * @member {string} schemaBundleId + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @instance + */ + CreateSchemaBundleRequest.prototype.schemaBundleId = ""; + + /** + * CreateSchemaBundleRequest schemaBundle. + * @member {google.bigtable.admin.v2.ISchemaBundle|null|undefined} schemaBundle + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @instance + */ + CreateSchemaBundleRequest.prototype.schemaBundle = null; + + /** + * Creates a new CreateSchemaBundleRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.ICreateSchemaBundleRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateSchemaBundleRequest} CreateSchemaBundleRequest instance + */ + CreateSchemaBundleRequest.create = function create(properties) { + return new CreateSchemaBundleRequest(properties); + }; + + /** + * Encodes the specified CreateSchemaBundleRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateSchemaBundleRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.ICreateSchemaBundleRequest} message CreateSchemaBundleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaBundleRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaBundleId); + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) + $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundle, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateSchemaBundleRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateSchemaBundleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.ICreateSchemaBundleRequest} message CreateSchemaBundleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateSchemaBundleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @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.CreateSchemaBundleRequest} CreateSchemaBundleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaBundleRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateSchemaBundleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.schemaBundleId = reader.string(); + break; + } + case 3: { + message.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSchemaBundleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateSchemaBundleRequest} CreateSchemaBundleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaBundleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSchemaBundleRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSchemaBundleRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + if (!$util.isString(message.schemaBundleId)) + return "schemaBundleId: string expected"; + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) { + var error = $root.google.bigtable.admin.v2.SchemaBundle.verify(message.schemaBundle, long + 1); + if (error) + return "schemaBundle." + error; + } + return null; + }; + + /** + * Creates a CreateSchemaBundleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateSchemaBundleRequest} CreateSchemaBundleRequest + */ + CreateSchemaBundleRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateSchemaBundleRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateSchemaBundleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.schemaBundleId != null) + message.schemaBundleId = String(object.schemaBundleId); + if (object.schemaBundle != null) { + if (!$util.isObject(object.schemaBundle)) + throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleRequest.schemaBundle: object expected"); + message.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.fromObject(object.schemaBundle, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateSchemaBundleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.CreateSchemaBundleRequest} message CreateSchemaBundleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSchemaBundleRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.schemaBundleId = ""; + object.schemaBundle = null; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + object.schemaBundleId = message.schemaBundleId; + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) + object.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundle, options, q + 1); + return object; + }; + + /** + * Converts this CreateSchemaBundleRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSchemaBundleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSchemaBundleRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateSchemaBundleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSchemaBundleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateSchemaBundleRequest"; + }; + + return CreateSchemaBundleRequest; + })(); + + v2.CreateSchemaBundleMetadata = (function() { + + /** + * Properties of a CreateSchemaBundleMetadata. + * @memberof google.bigtable.admin.v2 + * @interface ICreateSchemaBundleMetadata + * @property {string|null} [name] CreateSchemaBundleMetadata name + * @property {google.protobuf.ITimestamp|null} [startTime] CreateSchemaBundleMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] CreateSchemaBundleMetadata endTime + */ + + /** + * Constructs a new CreateSchemaBundleMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a CreateSchemaBundleMetadata. + * @implements ICreateSchemaBundleMetadata + * @constructor + * @param {google.bigtable.admin.v2.ICreateSchemaBundleMetadata=} [properties] Properties to set + */ + function CreateSchemaBundleMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSchemaBundleMetadata name. + * @member {string} name + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @instance + */ + CreateSchemaBundleMetadata.prototype.name = ""; + + /** + * CreateSchemaBundleMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @instance + */ + CreateSchemaBundleMetadata.prototype.startTime = null; + + /** + * CreateSchemaBundleMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @instance + */ + CreateSchemaBundleMetadata.prototype.endTime = null; + + /** + * Creates a new CreateSchemaBundleMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateSchemaBundleMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateSchemaBundleMetadata} CreateSchemaBundleMetadata instance + */ + CreateSchemaBundleMetadata.create = function create(properties) { + return new CreateSchemaBundleMetadata(properties); + }; + + /** + * Encodes the specified CreateSchemaBundleMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateSchemaBundleMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateSchemaBundleMetadata} message CreateSchemaBundleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaBundleMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateSchemaBundleMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateSchemaBundleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @static + * @param {google.bigtable.admin.v2.ICreateSchemaBundleMetadata} message CreateSchemaBundleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaBundleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CreateSchemaBundleMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @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.CreateSchemaBundleMetadata} CreateSchemaBundleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaBundleMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateSchemaBundleMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSchemaBundleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.CreateSchemaBundleMetadata} CreateSchemaBundleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaBundleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSchemaBundleMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSchemaBundleMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a CreateSchemaBundleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.CreateSchemaBundleMetadata} CreateSchemaBundleMetadata + */ + CreateSchemaBundleMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.CreateSchemaBundleMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.CreateSchemaBundleMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateSchemaBundleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @static + * @param {google.bigtable.admin.v2.CreateSchemaBundleMetadata} message CreateSchemaBundleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSchemaBundleMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this CreateSchemaBundleMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateSchemaBundleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSchemaBundleMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.CreateSchemaBundleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSchemaBundleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateSchemaBundleMetadata"; + }; + + return CreateSchemaBundleMetadata; + })(); + + v2.UpdateSchemaBundleRequest = (function() { + + /** + * Properties of an UpdateSchemaBundleRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateSchemaBundleRequest + * @property {google.bigtable.admin.v2.ISchemaBundle|null} [schemaBundle] UpdateSchemaBundleRequest schemaBundle + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSchemaBundleRequest updateMask + * @property {boolean|null} [ignoreWarnings] UpdateSchemaBundleRequest ignoreWarnings + */ + + /** + * Constructs a new UpdateSchemaBundleRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateSchemaBundleRequest. + * @implements IUpdateSchemaBundleRequest + * @constructor + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleRequest=} [properties] Properties to set + */ + function UpdateSchemaBundleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSchemaBundleRequest schemaBundle. + * @member {google.bigtable.admin.v2.ISchemaBundle|null|undefined} schemaBundle + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @instance + */ + UpdateSchemaBundleRequest.prototype.schemaBundle = null; + + /** + * UpdateSchemaBundleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @instance + */ + UpdateSchemaBundleRequest.prototype.updateMask = null; + + /** + * UpdateSchemaBundleRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @instance + */ + UpdateSchemaBundleRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new UpdateSchemaBundleRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateSchemaBundleRequest} UpdateSchemaBundleRequest instance + */ + UpdateSchemaBundleRequest.create = function create(properties) { + return new UpdateSchemaBundleRequest(properties); + }; + + /** + * Encodes the specified UpdateSchemaBundleRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateSchemaBundleRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleRequest} message UpdateSchemaBundleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaBundleRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) + $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundle, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); + return writer; + }; + + /** + * Encodes the specified UpdateSchemaBundleRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateSchemaBundleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleRequest} message UpdateSchemaBundleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateSchemaBundleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @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.UpdateSchemaBundleRequest} UpdateSchemaBundleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaBundleRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateSchemaBundleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.ignoreWarnings = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSchemaBundleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateSchemaBundleRequest} UpdateSchemaBundleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaBundleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSchemaBundleRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSchemaBundleRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) { + var error = $root.google.bigtable.admin.v2.SchemaBundle.verify(message.schemaBundle, long + 1); + if (error) + return "schemaBundle." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; + return null; + }; + + /** + * Creates an UpdateSchemaBundleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateSchemaBundleRequest} UpdateSchemaBundleRequest + */ + UpdateSchemaBundleRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateSchemaBundleRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateSchemaBundleRequest(); + if (object.schemaBundle != null) { + if (!$util.isObject(object.schemaBundle)) + throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleRequest.schemaBundle: object expected"); + message.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.fromObject(object.schemaBundle, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); + return message; + }; + + /** + * Creates a plain object from an UpdateSchemaBundleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.UpdateSchemaBundleRequest} message UpdateSchemaBundleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSchemaBundleRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.schemaBundle = null; + object.updateMask = null; + object.ignoreWarnings = false; + } + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) + object.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundle, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; + return object; + }; + + /** + * Converts this UpdateSchemaBundleRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSchemaBundleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSchemaBundleRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSchemaBundleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateSchemaBundleRequest"; + }; + + return UpdateSchemaBundleRequest; + })(); + + v2.UpdateSchemaBundleMetadata = (function() { + + /** + * Properties of an UpdateSchemaBundleMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateSchemaBundleMetadata + * @property {string|null} [name] UpdateSchemaBundleMetadata name + * @property {google.protobuf.ITimestamp|null} [startTime] UpdateSchemaBundleMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UpdateSchemaBundleMetadata endTime + */ + + /** + * Constructs a new UpdateSchemaBundleMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateSchemaBundleMetadata. + * @implements IUpdateSchemaBundleMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleMetadata=} [properties] Properties to set + */ + function UpdateSchemaBundleMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSchemaBundleMetadata name. + * @member {string} name + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @instance + */ + UpdateSchemaBundleMetadata.prototype.name = ""; + + /** + * UpdateSchemaBundleMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @instance + */ + UpdateSchemaBundleMetadata.prototype.startTime = null; + + /** + * UpdateSchemaBundleMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @instance + */ + UpdateSchemaBundleMetadata.prototype.endTime = null; + + /** + * Creates a new UpdateSchemaBundleMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateSchemaBundleMetadata} UpdateSchemaBundleMetadata instance + */ + UpdateSchemaBundleMetadata.create = function create(properties) { + return new UpdateSchemaBundleMetadata(properties); + }; + + /** + * Encodes the specified UpdateSchemaBundleMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateSchemaBundleMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleMetadata} message UpdateSchemaBundleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaBundleMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSchemaBundleMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateSchemaBundleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateSchemaBundleMetadata} message UpdateSchemaBundleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaBundleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UpdateSchemaBundleMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @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.UpdateSchemaBundleMetadata} UpdateSchemaBundleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaBundleMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateSchemaBundleMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSchemaBundleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateSchemaBundleMetadata} UpdateSchemaBundleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaBundleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSchemaBundleMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSchemaBundleMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an UpdateSchemaBundleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateSchemaBundleMetadata} UpdateSchemaBundleMetadata + */ + UpdateSchemaBundleMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateSchemaBundleMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.UpdateSchemaBundleMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSchemaBundleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateSchemaBundleMetadata} message UpdateSchemaBundleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSchemaBundleMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + return object; + }; + + /** + * Converts this UpdateSchemaBundleMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateSchemaBundleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSchemaBundleMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateSchemaBundleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSchemaBundleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateSchemaBundleMetadata"; + }; + + return UpdateSchemaBundleMetadata; + })(); + + v2.GetSchemaBundleRequest = (function() { + + /** + * Properties of a GetSchemaBundleRequest. + * @memberof google.bigtable.admin.v2 + * @interface IGetSchemaBundleRequest + * @property {string|null} [name] GetSchemaBundleRequest name + */ + + /** + * Constructs a new GetSchemaBundleRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GetSchemaBundleRequest. + * @implements IGetSchemaBundleRequest + * @constructor + * @param {google.bigtable.admin.v2.IGetSchemaBundleRequest=} [properties] Properties to set + */ + function GetSchemaBundleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSchemaBundleRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @instance + */ + GetSchemaBundleRequest.prototype.name = ""; + + /** + * Creates a new GetSchemaBundleRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IGetSchemaBundleRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetSchemaBundleRequest} GetSchemaBundleRequest instance + */ + GetSchemaBundleRequest.create = function create(properties) { + return new GetSchemaBundleRequest(properties); + }; + + /** + * Encodes the specified GetSchemaBundleRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetSchemaBundleRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IGetSchemaBundleRequest} message GetSchemaBundleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaBundleRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetSchemaBundleRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetSchemaBundleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IGetSchemaBundleRequest} message GetSchemaBundleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetSchemaBundleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @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.GetSchemaBundleRequest} GetSchemaBundleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaBundleRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetSchemaBundleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetSchemaBundleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetSchemaBundleRequest} GetSchemaBundleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaBundleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSchemaBundleRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSchemaBundleRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetSchemaBundleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetSchemaBundleRequest} GetSchemaBundleRequest + */ + GetSchemaBundleRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GetSchemaBundleRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetSchemaBundleRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GetSchemaBundleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSchemaBundleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.GetSchemaBundleRequest} message GetSchemaBundleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSchemaBundleRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetSchemaBundleRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @instance + * @returns {Object.} JSON object + */ + GetSchemaBundleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSchemaBundleRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetSchemaBundleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSchemaBundleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetSchemaBundleRequest"; + }; + + return GetSchemaBundleRequest; + })(); + + v2.ListSchemaBundlesRequest = (function() { + + /** + * Properties of a ListSchemaBundlesRequest. + * @memberof google.bigtable.admin.v2 + * @interface IListSchemaBundlesRequest + * @property {string|null} [parent] ListSchemaBundlesRequest parent + * @property {number|null} [pageSize] ListSchemaBundlesRequest pageSize + * @property {string|null} [pageToken] ListSchemaBundlesRequest pageToken + */ + + /** + * Constructs a new ListSchemaBundlesRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListSchemaBundlesRequest. + * @implements IListSchemaBundlesRequest + * @constructor + * @param {google.bigtable.admin.v2.IListSchemaBundlesRequest=} [properties] Properties to set + */ + function ListSchemaBundlesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSchemaBundlesRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @instance + */ + ListSchemaBundlesRequest.prototype.parent = ""; + + /** + * ListSchemaBundlesRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @instance + */ + ListSchemaBundlesRequest.prototype.pageSize = 0; + + /** + * ListSchemaBundlesRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @instance + */ + ListSchemaBundlesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListSchemaBundlesRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @static + * @param {google.bigtable.admin.v2.IListSchemaBundlesRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListSchemaBundlesRequest} ListSchemaBundlesRequest instance + */ + ListSchemaBundlesRequest.create = function create(properties) { + return new ListSchemaBundlesRequest(properties); + }; + + /** + * Encodes the specified ListSchemaBundlesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListSchemaBundlesRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @static + * @param {google.bigtable.admin.v2.IListSchemaBundlesRequest} message ListSchemaBundlesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaBundlesRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListSchemaBundlesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListSchemaBundlesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @static + * @param {google.bigtable.admin.v2.IListSchemaBundlesRequest} message ListSchemaBundlesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaBundlesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListSchemaBundlesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @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.ListSchemaBundlesRequest} ListSchemaBundlesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaBundlesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListSchemaBundlesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListSchemaBundlesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListSchemaBundlesRequest} ListSchemaBundlesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaBundlesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSchemaBundlesRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSchemaBundlesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListSchemaBundlesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListSchemaBundlesRequest} ListSchemaBundlesRequest + */ + ListSchemaBundlesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListSchemaBundlesRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListSchemaBundlesRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListSchemaBundlesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListSchemaBundlesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @static + * @param {google.bigtable.admin.v2.ListSchemaBundlesRequest} message ListSchemaBundlesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSchemaBundlesRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListSchemaBundlesRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSchemaBundlesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSchemaBundlesRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListSchemaBundlesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSchemaBundlesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListSchemaBundlesRequest"; + }; + + return ListSchemaBundlesRequest; + })(); + + v2.ListSchemaBundlesResponse = (function() { + + /** + * Properties of a ListSchemaBundlesResponse. + * @memberof google.bigtable.admin.v2 + * @interface IListSchemaBundlesResponse + * @property {Array.|null} [schemaBundles] ListSchemaBundlesResponse schemaBundles + * @property {string|null} [nextPageToken] ListSchemaBundlesResponse nextPageToken + */ + + /** + * Constructs a new ListSchemaBundlesResponse. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ListSchemaBundlesResponse. + * @implements IListSchemaBundlesResponse + * @constructor + * @param {google.bigtable.admin.v2.IListSchemaBundlesResponse=} [properties] Properties to set + */ + function ListSchemaBundlesResponse(properties) { + this.schemaBundles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSchemaBundlesResponse schemaBundles. + * @member {Array.} schemaBundles + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @instance + */ + ListSchemaBundlesResponse.prototype.schemaBundles = $util.emptyArray; + + /** + * ListSchemaBundlesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @instance + */ + ListSchemaBundlesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSchemaBundlesResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @static + * @param {google.bigtable.admin.v2.IListSchemaBundlesResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListSchemaBundlesResponse} ListSchemaBundlesResponse instance + */ + ListSchemaBundlesResponse.create = function create(properties) { + return new ListSchemaBundlesResponse(properties); + }; + + /** + * Encodes the specified ListSchemaBundlesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListSchemaBundlesResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @static + * @param {google.bigtable.admin.v2.IListSchemaBundlesResponse} message ListSchemaBundlesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaBundlesResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.schemaBundles != null && message.schemaBundles.length) + for (var i = 0; i < message.schemaBundles.length; ++i) + $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListSchemaBundlesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListSchemaBundlesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @static + * @param {google.bigtable.admin.v2.IListSchemaBundlesResponse} message ListSchemaBundlesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaBundlesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListSchemaBundlesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @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.ListSchemaBundlesResponse} ListSchemaBundlesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaBundlesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListSchemaBundlesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.schemaBundles && message.schemaBundles.length)) + message.schemaBundles = []; + message.schemaBundles.push($root.google.bigtable.admin.v2.SchemaBundle.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListSchemaBundlesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ListSchemaBundlesResponse} ListSchemaBundlesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaBundlesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSchemaBundlesResponse message. + * @function verify + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSchemaBundlesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.schemaBundles != null && Object.hasOwnProperty.call(message, "schemaBundles")) { + if (!Array.isArray(message.schemaBundles)) + return "schemaBundles: array expected"; + for (var i = 0; i < message.schemaBundles.length; ++i) { + var error = $root.google.bigtable.admin.v2.SchemaBundle.verify(message.schemaBundles[i], long + 1); + if (error) + return "schemaBundles." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSchemaBundlesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ListSchemaBundlesResponse} ListSchemaBundlesResponse + */ + ListSchemaBundlesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ListSchemaBundlesResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListSchemaBundlesResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ListSchemaBundlesResponse(); + if (object.schemaBundles) { + if (!Array.isArray(object.schemaBundles)) + throw TypeError(".google.bigtable.admin.v2.ListSchemaBundlesResponse.schemaBundles: array expected"); + message.schemaBundles = []; + for (var i = 0; i < object.schemaBundles.length; ++i) { + if (!$util.isObject(object.schemaBundles[i])) + throw TypeError(".google.bigtable.admin.v2.ListSchemaBundlesResponse.schemaBundles: object expected"); + message.schemaBundles[i] = $root.google.bigtable.admin.v2.SchemaBundle.fromObject(object.schemaBundles[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSchemaBundlesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @static + * @param {google.bigtable.admin.v2.ListSchemaBundlesResponse} message ListSchemaBundlesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSchemaBundlesResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.schemaBundles = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.schemaBundles && message.schemaBundles.length) { + object.schemaBundles = []; + for (var j = 0; j < message.schemaBundles.length; ++j) + object.schemaBundles[j] = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundles[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSchemaBundlesResponse to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @instance + * @returns {Object.} JSON object + */ + ListSchemaBundlesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSchemaBundlesResponse + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ListSchemaBundlesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSchemaBundlesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ListSchemaBundlesResponse"; + }; + + return ListSchemaBundlesResponse; + })(); + + v2.DeleteSchemaBundleRequest = (function() { + + /** + * Properties of a DeleteSchemaBundleRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteSchemaBundleRequest + * @property {string|null} [name] DeleteSchemaBundleRequest name + * @property {string|null} [etag] DeleteSchemaBundleRequest etag + */ + + /** + * Constructs a new DeleteSchemaBundleRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteSchemaBundleRequest. + * @implements IDeleteSchemaBundleRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteSchemaBundleRequest=} [properties] Properties to set + */ + function DeleteSchemaBundleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSchemaBundleRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @instance + */ + DeleteSchemaBundleRequest.prototype.name = ""; + + /** + * DeleteSchemaBundleRequest etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @instance + */ + DeleteSchemaBundleRequest.prototype.etag = ""; + + /** + * Creates a new DeleteSchemaBundleRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteSchemaBundleRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteSchemaBundleRequest} DeleteSchemaBundleRequest instance + */ + DeleteSchemaBundleRequest.create = function create(properties) { + return new DeleteSchemaBundleRequest(properties); + }; + + /** + * Encodes the specified DeleteSchemaBundleRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteSchemaBundleRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteSchemaBundleRequest} message DeleteSchemaBundleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaBundleRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteSchemaBundleRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteSchemaBundleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteSchemaBundleRequest} message DeleteSchemaBundleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteSchemaBundleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @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.DeleteSchemaBundleRequest} DeleteSchemaBundleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaBundleRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteSchemaBundleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSchemaBundleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteSchemaBundleRequest} DeleteSchemaBundleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaBundleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSchemaBundleRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSchemaBundleRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteSchemaBundleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteSchemaBundleRequest} DeleteSchemaBundleRequest + */ + DeleteSchemaBundleRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteSchemaBundleRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteSchemaBundleRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.DeleteSchemaBundleRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteSchemaBundleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @static + * @param {google.bigtable.admin.v2.DeleteSchemaBundleRequest} message DeleteSchemaBundleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSchemaBundleRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteSchemaBundleRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSchemaBundleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSchemaBundleRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteSchemaBundleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSchemaBundleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteSchemaBundleRequest"; + }; + + return DeleteSchemaBundleRequest; + })(); + + v2.RestoreInfo = (function() { + + /** + * Properties of a RestoreInfo. + * @memberof google.bigtable.admin.v2 + * @interface IRestoreInfo + * @property {google.bigtable.admin.v2.RestoreSourceType|null} [sourceType] RestoreInfo sourceType + * @property {google.bigtable.admin.v2.IBackupInfo|null} [backupInfo] RestoreInfo backupInfo + */ + + /** + * Constructs a new RestoreInfo. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a RestoreInfo. + * @implements IRestoreInfo + * @constructor + * @param {google.bigtable.admin.v2.IRestoreInfo=} [properties] Properties to set + */ + function RestoreInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreInfo sourceType. + * @member {google.bigtable.admin.v2.RestoreSourceType} sourceType + * @memberof google.bigtable.admin.v2.RestoreInfo + * @instance + */ + RestoreInfo.prototype.sourceType = 0; + + /** + * RestoreInfo backupInfo. + * @member {google.bigtable.admin.v2.IBackupInfo|null|undefined} backupInfo + * @memberof google.bigtable.admin.v2.RestoreInfo + * @instance + */ + RestoreInfo.prototype.backupInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreInfo sourceInfo. + * @member {"backupInfo"|undefined} sourceInfo + * @memberof google.bigtable.admin.v2.RestoreInfo + * @instance + */ + Object.defineProperty(RestoreInfo.prototype, "sourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["backupInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {google.bigtable.admin.v2.IRestoreInfo=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo instance + */ + RestoreInfo.create = function create(properties) { + return new RestoreInfo(properties); + }; + + /** + * Encodes the specified RestoreInfo message. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {google.bigtable.admin.v2.IRestoreInfo} message RestoreInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) + $root.google.bigtable.admin.v2.BackupInfo.encode(message.backupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {google.bigtable.admin.v2.IRestoreInfo} message RestoreInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RestoreInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.RestoreInfo + * @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.RestoreInfo} RestoreInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.RestoreInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceType = reader.int32(); + break; + } + case 2: { + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreInfo message. + * @function verify + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + break; + } + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) { + properties.sourceInfo = 1; + { + var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo, long + 1); + if (error) + return "backupInfo." + error; + } + } + return null; + }; + + /** + * Creates a RestoreInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo + */ + RestoreInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.RestoreInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.RestoreInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.RestoreInfo(); + switch (object.sourceType) { + default: + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; + break; + } + break; + case "RESTORE_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.sourceType = 0; + break; + case "BACKUP": + case 1: + message.sourceType = 1; + break; + } + if (object.backupInfo != null) { + if (!$util.isObject(object.backupInfo)) + throw TypeError(".google.bigtable.admin.v2.RestoreInfo.backupInfo: object expected"); + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RestoreInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {google.bigtable.admin.v2.RestoreInfo} message RestoreInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.sourceType = options.enums === String ? "RESTORE_SOURCE_TYPE_UNSPECIFIED" : 0; + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + object.sourceType = options.enums === String ? $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] === undefined ? message.sourceType : $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] : message.sourceType; + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) { + object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options, q + 1); + if (options.oneofs) + object.sourceInfo = "backupInfo"; + } + return object; + }; + + /** + * Converts this RestoreInfo to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.RestoreInfo + * @instance + * @returns {Object.} JSON object + */ + RestoreInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreInfo + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.RestoreInfo"; + }; + + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.retentionPeriod, long + 1); + 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, long) { + if (object instanceof $root.google.bigtable.admin.v2.ChangeStreamConfig) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); + if (object.retentionPeriod != null) { + if (!$util.isObject(object.retentionPeriod)) + throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig.retentionPeriod: object expected"); + message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.retentionPeriod = null; + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options, q + 1); + 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() { + + /** + * Properties of a Table. + * @memberof google.bigtable.admin.v2 + * @interface ITable + * @property {string|null} [name] Table name + * @property {Object.|null} [clusterStates] Table clusterStates + * @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 + * @property {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy|null} [automatedBackupPolicy] Table automatedBackupPolicy + * @property {google.bigtable.admin.v2.ITieredStorageConfig|null} [tieredStorageConfig] Table tieredStorageConfig + * @property {google.bigtable.admin.v2.Type.IStruct|null} [rowKeySchema] Table rowKeySchema + */ + + /** + * Constructs a new Table. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a Table. + * @implements ITable + * @constructor + * @param {google.bigtable.admin.v2.ITable=} [properties] Properties to set + */ + function Table(properties) { + this.clusterStates = {}; + this.columnFamilies = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Table name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.name = ""; + + /** + * Table clusterStates. + * @member {Object.} clusterStates + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.clusterStates = $util.emptyObject; + + /** + * Table columnFamilies. + * @member {Object.} columnFamilies + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.columnFamilies = $util.emptyObject; + + /** + * Table granularity. + * @member {google.bigtable.admin.v2.Table.TimestampGranularity} granularity + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.granularity = 0; + + /** + * Table restoreInfo. + * @member {google.bigtable.admin.v2.IRestoreInfo|null|undefined} restoreInfo + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + 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 + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.deletionProtection = false; + + /** + * Table automatedBackupPolicy. + * @member {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy|null|undefined} automatedBackupPolicy + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.automatedBackupPolicy = null; + + /** + * Table tieredStorageConfig. + * @member {google.bigtable.admin.v2.ITieredStorageConfig|null|undefined} tieredStorageConfig + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.tieredStorageConfig = null; + + /** + * Table rowKeySchema. + * @member {google.bigtable.admin.v2.Type.IStruct|null|undefined} rowKeySchema + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.rowKeySchema = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Table automatedBackupConfig. + * @member {"automatedBackupPolicy"|undefined} automatedBackupConfig + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Object.defineProperty(Table.prototype, "automatedBackupConfig", { + get: $util.oneOfGetter($oneOfFields = ["automatedBackupPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Table instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {google.bigtable.admin.v2.ITable=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Table} Table instance + */ + Table.create = function create(properties) { + return new Table(properties); + }; + + /** + * Encodes the specified Table message. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {google.bigtable.admin.v2.ITable} message Table message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Table.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.clusterStates != null && Object.hasOwnProperty.call(message, "clusterStates")) + for (var keys = Object.keys(message.clusterStates), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.admin.v2.Table.ClusterState.encode(message.clusterStates[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + } + if (message.columnFamilies != null && Object.hasOwnProperty.call(message, "columnFamilies")) + for (var keys = Object.keys(message.columnFamilies), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.admin.v2.ColumnFamily.encode(message.columnFamilies[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + } + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + 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(), q + 1).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(), q + 1).ldelim(); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.deletionProtection); + if (message.automatedBackupPolicy != null && Object.hasOwnProperty.call(message, "automatedBackupPolicy")) + $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.encode(message.automatedBackupPolicy, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); + if (message.tieredStorageConfig != null && Object.hasOwnProperty.call(message, "tieredStorageConfig")) + $root.google.bigtable.admin.v2.TieredStorageConfig.encode(message.tieredStorageConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); + if (message.rowKeySchema != null && Object.hasOwnProperty.call(message, "rowKeySchema")) + $root.google.bigtable.admin.v2.Type.Struct.encode(message.rowKeySchema, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Table message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {google.bigtable.admin.v2.ITable} message Table message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Table.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Table message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Table + * @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.Table} Table + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Table.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Table(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (message.clusterStates === $util.emptyObject) + message.clusterStates = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.bigtable.admin.v2.Table.ClusterState.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.clusterStates, key); + message.clusterStates[key] = value; + break; + } + case 3: { + if (message.columnFamilies === $util.emptyObject) + message.columnFamilies = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.columnFamilies, key); + message.columnFamilies[key] = value; + break; + } + case 4: { + message.granularity = reader.int32(); + break; + } + case 6: { + message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.deletionProtection = reader.bool(); + break; + } + case 13: { + message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 14: { + message.tieredStorageConfig = $root.google.bigtable.admin.v2.TieredStorageConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 15: { + message.rowKeySchema = $root.google.bigtable.admin.v2.Type.Struct.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Table message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Table} Table + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Table.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Table message. + * @function verify + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Table.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.clusterStates != null && Object.hasOwnProperty.call(message, "clusterStates")) { + if (!$util.isObject(message.clusterStates)) + return "clusterStates: object expected"; + var key = Object.keys(message.clusterStates); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.admin.v2.Table.ClusterState.verify(message.clusterStates[key[i]], long + 1); + if (error) + return "clusterStates." + error; + } + } + if (message.columnFamilies != null && Object.hasOwnProperty.call(message, "columnFamilies")) { + if (!$util.isObject(message.columnFamilies)) + return "columnFamilies: object expected"; + var key = Object.keys(message.columnFamilies); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.columnFamilies[key[i]], long + 1); + if (error) + return "columnFamilies." + error; + } + } + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + break; + } + if (message.restoreInfo != null && Object.hasOwnProperty.call(message, "restoreInfo")) { + var error = $root.google.bigtable.admin.v2.RestoreInfo.verify(message.restoreInfo, long + 1); + if (error) + return "restoreInfo." + error; + } + if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) { + var error = $root.google.bigtable.admin.v2.ChangeStreamConfig.verify(message.changeStreamConfig, long + 1); + if (error) + return "changeStreamConfig." + error; + } + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + if (message.automatedBackupPolicy != null && Object.hasOwnProperty.call(message, "automatedBackupPolicy")) { + properties.automatedBackupConfig = 1; + { + var error = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify(message.automatedBackupPolicy, long + 1); + if (error) + return "automatedBackupPolicy." + error; + } + } + if (message.tieredStorageConfig != null && Object.hasOwnProperty.call(message, "tieredStorageConfig")) { + var error = $root.google.bigtable.admin.v2.TieredStorageConfig.verify(message.tieredStorageConfig, long + 1); + if (error) + return "tieredStorageConfig." + error; + } + if (message.rowKeySchema != null && Object.hasOwnProperty.call(message, "rowKeySchema")) { + var error = $root.google.bigtable.admin.v2.Type.Struct.verify(message.rowKeySchema, long + 1); + if (error) + return "rowKeySchema." + error; + } + return null; + }; + + /** + * Creates a Table message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Table} Table + */ + Table.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Table) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Table: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Table(); + if (object.name != null) + message.name = String(object.name); + if (object.clusterStates) { + if (!$util.isObject(object.clusterStates)) + throw TypeError(".google.bigtable.admin.v2.Table.clusterStates: object expected"); + message.clusterStates = {}; + for (var keys = Object.keys(object.clusterStates), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.clusterStates, keys[i]); + if (!$util.isObject(object.clusterStates[keys[i]])) + throw TypeError(".google.bigtable.admin.v2.Table.clusterStates: object expected"); + message.clusterStates[keys[i]] = $root.google.bigtable.admin.v2.Table.ClusterState.fromObject(object.clusterStates[keys[i]], long + 1); + } + } + if (object.columnFamilies) { + if (!$util.isObject(object.columnFamilies)) + throw TypeError(".google.bigtable.admin.v2.Table.columnFamilies: object expected"); + message.columnFamilies = {}; + for (var keys = Object.keys(object.columnFamilies), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.columnFamilies, keys[i]); + if (!$util.isObject(object.columnFamilies[keys[i]])) + throw TypeError(".google.bigtable.admin.v2.Table.columnFamilies: object expected"); + message.columnFamilies[keys[i]] = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.columnFamilies[keys[i]], long + 1); + } + } + switch (object.granularity) { + default: + if (typeof object.granularity === "number") { + message.granularity = object.granularity; + break; + } + break; + case "TIMESTAMP_GRANULARITY_UNSPECIFIED": + case 0: + message.granularity = 0; + break; + case "MILLIS": + case 1: + message.granularity = 1; + break; + } + if (object.restoreInfo != null) { + if (!$util.isObject(object.restoreInfo)) + throw TypeError(".google.bigtable.admin.v2.Table.restoreInfo: object expected"); + message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.fromObject(object.restoreInfo, long + 1); + } + if (object.changeStreamConfig != null) { + if (!$util.isObject(object.changeStreamConfig)) + throw TypeError(".google.bigtable.admin.v2.Table.changeStreamConfig: object expected"); + message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.fromObject(object.changeStreamConfig, long + 1); + } + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + if (object.automatedBackupPolicy != null) { + if (!$util.isObject(object.automatedBackupPolicy)) + throw TypeError(".google.bigtable.admin.v2.Table.automatedBackupPolicy: object expected"); + message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.fromObject(object.automatedBackupPolicy, long + 1); + } + if (object.tieredStorageConfig != null) { + if (!$util.isObject(object.tieredStorageConfig)) + throw TypeError(".google.bigtable.admin.v2.Table.tieredStorageConfig: object expected"); + message.tieredStorageConfig = $root.google.bigtable.admin.v2.TieredStorageConfig.fromObject(object.tieredStorageConfig, long + 1); + } + if (object.rowKeySchema != null) { + if (!$util.isObject(object.rowKeySchema)) + throw TypeError(".google.bigtable.admin.v2.Table.rowKeySchema: object expected"); + message.rowKeySchema = $root.google.bigtable.admin.v2.Type.Struct.fromObject(object.rowKeySchema, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Table message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {google.bigtable.admin.v2.Table} message Table + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Table.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) { + object.clusterStates = {}; + object.columnFamilies = {}; + } + if (options.defaults) { + object.name = ""; + object.granularity = options.enums === String ? "TIMESTAMP_GRANULARITY_UNSPECIFIED" : 0; + object.restoreInfo = null; + object.changeStreamConfig = null; + object.deletionProtection = false; + object.tieredStorageConfig = null; + object.rowKeySchema = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + var keys2; + if (message.clusterStates && (keys2 = Object.keys(message.clusterStates)).length) { + object.clusterStates = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.clusterStates, keys2[j]); + object.clusterStates[keys2[j]] = $root.google.bigtable.admin.v2.Table.ClusterState.toObject(message.clusterStates[keys2[j]], options, q + 1); + } + } + if (message.columnFamilies && (keys2 = Object.keys(message.columnFamilies)).length) { + object.columnFamilies = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.columnFamilies, keys2[j]); + object.columnFamilies[keys2[j]] = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.columnFamilies[keys2[j]], options, q + 1); + } + } + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + 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 && Object.hasOwnProperty.call(message, "restoreInfo")) + object.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.toObject(message.restoreInfo, options, q + 1); + if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) + object.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.toObject(message.changeStreamConfig, options, q + 1); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + object.deletionProtection = message.deletionProtection; + if (message.automatedBackupPolicy != null && Object.hasOwnProperty.call(message, "automatedBackupPolicy")) { + object.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.toObject(message.automatedBackupPolicy, options, q + 1); + if (options.oneofs) + object.automatedBackupConfig = "automatedBackupPolicy"; + } + if (message.tieredStorageConfig != null && Object.hasOwnProperty.call(message, "tieredStorageConfig")) + object.tieredStorageConfig = $root.google.bigtable.admin.v2.TieredStorageConfig.toObject(message.tieredStorageConfig, options, q + 1); + if (message.rowKeySchema != null && Object.hasOwnProperty.call(message, "rowKeySchema")) + object.rowKeySchema = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.rowKeySchema, options, q + 1); + return object; + }; + + /** + * Converts this Table to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Table + * @instance + * @returns {Object.} JSON object + */ + Table.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Table + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Table.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Table"; + }; + + Table.ClusterState = (function() { + + /** + * Properties of a ClusterState. + * @memberof google.bigtable.admin.v2.Table + * @interface IClusterState + * @property {google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null} [replicationState] ClusterState replicationState + * @property {Array.|null} [encryptionInfo] ClusterState encryptionInfo + */ + + /** + * Constructs a new ClusterState. + * @memberof google.bigtable.admin.v2.Table + * @classdesc Represents a ClusterState. + * @implements IClusterState + * @constructor + * @param {google.bigtable.admin.v2.Table.IClusterState=} [properties] Properties to set + */ + function ClusterState(properties) { + this.encryptionInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterState replicationState. + * @member {google.bigtable.admin.v2.Table.ClusterState.ReplicationState} replicationState + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @instance + */ + ClusterState.prototype.replicationState = 0; + + /** + * ClusterState encryptionInfo. + * @member {Array.} encryptionInfo + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @instance + */ + ClusterState.prototype.encryptionInfo = $util.emptyArray; + + /** + * Creates a new ClusterState instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {google.bigtable.admin.v2.Table.IClusterState=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState instance + */ + ClusterState.create = function create(properties) { + return new ClusterState(properties); + }; + + /** + * Encodes the specified ClusterState message. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {google.bigtable.admin.v2.Table.IClusterState} message ClusterState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterState.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.replicationState); + if (message.encryptionInfo != null && message.encryptionInfo.length) + for (var i = 0; i < message.encryptionInfo.length; ++i) + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterState message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {google.bigtable.admin.v2.Table.IClusterState} message ClusterState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ClusterState message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @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.Table.ClusterState} ClusterState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterState.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Table.ClusterState(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.replicationState = reader.int32(); + break; + } + case 2: { + if (!(message.encryptionInfo && message.encryptionInfo.length)) + message.encryptionInfo = []; + message.encryptionInfo.push($root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterState message. + * @function verify + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterState.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) + switch (message.replicationState) { + default: + return "replicationState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) { + if (!Array.isArray(message.encryptionInfo)) + return "encryptionInfo: array expected"; + for (var i = 0; i < message.encryptionInfo.length; ++i) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo[i], long + 1); + if (error) + return "encryptionInfo." + error; + } + } + return null; + }; + + /** + * Creates a ClusterState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState + */ + ClusterState.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Table.ClusterState) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Table.ClusterState(); + switch (object.replicationState) { + default: + if (typeof object.replicationState === "number") { + message.replicationState = object.replicationState; + break; + } + break; + case "STATE_NOT_KNOWN": + case 0: + message.replicationState = 0; + break; + case "INITIALIZING": + case 1: + message.replicationState = 1; + break; + case "PLANNED_MAINTENANCE": + case 2: + message.replicationState = 2; + break; + case "UNPLANNED_MAINTENANCE": + case 3: + message.replicationState = 3; + break; + case "READY": + case 4: + message.replicationState = 4; + break; + case "READY_OPTIMIZING": + case 5: + message.replicationState = 5; + break; + } + if (object.encryptionInfo) { + if (!Array.isArray(object.encryptionInfo)) + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: array expected"); + message.encryptionInfo = []; + for (var i = 0; i < object.encryptionInfo.length; ++i) { + if (!$util.isObject(object.encryptionInfo[i])) + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: object expected"); + message.encryptionInfo[i] = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ClusterState message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {google.bigtable.admin.v2.Table.ClusterState} message ClusterState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterState.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.encryptionInfo = []; + if (options.defaults) + object.replicationState = options.enums === String ? "STATE_NOT_KNOWN" : 0; + if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) + object.replicationState = options.enums === String ? $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] === undefined ? message.replicationState : $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] : message.replicationState; + if (message.encryptionInfo && message.encryptionInfo.length) { + object.encryptionInfo = []; + for (var j = 0; j < message.encryptionInfo.length; ++j) + object.encryptionInfo[j] = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo[j], options, q + 1); + } + return object; + }; + + /** + * Converts this ClusterState to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @instance + * @returns {Object.} JSON object + */ + ClusterState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterState + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Table.ClusterState"; + }; + + /** + * ReplicationState enum. + * @name google.bigtable.admin.v2.Table.ClusterState.ReplicationState + * @enum {number} + * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value + * @property {number} INITIALIZING=1 INITIALIZING value + * @property {number} PLANNED_MAINTENANCE=2 PLANNED_MAINTENANCE value + * @property {number} UNPLANNED_MAINTENANCE=3 UNPLANNED_MAINTENANCE value + * @property {number} READY=4 READY value + * @property {number} READY_OPTIMIZING=5 READY_OPTIMIZING value + */ + ClusterState.ReplicationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; + values[valuesById[1] = "INITIALIZING"] = 1; + values[valuesById[2] = "PLANNED_MAINTENANCE"] = 2; + values[valuesById[3] = "UNPLANNED_MAINTENANCE"] = 3; + values[valuesById[4] = "READY"] = 4; + values[valuesById[5] = "READY_OPTIMIZING"] = 5; + return values; + })(); + + return ClusterState; + })(); + + /** + * TimestampGranularity enum. + * @name google.bigtable.admin.v2.Table.TimestampGranularity + * @enum {number} + * @property {number} TIMESTAMP_GRANULARITY_UNSPECIFIED=0 TIMESTAMP_GRANULARITY_UNSPECIFIED value + * @property {number} MILLIS=1 MILLIS value + */ + Table.TimestampGranularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIMESTAMP_GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "MILLIS"] = 1; + return values; + })(); + + /** + * View enum. + * @name google.bigtable.admin.v2.Table.View + * @enum {number} + * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value + * @property {number} NAME_ONLY=1 NAME_ONLY value + * @property {number} SCHEMA_VIEW=2 SCHEMA_VIEW value + * @property {number} REPLICATION_VIEW=3 REPLICATION_VIEW value + * @property {number} ENCRYPTION_VIEW=5 ENCRYPTION_VIEW value + * @property {number} FULL=4 FULL value + */ + Table.View = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "NAME_ONLY"] = 1; + values[valuesById[2] = "SCHEMA_VIEW"] = 2; + values[valuesById[3] = "REPLICATION_VIEW"] = 3; + values[valuesById[5] = "ENCRYPTION_VIEW"] = 5; + values[valuesById[4] = "FULL"] = 4; + return values; + })(); + + Table.AutomatedBackupPolicy = (function() { + + /** + * Properties of an AutomatedBackupPolicy. + * @memberof google.bigtable.admin.v2.Table + * @interface IAutomatedBackupPolicy + * @property {google.protobuf.IDuration|null} [retentionPeriod] AutomatedBackupPolicy retentionPeriod + * @property {google.protobuf.IDuration|null} [frequency] AutomatedBackupPolicy frequency + * @property {Array.|null} [locations] AutomatedBackupPolicy locations + */ + + /** + * Constructs a new AutomatedBackupPolicy. + * @memberof google.bigtable.admin.v2.Table + * @classdesc Represents an AutomatedBackupPolicy. + * @implements IAutomatedBackupPolicy + * @constructor + * @param {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy=} [properties] Properties to set + */ + function AutomatedBackupPolicy(properties) { + this.locations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutomatedBackupPolicy retentionPeriod. + * @member {google.protobuf.IDuration|null|undefined} retentionPeriod + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @instance + */ + AutomatedBackupPolicy.prototype.retentionPeriod = null; + + /** + * AutomatedBackupPolicy frequency. + * @member {google.protobuf.IDuration|null|undefined} frequency + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @instance + */ + AutomatedBackupPolicy.prototype.frequency = null; + + /** + * AutomatedBackupPolicy locations. + * @member {Array.} locations + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @instance + */ + AutomatedBackupPolicy.prototype.locations = $util.emptyArray; + + /** + * Creates a new AutomatedBackupPolicy instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} AutomatedBackupPolicy instance + */ + AutomatedBackupPolicy.create = function create(properties) { + return new AutomatedBackupPolicy(properties); + }; + + /** + * Encodes the specified AutomatedBackupPolicy message. Does not implicitly {@link google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy} message AutomatedBackupPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomatedBackupPolicy.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + $root.google.protobuf.Duration.encode(message.frequency, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.locations[i]); + return writer; + }; + + /** + * Encodes the specified AutomatedBackupPolicy message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy} message AutomatedBackupPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomatedBackupPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AutomatedBackupPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @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.Table.AutomatedBackupPolicy} AutomatedBackupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomatedBackupPolicy.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.frequency = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AutomatedBackupPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} AutomatedBackupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomatedBackupPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomatedBackupPolicy message. + * @function verify + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomatedBackupPolicy.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.retentionPeriod, long + 1); + if (error) + return "retentionPeriod." + error; + } + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) { + var error = $root.google.protobuf.Duration.verify(message.frequency, long + 1); + if (error) + return "frequency." + error; + } + if (message.locations != null && Object.hasOwnProperty.call(message, "locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + return null; + }; + + /** + * Creates an AutomatedBackupPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} AutomatedBackupPolicy + */ + AutomatedBackupPolicy.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy(); + if (object.retentionPeriod != null) { + if (!$util.isObject(object.retentionPeriod)) + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.retentionPeriod: object expected"); + message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod, long + 1); + } + if (object.frequency != null) { + if (!$util.isObject(object.frequency)) + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.frequency: object expected"); + message.frequency = $root.google.protobuf.Duration.fromObject(object.frequency, long + 1); + } + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + return message; + }; + + /** + * Creates a plain object from an AutomatedBackupPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} message AutomatedBackupPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomatedBackupPolicy.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.locations = []; + if (options.defaults) { + object.retentionPeriod = null; + object.frequency = null; + } + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options, q + 1); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + object.frequency = $root.google.protobuf.Duration.toObject(message.frequency, options, q + 1); + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + return object; + }; + + /** + * Converts this AutomatedBackupPolicy to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @instance + * @returns {Object.} JSON object + */ + AutomatedBackupPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomatedBackupPolicy + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomatedBackupPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"; + }; + + return AutomatedBackupPolicy; + })(); + + return Table; + })(); + + v2.AuthorizedView = (function() { + + /** + * Properties of an AuthorizedView. + * @memberof google.bigtable.admin.v2 + * @interface IAuthorizedView + * @property {string|null} [name] AuthorizedView name + * @property {google.bigtable.admin.v2.AuthorizedView.ISubsetView|null} [subsetView] AuthorizedView subsetView + * @property {string|null} [etag] AuthorizedView etag + * @property {boolean|null} [deletionProtection] AuthorizedView deletionProtection + */ + + /** + * Constructs a new AuthorizedView. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an AuthorizedView. + * @implements IAuthorizedView + * @constructor + * @param {google.bigtable.admin.v2.IAuthorizedView=} [properties] Properties to set + */ + function AuthorizedView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthorizedView name. + * @member {string} name + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + AuthorizedView.prototype.name = ""; + + /** + * AuthorizedView subsetView. + * @member {google.bigtable.admin.v2.AuthorizedView.ISubsetView|null|undefined} subsetView + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + AuthorizedView.prototype.subsetView = null; + + /** + * AuthorizedView etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + AuthorizedView.prototype.etag = ""; + + /** + * AuthorizedView deletionProtection. + * @member {boolean} deletionProtection + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + AuthorizedView.prototype.deletionProtection = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AuthorizedView authorizedView. + * @member {"subsetView"|undefined} authorizedView + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + Object.defineProperty(AuthorizedView.prototype, "authorizedView", { + get: $util.oneOfGetter($oneOfFields = ["subsetView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AuthorizedView instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {google.bigtable.admin.v2.IAuthorizedView=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AuthorizedView} AuthorizedView instance + */ + AuthorizedView.create = function create(properties) { + return new AuthorizedView(properties); + }; + + /** + * Encodes the specified AuthorizedView message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {google.bigtable.admin.v2.IAuthorizedView} message AuthorizedView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizedView.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.subsetView != null && Object.hasOwnProperty.call(message, "subsetView")) + $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.encode(message.subsetView, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deletionProtection); + return writer; + }; + + /** + * Encodes the specified AuthorizedView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {google.bigtable.admin.v2.IAuthorizedView} message AuthorizedView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizedView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AuthorizedView message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AuthorizedView + * @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.AuthorizedView} AuthorizedView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizedView.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AuthorizedView(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.etag = reader.string(); + break; + } + case 4: { + message.deletionProtection = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AuthorizedView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AuthorizedView} AuthorizedView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizedView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthorizedView message. + * @function verify + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorizedView.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.subsetView != null && Object.hasOwnProperty.call(message, "subsetView")) { + properties.authorizedView = 1; + { + var error = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.verify(message.subsetView, long + 1); + if (error) + return "subsetView." + error; + } + } + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + return null; + }; + + /** + * Creates an AuthorizedView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AuthorizedView} AuthorizedView + */ + AuthorizedView.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AuthorizedView(); + if (object.name != null) + message.name = String(object.name); + if (object.subsetView != null) { + if (!$util.isObject(object.subsetView)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.subsetView: object expected"); + message.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.fromObject(object.subsetView, long + 1); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + return message; + }; + + /** + * Creates a plain object from an AuthorizedView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView} message AuthorizedView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorizedView.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.deletionProtection = false; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.subsetView != null && Object.hasOwnProperty.call(message, "subsetView")) { + object.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.toObject(message.subsetView, options, q + 1); + if (options.oneofs) + object.authorizedView = "subsetView"; + } + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + object.deletionProtection = message.deletionProtection; + return object; + }; + + /** + * Converts this AuthorizedView to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + * @returns {Object.} JSON object + */ + AuthorizedView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuthorizedView + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorizedView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AuthorizedView"; + }; + + AuthorizedView.FamilySubsets = (function() { + + /** + * Properties of a FamilySubsets. + * @memberof google.bigtable.admin.v2.AuthorizedView + * @interface IFamilySubsets + * @property {Array.|null} [qualifiers] FamilySubsets qualifiers + * @property {Array.|null} [qualifierPrefixes] FamilySubsets qualifierPrefixes + */ + + /** + * Constructs a new FamilySubsets. + * @memberof google.bigtable.admin.v2.AuthorizedView + * @classdesc Represents a FamilySubsets. + * @implements IFamilySubsets + * @constructor + * @param {google.bigtable.admin.v2.AuthorizedView.IFamilySubsets=} [properties] Properties to set + */ + function FamilySubsets(properties) { + this.qualifiers = []; + this.qualifierPrefixes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FamilySubsets qualifiers. + * @member {Array.} qualifiers + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @instance + */ + FamilySubsets.prototype.qualifiers = $util.emptyArray; + + /** + * FamilySubsets qualifierPrefixes. + * @member {Array.} qualifierPrefixes + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @instance + */ + FamilySubsets.prototype.qualifierPrefixes = $util.emptyArray; + + /** + * Creates a new FamilySubsets instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.IFamilySubsets=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} FamilySubsets instance + */ + FamilySubsets.create = function create(properties) { + return new FamilySubsets(properties); + }; + + /** + * Encodes the specified FamilySubsets message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.IFamilySubsets} message FamilySubsets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FamilySubsets.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.qualifiers != null && message.qualifiers.length) + for (var i = 0; i < message.qualifiers.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifiers[i]); + if (message.qualifierPrefixes != null && message.qualifierPrefixes.length) + for (var i = 0; i < message.qualifierPrefixes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.qualifierPrefixes[i]); + return writer; + }; + + /** + * Encodes the specified FamilySubsets message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.IFamilySubsets} message FamilySubsets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FamilySubsets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FamilySubsets message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @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.AuthorizedView.FamilySubsets} FamilySubsets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FamilySubsets.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.qualifiers && message.qualifiers.length)) + message.qualifiers = []; + message.qualifiers.push(reader.bytes()); + break; + } + case 2: { + if (!(message.qualifierPrefixes && message.qualifierPrefixes.length)) + message.qualifierPrefixes = []; + message.qualifierPrefixes.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FamilySubsets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} FamilySubsets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FamilySubsets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FamilySubsets message. + * @function verify + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FamilySubsets.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.qualifiers != null && Object.hasOwnProperty.call(message, "qualifiers")) { + if (!Array.isArray(message.qualifiers)) + return "qualifiers: array expected"; + for (var i = 0; i < message.qualifiers.length; ++i) + if (!(message.qualifiers[i] && typeof message.qualifiers[i].length === "number" || $util.isString(message.qualifiers[i]))) + return "qualifiers: buffer[] expected"; + } + if (message.qualifierPrefixes != null && Object.hasOwnProperty.call(message, "qualifierPrefixes")) { + if (!Array.isArray(message.qualifierPrefixes)) + return "qualifierPrefixes: array expected"; + for (var i = 0; i < message.qualifierPrefixes.length; ++i) + if (!(message.qualifierPrefixes[i] && typeof message.qualifierPrefixes[i].length === "number" || $util.isString(message.qualifierPrefixes[i]))) + return "qualifierPrefixes: buffer[] expected"; + } + return null; + }; + + /** + * Creates a FamilySubsets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} FamilySubsets + */ + FamilySubsets.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.FamilySubsets: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets(); + if (object.qualifiers) { + if (!Array.isArray(object.qualifiers)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.FamilySubsets.qualifiers: array expected"); + message.qualifiers = []; + for (var i = 0; i < object.qualifiers.length; ++i) + if (typeof object.qualifiers[i] === "string") + $util.base64.decode(object.qualifiers[i], message.qualifiers[i] = $util.newBuffer($util.base64.length(object.qualifiers[i])), 0); + else if (object.qualifiers[i].length >= 0) + message.qualifiers[i] = object.qualifiers[i]; + } + if (object.qualifierPrefixes) { + if (!Array.isArray(object.qualifierPrefixes)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.FamilySubsets.qualifierPrefixes: array expected"); + message.qualifierPrefixes = []; + for (var i = 0; i < object.qualifierPrefixes.length; ++i) + if (typeof object.qualifierPrefixes[i] === "string") + $util.base64.decode(object.qualifierPrefixes[i], message.qualifierPrefixes[i] = $util.newBuffer($util.base64.length(object.qualifierPrefixes[i])), 0); + else if (object.qualifierPrefixes[i].length >= 0) + message.qualifierPrefixes[i] = object.qualifierPrefixes[i]; + } + return message; + }; + + /** + * Creates a plain object from a FamilySubsets message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} message FamilySubsets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FamilySubsets.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.qualifiers = []; + object.qualifierPrefixes = []; + } + if (message.qualifiers && message.qualifiers.length) { + object.qualifiers = []; + for (var j = 0; j < message.qualifiers.length; ++j) + object.qualifiers[j] = options.bytes === String ? $util.base64.encode(message.qualifiers[j], 0, message.qualifiers[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifiers[j]) : message.qualifiers[j]; + } + if (message.qualifierPrefixes && message.qualifierPrefixes.length) { + object.qualifierPrefixes = []; + for (var j = 0; j < message.qualifierPrefixes.length; ++j) + object.qualifierPrefixes[j] = options.bytes === String ? $util.base64.encode(message.qualifierPrefixes[j], 0, message.qualifierPrefixes[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifierPrefixes[j]) : message.qualifierPrefixes[j]; + } + return object; + }; + + /** + * Converts this FamilySubsets to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @instance + * @returns {Object.} JSON object + */ + FamilySubsets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FamilySubsets + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FamilySubsets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"; + }; + + return FamilySubsets; + })(); + + AuthorizedView.SubsetView = (function() { + + /** + * Properties of a SubsetView. + * @memberof google.bigtable.admin.v2.AuthorizedView + * @interface ISubsetView + * @property {Array.|null} [rowPrefixes] SubsetView rowPrefixes + * @property {Object.|null} [familySubsets] SubsetView familySubsets + */ + + /** + * Constructs a new SubsetView. + * @memberof google.bigtable.admin.v2.AuthorizedView + * @classdesc Represents a SubsetView. + * @implements ISubsetView + * @constructor + * @param {google.bigtable.admin.v2.AuthorizedView.ISubsetView=} [properties] Properties to set + */ + function SubsetView(properties) { + this.rowPrefixes = []; + this.familySubsets = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubsetView rowPrefixes. + * @member {Array.} rowPrefixes + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @instance + */ + SubsetView.prototype.rowPrefixes = $util.emptyArray; + + /** + * SubsetView familySubsets. + * @member {Object.} familySubsets + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @instance + */ + SubsetView.prototype.familySubsets = $util.emptyObject; + + /** + * Creates a new SubsetView instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.ISubsetView=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AuthorizedView.SubsetView} SubsetView instance + */ + SubsetView.create = function create(properties) { + return new SubsetView(properties); + }; + + /** + * Encodes the specified SubsetView message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.SubsetView.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.ISubsetView} message SubsetView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubsetView.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rowPrefixes != null && message.rowPrefixes.length) + for (var i = 0; i < message.rowPrefixes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowPrefixes[i]); + if (message.familySubsets != null && Object.hasOwnProperty.call(message, "familySubsets")) + for (var keys = Object.keys(message.familySubsets), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.encode(message.familySubsets[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified SubsetView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.SubsetView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.ISubsetView} message SubsetView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubsetView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SubsetView message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @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.AuthorizedView.SubsetView} SubsetView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubsetView.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.AuthorizedView.SubsetView(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rowPrefixes && message.rowPrefixes.length)) + message.rowPrefixes = []; + message.rowPrefixes.push(reader.bytes()); + break; + } + case 2: { + if (message.familySubsets === $util.emptyObject) + message.familySubsets = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.familySubsets, key); + message.familySubsets[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SubsetView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AuthorizedView.SubsetView} SubsetView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubsetView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubsetView message. + * @function verify + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubsetView.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rowPrefixes != null && Object.hasOwnProperty.call(message, "rowPrefixes")) { + if (!Array.isArray(message.rowPrefixes)) + return "rowPrefixes: array expected"; + for (var i = 0; i < message.rowPrefixes.length; ++i) + if (!(message.rowPrefixes[i] && typeof message.rowPrefixes[i].length === "number" || $util.isString(message.rowPrefixes[i]))) + return "rowPrefixes: buffer[] expected"; + } + if (message.familySubsets != null && Object.hasOwnProperty.call(message, "familySubsets")) { + if (!$util.isObject(message.familySubsets)) + return "familySubsets: object expected"; + var key = Object.keys(message.familySubsets); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify(message.familySubsets[key[i]], long + 1); + if (error) + return "familySubsets." + error; + } + } + return null; + }; + + /** + * Creates a SubsetView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AuthorizedView.SubsetView} SubsetView + */ + SubsetView.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.SubsetView) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.AuthorizedView.SubsetView(); + if (object.rowPrefixes) { + if (!Array.isArray(object.rowPrefixes)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView.rowPrefixes: array expected"); + message.rowPrefixes = []; + for (var i = 0; i < object.rowPrefixes.length; ++i) + if (typeof object.rowPrefixes[i] === "string") + $util.base64.decode(object.rowPrefixes[i], message.rowPrefixes[i] = $util.newBuffer($util.base64.length(object.rowPrefixes[i])), 0); + else if (object.rowPrefixes[i].length >= 0) + message.rowPrefixes[i] = object.rowPrefixes[i]; + } + if (object.familySubsets) { + if (!$util.isObject(object.familySubsets)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView.familySubsets: object expected"); + message.familySubsets = {}; + for (var keys = Object.keys(object.familySubsets), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.familySubsets, keys[i]); + if (!$util.isObject(object.familySubsets[keys[i]])) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView.familySubsets: object expected"); + message.familySubsets[keys[i]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.fromObject(object.familySubsets[keys[i]], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a SubsetView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.SubsetView} message SubsetView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubsetView.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.rowPrefixes = []; + if (options.objects || options.defaults) + object.familySubsets = {}; + if (message.rowPrefixes && message.rowPrefixes.length) { + object.rowPrefixes = []; + for (var j = 0; j < message.rowPrefixes.length; ++j) + object.rowPrefixes[j] = options.bytes === String ? $util.base64.encode(message.rowPrefixes[j], 0, message.rowPrefixes[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.rowPrefixes[j]) : message.rowPrefixes[j]; + } + var keys2; + if (message.familySubsets && (keys2 = Object.keys(message.familySubsets)).length) { + object.familySubsets = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.familySubsets, keys2[j]); + object.familySubsets[keys2[j]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.toObject(message.familySubsets[keys2[j]], options, q + 1); + } + } + return object; + }; + + /** + * Converts this SubsetView to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @instance + * @returns {Object.} JSON object + */ + SubsetView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubsetView + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubsetView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AuthorizedView.SubsetView"; + }; + + return SubsetView; + })(); + + /** + * ResponseView enum. + * @name google.bigtable.admin.v2.AuthorizedView.ResponseView + * @enum {number} + * @property {number} RESPONSE_VIEW_UNSPECIFIED=0 RESPONSE_VIEW_UNSPECIFIED value + * @property {number} NAME_ONLY=1 NAME_ONLY value + * @property {number} BASIC=2 BASIC value + * @property {number} FULL=3 FULL value + */ + AuthorizedView.ResponseView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESPONSE_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "NAME_ONLY"] = 1; + values[valuesById[2] = "BASIC"] = 2; + values[valuesById[3] = "FULL"] = 3; + return values; + })(); + + return AuthorizedView; + })(); + + v2.ColumnFamily = (function() { + + /** + * Properties of a ColumnFamily. + * @memberof google.bigtable.admin.v2 + * @interface IColumnFamily + * @property {google.bigtable.admin.v2.IGcRule|null} [gcRule] ColumnFamily gcRule + * @property {google.bigtable.admin.v2.IType|null} [valueType] ColumnFamily valueType + */ + + /** + * Constructs a new ColumnFamily. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ColumnFamily. + * @implements IColumnFamily + * @constructor + * @param {google.bigtable.admin.v2.IColumnFamily=} [properties] Properties to set + */ + function ColumnFamily(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnFamily gcRule. + * @member {google.bigtable.admin.v2.IGcRule|null|undefined} gcRule + * @memberof google.bigtable.admin.v2.ColumnFamily + * @instance + */ + ColumnFamily.prototype.gcRule = null; + + /** + * ColumnFamily valueType. + * @member {google.bigtable.admin.v2.IType|null|undefined} valueType + * @memberof google.bigtable.admin.v2.ColumnFamily + * @instance + */ + ColumnFamily.prototype.valueType = null; + + /** + * Creates a new ColumnFamily instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {google.bigtable.admin.v2.IColumnFamily=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily instance + */ + ColumnFamily.create = function create(properties) { + return new ColumnFamily(properties); + }; + + /** + * Encodes the specified ColumnFamily message. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {google.bigtable.admin.v2.IColumnFamily} message ColumnFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnFamily.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) + $root.google.bigtable.admin.v2.GcRule.encode(message.gcRule, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + $root.google.bigtable.admin.v2.Type.encode(message.valueType, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ColumnFamily message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {google.bigtable.admin.v2.IColumnFamily} message ColumnFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnFamily.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ColumnFamily message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ColumnFamily + * @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.ColumnFamily} ColumnFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnFamily.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ColumnFamily(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcRule = $root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.valueType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnFamily message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnFamily.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnFamily message. + * @function verify + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnFamily.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) { + var error = $root.google.bigtable.admin.v2.GcRule.verify(message.gcRule, long + 1); + if (error) + return "gcRule." + error; + } + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType, long + 1); + if (error) + return "valueType." + error; + } + return null; + }; + + /** + * Creates a ColumnFamily message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily + */ + ColumnFamily.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ColumnFamily) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ColumnFamily: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ColumnFamily(); + if (object.gcRule != null) { + if (!$util.isObject(object.gcRule)) + throw TypeError(".google.bigtable.admin.v2.ColumnFamily.gcRule: object expected"); + message.gcRule = $root.google.bigtable.admin.v2.GcRule.fromObject(object.gcRule, long + 1); + } + if (object.valueType != null) { + if (!$util.isObject(object.valueType)) + throw TypeError(".google.bigtable.admin.v2.ColumnFamily.valueType: object expected"); + message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ColumnFamily message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {google.bigtable.admin.v2.ColumnFamily} message ColumnFamily + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnFamily.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.gcRule = null; + object.valueType = null; + } + if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) + object.gcRule = $root.google.bigtable.admin.v2.GcRule.toObject(message.gcRule, options, q + 1); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options, q + 1); + return object; + }; + + /** + * Converts this ColumnFamily to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ColumnFamily + * @instance + * @returns {Object.} JSON object + */ + ColumnFamily.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ColumnFamily + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ColumnFamily"; + }; + + return ColumnFamily; + })(); + + v2.GcRule = (function() { + + /** + * Properties of a GcRule. + * @memberof google.bigtable.admin.v2 + * @interface IGcRule + * @property {number|null} [maxNumVersions] GcRule maxNumVersions + * @property {google.protobuf.IDuration|null} [maxAge] GcRule maxAge + * @property {google.bigtable.admin.v2.GcRule.IIntersection|null} [intersection] GcRule intersection + * @property {google.bigtable.admin.v2.GcRule.IUnion|null} [union] GcRule union + */ + + /** + * Constructs a new GcRule. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GcRule. + * @implements IGcRule + * @constructor + * @param {google.bigtable.admin.v2.IGcRule=} [properties] Properties to set + */ + function GcRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcRule maxNumVersions. + * @member {number|null|undefined} maxNumVersions + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + GcRule.prototype.maxNumVersions = null; + + /** + * GcRule maxAge. + * @member {google.protobuf.IDuration|null|undefined} maxAge + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + GcRule.prototype.maxAge = null; + + /** + * GcRule intersection. + * @member {google.bigtable.admin.v2.GcRule.IIntersection|null|undefined} intersection + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + GcRule.prototype.intersection = null; + + /** + * GcRule union. + * @member {google.bigtable.admin.v2.GcRule.IUnion|null|undefined} union + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + GcRule.prototype.union = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GcRule rule. + * @member {"maxNumVersions"|"maxAge"|"intersection"|"union"|undefined} rule + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + Object.defineProperty(GcRule.prototype, "rule", { + get: $util.oneOfGetter($oneOfFields = ["maxNumVersions", "maxAge", "intersection", "union"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GcRule instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {google.bigtable.admin.v2.IGcRule=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GcRule} GcRule instance + */ + GcRule.create = function create(properties) { + return new GcRule(properties); + }; + + /** + * Encodes the specified GcRule message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {google.bigtable.admin.v2.IGcRule} message GcRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcRule.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.maxNumVersions != null && Object.hasOwnProperty.call(message, "maxNumVersions")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxNumVersions); + if (message.maxAge != null && Object.hasOwnProperty.call(message, "maxAge")) + $root.google.protobuf.Duration.encode(message.maxAge, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.intersection != null && Object.hasOwnProperty.call(message, "intersection")) + $root.google.bigtable.admin.v2.GcRule.Intersection.encode(message.intersection, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.union != null && Object.hasOwnProperty.call(message, "union")) + $root.google.bigtable.admin.v2.GcRule.Union.encode(message.union, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified GcRule message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {google.bigtable.admin.v2.IGcRule} message GcRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GcRule message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GcRule + * @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.GcRule} GcRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GcRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.maxNumVersions = reader.int32(); + break; + } + case 2: { + message.maxAge = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.union = $root.google.bigtable.admin.v2.GcRule.Union.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GcRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GcRule} GcRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcRule message. + * @function verify + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.maxNumVersions != null && Object.hasOwnProperty.call(message, "maxNumVersions")) { + properties.rule = 1; + if (!$util.isInteger(message.maxNumVersions)) + return "maxNumVersions: integer expected"; + } + if (message.maxAge != null && Object.hasOwnProperty.call(message, "maxAge")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.protobuf.Duration.verify(message.maxAge, long + 1); + if (error) + return "maxAge." + error; + } + } + if (message.intersection != null && Object.hasOwnProperty.call(message, "intersection")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.bigtable.admin.v2.GcRule.Intersection.verify(message.intersection, long + 1); + if (error) + return "intersection." + error; + } + } + if (message.union != null && Object.hasOwnProperty.call(message, "union")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.bigtable.admin.v2.GcRule.Union.verify(message.union, long + 1); + if (error) + return "union." + error; + } + } + return null; + }; + + /** + * Creates a GcRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GcRule} GcRule + */ + GcRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GcRule: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GcRule(); + if (object.maxNumVersions != null) + message.maxNumVersions = object.maxNumVersions | 0; + if (object.maxAge != null) { + if (!$util.isObject(object.maxAge)) + throw TypeError(".google.bigtable.admin.v2.GcRule.maxAge: object expected"); + message.maxAge = $root.google.protobuf.Duration.fromObject(object.maxAge, long + 1); + } + if (object.intersection != null) { + if (!$util.isObject(object.intersection)) + throw TypeError(".google.bigtable.admin.v2.GcRule.intersection: object expected"); + message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.fromObject(object.intersection, long + 1); + } + if (object.union != null) { + if (!$util.isObject(object.union)) + throw TypeError(".google.bigtable.admin.v2.GcRule.union: object expected"); + message.union = $root.google.bigtable.admin.v2.GcRule.Union.fromObject(object.union, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a GcRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {google.bigtable.admin.v2.GcRule} message GcRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcRule.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.maxNumVersions != null && Object.hasOwnProperty.call(message, "maxNumVersions")) { + object.maxNumVersions = message.maxNumVersions; + if (options.oneofs) + object.rule = "maxNumVersions"; + } + if (message.maxAge != null && Object.hasOwnProperty.call(message, "maxAge")) { + object.maxAge = $root.google.protobuf.Duration.toObject(message.maxAge, options, q + 1); + if (options.oneofs) + object.rule = "maxAge"; + } + if (message.intersection != null && Object.hasOwnProperty.call(message, "intersection")) { + object.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.toObject(message.intersection, options, q + 1); + if (options.oneofs) + object.rule = "intersection"; + } + if (message.union != null && Object.hasOwnProperty.call(message, "union")) { + object.union = $root.google.bigtable.admin.v2.GcRule.Union.toObject(message.union, options, q + 1); + if (options.oneofs) + object.rule = "union"; + } + return object; + }; + + /** + * Converts this GcRule to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GcRule + * @instance + * @returns {Object.} JSON object + */ + GcRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcRule + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule"; + }; + + GcRule.Intersection = (function() { + + /** + * Properties of an Intersection. + * @memberof google.bigtable.admin.v2.GcRule + * @interface IIntersection + * @property {Array.|null} [rules] Intersection rules + */ + + /** + * Constructs a new Intersection. + * @memberof google.bigtable.admin.v2.GcRule + * @classdesc Represents an Intersection. + * @implements IIntersection + * @constructor + * @param {google.bigtable.admin.v2.GcRule.IIntersection=} [properties] Properties to set + */ + function Intersection(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Intersection rules. + * @member {Array.} rules + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @instance + */ + Intersection.prototype.rules = $util.emptyArray; + + /** + * Creates a new Intersection instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {google.bigtable.admin.v2.GcRule.IIntersection=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection instance + */ + Intersection.create = function create(properties) { + return new Intersection(properties); + }; + + /** + * Encodes the specified Intersection message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {google.bigtable.admin.v2.GcRule.IIntersection} message Intersection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Intersection.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Intersection message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {google.bigtable.admin.v2.GcRule.IIntersection} message Intersection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Intersection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Intersection message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @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.GcRule.Intersection} Intersection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Intersection.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GcRule.Intersection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Intersection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Intersection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Intersection message. + * @function verify + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Intersection.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.bigtable.admin.v2.GcRule.verify(message.rules[i], long + 1); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates an Intersection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection + */ + Intersection.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule.Intersection) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GcRule.Intersection(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (!$util.isObject(object.rules[i])) + throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: object expected"); + message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an Intersection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {google.bigtable.admin.v2.GcRule.Intersection} message Intersection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Intersection.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Intersection to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @instance + * @returns {Object.} JSON object + */ + Intersection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Intersection + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Intersection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule.Intersection"; + }; + + return Intersection; + })(); + + GcRule.Union = (function() { + + /** + * Properties of an Union. + * @memberof google.bigtable.admin.v2.GcRule + * @interface IUnion + * @property {Array.|null} [rules] Union rules + */ + + /** + * Constructs a new Union. + * @memberof google.bigtable.admin.v2.GcRule + * @classdesc Represents an Union. + * @implements IUnion + * @constructor + * @param {google.bigtable.admin.v2.GcRule.IUnion=} [properties] Properties to set + */ + function Union(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Union rules. + * @member {Array.} rules + * @memberof google.bigtable.admin.v2.GcRule.Union + * @instance + */ + Union.prototype.rules = $util.emptyArray; + + /** + * Creates a new Union instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {google.bigtable.admin.v2.GcRule.IUnion=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GcRule.Union} Union instance + */ + Union.create = function create(properties) { + return new Union(properties); + }; + + /** + * Encodes the specified Union message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {google.bigtable.admin.v2.GcRule.IUnion} message Union message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Union.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Union message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {google.bigtable.admin.v2.GcRule.IUnion} message Union message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Union.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Union message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GcRule.Union + * @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.GcRule.Union} Union + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Union.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GcRule.Union(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Union message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GcRule.Union} Union + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Union.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Union message. + * @function verify + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Union.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.bigtable.admin.v2.GcRule.verify(message.rules[i], long + 1); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates an Union message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GcRule.Union} Union + */ + Union.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule.Union) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GcRule.Union: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.GcRule.Union(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (!$util.isObject(object.rules[i])) + throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: object expected"); + message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an Union message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {google.bigtable.admin.v2.GcRule.Union} message Union + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Union.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Union to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GcRule.Union + * @instance + * @returns {Object.} JSON object + */ + Union.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Union + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Union.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule.Union"; + }; + + return Union; + })(); + + return GcRule; + })(); + + v2.EncryptionInfo = (function() { + + /** + * Properties of an EncryptionInfo. + * @memberof google.bigtable.admin.v2 + * @interface IEncryptionInfo + * @property {google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null} [encryptionType] EncryptionInfo encryptionType + * @property {google.rpc.IStatus|null} [encryptionStatus] EncryptionInfo encryptionStatus + * @property {string|null} [kmsKeyVersion] EncryptionInfo kmsKeyVersion + */ + + /** + * Constructs a new EncryptionInfo. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an EncryptionInfo. + * @implements IEncryptionInfo + * @constructor + * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + */ + function EncryptionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionInfo encryptionType. + * @member {google.bigtable.admin.v2.EncryptionInfo.EncryptionType} encryptionType + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.encryptionType = 0; + + /** + * EncryptionInfo encryptionStatus. + * @member {google.rpc.IStatus|null|undefined} encryptionStatus + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.encryptionStatus = null; + + /** + * EncryptionInfo kmsKeyVersion. + * @member {string} kmsKeyVersion + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.kmsKeyVersion = ""; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo instance + */ + EncryptionInfo.create = function create(properties) { + return new EncryptionInfo(properties); + }; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyVersion); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encryptionType); + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) + $root.google.rpc.Status.encode(message.encryptionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @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.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.EncryptionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.encryptionType = reader.int32(); + break; + } + case 4: { + message.encryptionStatus = $root.google.rpc.Status.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.kmsKeyVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionInfo message. + * @function verify + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) { + var error = $root.google.rpc.Status.verify(message.encryptionStatus, long + 1); + if (error) + return "encryptionStatus." + error; + } + if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) + if (!$util.isString(message.kmsKeyVersion)) + return "kmsKeyVersion: string expected"; + return null; + }; + + /** + * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + */ + EncryptionInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.EncryptionInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.EncryptionInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.EncryptionInfo(); + switch (object.encryptionType) { + default: + if (typeof object.encryptionType === "number") { + message.encryptionType = object.encryptionType; + break; + } + break; + case "ENCRYPTION_TYPE_UNSPECIFIED": + case 0: + message.encryptionType = 0; + break; + case "GOOGLE_DEFAULT_ENCRYPTION": + case 1: + message.encryptionType = 1; + break; + case "CUSTOMER_MANAGED_ENCRYPTION": + case 2: + message.encryptionType = 2; + break; + } + if (object.encryptionStatus != null) { + if (!$util.isObject(object.encryptionStatus)) + throw TypeError(".google.bigtable.admin.v2.EncryptionInfo.encryptionStatus: object expected"); + message.encryptionStatus = $root.google.rpc.Status.fromObject(object.encryptionStatus, long + 1); + } + if (object.kmsKeyVersion != null) + message.kmsKeyVersion = String(object.kmsKeyVersion); + return message; + }; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.EncryptionInfo} message EncryptionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.kmsKeyVersion = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + object.encryptionStatus = null; + } + if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) + object.kmsKeyVersion = message.kmsKeyVersion; + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + object.encryptionType = options.enums === String ? $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] : message.encryptionType; + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) + object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options, q + 1); + return object; + }; + + /** + * Converts this EncryptionInfo to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + * @returns {Object.} JSON object + */ + EncryptionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionInfo + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.EncryptionInfo"; + }; + + /** + * EncryptionType enum. + * @name google.bigtable.admin.v2.EncryptionInfo.EncryptionType + * @enum {number} + * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value + * @property {number} GOOGLE_DEFAULT_ENCRYPTION=1 GOOGLE_DEFAULT_ENCRYPTION value + * @property {number} CUSTOMER_MANAGED_ENCRYPTION=2 CUSTOMER_MANAGED_ENCRYPTION value + */ + EncryptionInfo.EncryptionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_DEFAULT_ENCRYPTION"] = 1; + values[valuesById[2] = "CUSTOMER_MANAGED_ENCRYPTION"] = 2; + return values; + })(); + + return EncryptionInfo; + })(); + + v2.Snapshot = (function() { + + /** + * Properties of a Snapshot. + * @memberof google.bigtable.admin.v2 + * @interface ISnapshot + * @property {string|null} [name] Snapshot name + * @property {google.bigtable.admin.v2.ITable|null} [sourceTable] Snapshot sourceTable + * @property {number|Long|null} [dataSizeBytes] Snapshot dataSizeBytes + * @property {google.protobuf.ITimestamp|null} [createTime] Snapshot createTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] Snapshot deleteTime + * @property {google.bigtable.admin.v2.Snapshot.State|null} [state] Snapshot state + * @property {string|null} [description] Snapshot description + */ + + /** + * Constructs a new Snapshot. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a Snapshot. + * @implements ISnapshot + * @constructor + * @param {google.bigtable.admin.v2.ISnapshot=} [properties] Properties to set + */ + function Snapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Snapshot name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.name = ""; + + /** + * Snapshot sourceTable. + * @member {google.bigtable.admin.v2.ITable|null|undefined} sourceTable + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.sourceTable = null; + + /** + * Snapshot dataSizeBytes. + * @member {number|Long} dataSizeBytes + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.dataSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Snapshot createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.createTime = null; + + /** + * Snapshot deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.deleteTime = null; + + /** + * Snapshot state. + * @member {google.bigtable.admin.v2.Snapshot.State} state + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.state = 0; + + /** + * Snapshot description. + * @member {string} description + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.description = ""; + + /** + * Creates a new Snapshot instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {google.bigtable.admin.v2.ISnapshot=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Snapshot} Snapshot instance + */ + Snapshot.create = function create(properties) { + return new Snapshot(properties); + }; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {google.bigtable.admin.v2.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + $root.google.bigtable.admin.v2.Table.encode(message.sourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.dataSizeBytes != null && Object.hasOwnProperty.call(message, "dataSizeBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.dataSizeBytes); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + return writer; + }; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {google.bigtable.admin.v2.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Snapshot + * @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.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Snapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceTable = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.dataSizeBytes = reader.int64(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snapshot message. + * @function verify + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snapshot.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) { + var error = $root.google.bigtable.admin.v2.Table.verify(message.sourceTable, long + 1); + if (error) + return "sourceTable." + error; + } + if (message.dataSizeBytes != null && Object.hasOwnProperty.call(message, "dataSizeBytes")) + if (!$util.isInteger(message.dataSizeBytes) && !(message.dataSizeBytes && $util.isInteger(message.dataSizeBytes.low) && $util.isInteger(message.dataSizeBytes.high))) + return "dataSizeBytes: integer|Long expected"; + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); + if (error) + return "deleteTime." + error; + } + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Snapshot} Snapshot + */ + Snapshot.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Snapshot) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Snapshot: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Snapshot(); + if (object.name != null) + message.name = String(object.name); + if (object.sourceTable != null) { + if (!$util.isObject(object.sourceTable)) + throw TypeError(".google.bigtable.admin.v2.Snapshot.sourceTable: object expected"); + message.sourceTable = $root.google.bigtable.admin.v2.Table.fromObject(object.sourceTable, long + 1); + } + if (object.dataSizeBytes != null) + if ($util.Long) + message.dataSizeBytes = $util.Long.fromValue(object.dataSizeBytes, false); + else if (typeof object.dataSizeBytes === "string") + message.dataSizeBytes = parseInt(object.dataSizeBytes, 10); + else if (typeof object.dataSizeBytes === "number") + message.dataSizeBytes = object.dataSizeBytes; + else if (typeof object.dataSizeBytes === "object") + message.dataSizeBytes = new $util.LongBits(object.dataSizeBytes.low >>> 0, object.dataSizeBytes.high >>> 0).toNumber(); + if (object.createTime != null) { + if (!$util.isObject(object.createTime)) + throw TypeError(".google.bigtable.admin.v2.Snapshot.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.deleteTime != null) { + if (!$util.isObject(object.deleteTime)) + throw TypeError(".google.bigtable.admin.v2.Snapshot.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_NOT_KNOWN": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {google.bigtable.admin.v2.Snapshot} message Snapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snapshot.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.sourceTable = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.dataSizeBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.createTime = null; + object.deleteTime = null; + object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; + object.description = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + object.sourceTable = $root.google.bigtable.admin.v2.Table.toObject(message.sourceTable, options, q + 1); + if (message.dataSizeBytes != null && Object.hasOwnProperty.call(message, "dataSizeBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.dataSizeBytes = typeof message.dataSizeBytes === "number" ? BigInt(message.dataSizeBytes) : $util.Long.fromBits(message.dataSizeBytes.low >>> 0, message.dataSizeBytes.high >>> 0, false).toBigInt(); + else if (typeof message.dataSizeBytes === "number") + object.dataSizeBytes = options.longs === String ? String(message.dataSizeBytes) : message.dataSizeBytes; + else + object.dataSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataSizeBytes) : options.longs === Number ? new $util.LongBits(message.dataSizeBytes.low >>> 0, message.dataSizeBytes.high >>> 0).toNumber() : message.dataSizeBytes; + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.Snapshot.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Snapshot.State[message.state] : message.state; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + return object; + }; + + /** + * Converts this Snapshot to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + * @returns {Object.} JSON object + */ + Snapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Snapshot + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Snapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Snapshot"; + }; + + /** + * State enum. + * @name google.bigtable.admin.v2.Snapshot.State + * @enum {number} + * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + */ + Snapshot.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + return values; + })(); + + return Snapshot; + })(); + + v2.Backup = (function() { + + /** + * Properties of a Backup. + * @memberof google.bigtable.admin.v2 + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {string|null} [sourceTable] Backup sourceTable + * @property {string|null} [sourceBackup] Backup sourceBackup + * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime + * @property {google.protobuf.ITimestamp|null} [startTime] Backup startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime + * @property {number|Long|null} [sizeBytes] Backup sizeBytes + * @property {google.bigtable.admin.v2.Backup.State|null} [state] Backup state + * @property {google.bigtable.admin.v2.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo + * @property {google.bigtable.admin.v2.Backup.BackupType|null} [backupType] Backup backupType + * @property {google.protobuf.ITimestamp|null} [hotToStandardTime] Backup hotToStandardTime + */ + + /** + * Constructs a new Backup. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a Backup. + * @implements IBackup + * @constructor + * @param {google.bigtable.admin.v2.IBackup=} [properties] Properties to set + */ + function Backup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Backup name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.name = ""; + + /** + * Backup sourceTable. + * @member {string} sourceTable + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.sourceTable = ""; + + /** + * Backup sourceBackup. + * @member {string} sourceBackup + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.sourceBackup = ""; + + /** + * Backup expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.expireTime = null; + + /** + * Backup startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.startTime = null; + + /** + * Backup endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.endTime = null; + + /** + * Backup sizeBytes. + * @member {number|Long} sizeBytes + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Backup state. + * @member {google.bigtable.admin.v2.Backup.State} state + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup encryptionInfo. + * @member {google.bigtable.admin.v2.IEncryptionInfo|null|undefined} encryptionInfo + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.encryptionInfo = null; + + /** + * Backup backupType. + * @member {google.bigtable.admin.v2.Backup.BackupType} backupType + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.backupType = 0; + + /** + * Backup hotToStandardTime. + * @member {google.protobuf.ITimestamp|null|undefined} hotToStandardTime + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.hotToStandardTime = null; + + /** + * Creates a new Backup instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Backup + * @static + * @param {google.bigtable.admin.v2.IBackup=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Backup} Backup instance + */ + Backup.create = function create(properties) { + return new Backup(properties); + }; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Backup + * @static + * @param {google.bigtable.admin.v2.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceTable); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.sizeBytes); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.sourceBackup); + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.backupType); + if (message.hotToStandardTime != null && Object.hasOwnProperty.call(message, "hotToStandardTime")) + $root.google.protobuf.Timestamp.encode(message.hotToStandardTime, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Backup + * @static + * @param {google.bigtable.admin.v2.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Backup + * @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.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Backup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceTable = reader.string(); + break; + } + case 10: { + message.sourceBackup = reader.string(); + break; + } + case 3: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.sizeBytes = reader.int64(); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 9: { + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 11: { + message.backupType = reader.int32(); + break; + } + case 12: { + message.hotToStandardTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Backup message. + * @function verify + * @memberof google.bigtable.admin.v2.Backup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backup.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + if (!$util.isString(message.sourceTable)) + return "sourceTable: string expected"; + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + if (!$util.isString(message.sourceBackup)) + return "sourceBackup: string expected"; + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); + if (error) + return "expireTime." + error; + } + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) + return "sizeBytes: integer|Long expected"; + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo, long + 1); + if (error) + return "encryptionInfo." + error; + } + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.hotToStandardTime != null && Object.hasOwnProperty.call(message, "hotToStandardTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.hotToStandardTime, long + 1); + if (error) + return "hotToStandardTime." + error; + } + return null; + }; + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Backup + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Backup} Backup + */ + Backup.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Backup) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Backup: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.sourceTable != null) + message.sourceTable = String(object.sourceTable); + if (object.sourceBackup != null) + message.sourceBackup = String(object.sourceBackup); + if (object.expireTime != null) { + if (!$util.isObject(object.expireTime)) + throw TypeError(".google.bigtable.admin.v2.Backup.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); + } + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.Backup.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.Backup.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + if (object.sizeBytes != null) + if ($util.Long) + message.sizeBytes = $util.Long.fromValue(object.sizeBytes, false); + else if (typeof object.sizeBytes === "string") + message.sizeBytes = parseInt(object.sizeBytes, 10); + else if (typeof object.sizeBytes === "number") + message.sizeBytes = object.sizeBytes; + else if (typeof object.sizeBytes === "object") + message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + } + if (object.encryptionInfo != null) { + if (!$util.isObject(object.encryptionInfo)) + throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo, long + 1); + } + switch (object.backupType) { + default: + if (typeof object.backupType === "number") { + message.backupType = object.backupType; + break; + } + break; + case "BACKUP_TYPE_UNSPECIFIED": + case 0: + message.backupType = 0; + break; + case "STANDARD": + case 1: + message.backupType = 1; + break; + case "HOT": + case 2: + message.backupType = 2; + break; + } + if (object.hotToStandardTime != null) { + if (!$util.isObject(object.hotToStandardTime)) + throw TypeError(".google.bigtable.admin.v2.Backup.hotToStandardTime: object expected"); + message.hotToStandardTime = $root.google.protobuf.Timestamp.fromObject(object.hotToStandardTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Backup + * @static + * @param {google.bigtable.admin.v2.Backup} message Backup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Backup.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.sourceTable = ""; + object.expireTime = null; + object.startTime = null; + object.endTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.sizeBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.encryptionInfo = null; + object.sourceBackup = ""; + object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; + object.hotToStandardTime = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + object.sourceTable = message.sourceTable; + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.sizeBytes = typeof message.sizeBytes === "number" ? BigInt(message.sizeBytes) : $util.Long.fromBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0, false).toBigInt(); + else if (typeof message.sizeBytes === "number") + object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; + else + object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.Backup.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Backup.State[message.state] : message.state; + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options, q + 1); + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + object.sourceBackup = message.sourceBackup; + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + object.backupType = options.enums === String ? $root.google.bigtable.admin.v2.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.bigtable.admin.v2.Backup.BackupType[message.backupType] : message.backupType; + if (message.hotToStandardTime != null && Object.hasOwnProperty.call(message, "hotToStandardTime")) + object.hotToStandardTime = $root.google.protobuf.Timestamp.toObject(message.hotToStandardTime, options, q + 1); + return object; + }; + + /** + * Converts this Backup to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Backup + * @instance + * @returns {Object.} JSON object + */ + Backup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Backup + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Backup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Backup"; + }; + + /** + * State enum. + * @name google.bigtable.admin.v2.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + return values; + })(); + + /** + * BackupType enum. + * @name google.bigtable.admin.v2.Backup.BackupType + * @enum {number} + * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} HOT=2 HOT value + */ + Backup.BackupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "HOT"] = 2; + return values; + })(); + + return Backup; + })(); + + v2.BackupInfo = (function() { + + /** + * Properties of a BackupInfo. + * @memberof google.bigtable.admin.v2 + * @interface IBackupInfo + * @property {string|null} [backup] BackupInfo backup + * @property {google.protobuf.ITimestamp|null} [startTime] BackupInfo startTime + * @property {google.protobuf.ITimestamp|null} [endTime] BackupInfo endTime + * @property {string|null} [sourceTable] BackupInfo sourceTable + * @property {string|null} [sourceBackup] BackupInfo sourceBackup + */ + + /** + * Constructs a new BackupInfo. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a BackupInfo. + * @implements IBackupInfo + * @constructor + * @param {google.bigtable.admin.v2.IBackupInfo=} [properties] Properties to set + */ + function BackupInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupInfo backup. + * @member {string} backup + * @memberof google.bigtable.admin.v2.BackupInfo + * @instance + */ + BackupInfo.prototype.backup = ""; + + /** + * BackupInfo startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.BackupInfo + * @instance + */ + BackupInfo.prototype.startTime = null; + + /** + * BackupInfo endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.BackupInfo + * @instance + */ + BackupInfo.prototype.endTime = null; + + /** + * BackupInfo sourceTable. + * @member {string} sourceTable + * @memberof google.bigtable.admin.v2.BackupInfo + * @instance + */ + BackupInfo.prototype.sourceTable = ""; + + /** + * BackupInfo sourceBackup. + * @member {string} sourceBackup + * @memberof google.bigtable.admin.v2.BackupInfo + * @instance + */ + BackupInfo.prototype.sourceBackup = ""; + + /** + * Creates a new BackupInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.BackupInfo + * @static + * @param {google.bigtable.admin.v2.IBackupInfo=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo instance + */ + BackupInfo.create = function create(properties) { + return new BackupInfo(properties); + }; + + /** + * Encodes the specified BackupInfo message. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.BackupInfo + * @static + * @param {google.bigtable.admin.v2.IBackupInfo} message BackupInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceTable); + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.sourceBackup); + return writer; + }; + + /** + * Encodes the specified BackupInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.BackupInfo + * @static + * @param {google.bigtable.admin.v2.IBackupInfo} message BackupInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a BackupInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.BackupInfo + * @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.BackupInfo} BackupInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.BackupInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.backup = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.sourceTable = reader.string(); + break; + } + case 10: { + message.sourceBackup = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BackupInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.BackupInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupInfo message. + * @function verify + * @memberof google.bigtable.admin.v2.BackupInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + if (!$util.isString(message.sourceTable)) + return "sourceTable: string expected"; + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + if (!$util.isString(message.sourceBackup)) + return "sourceBackup: string expected"; + return null; + }; + + /** + * Creates a BackupInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.BackupInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo + */ + BackupInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.BackupInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.BackupInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.BackupInfo(); + if (object.backup != null) + message.backup = String(object.backup); + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.admin.v2.BackupInfo.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.admin.v2.BackupInfo.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + if (object.sourceTable != null) + message.sourceTable = String(object.sourceTable); + if (object.sourceBackup != null) + message.sourceBackup = String(object.sourceBackup); + return message; + }; + + /** + * Creates a plain object from a BackupInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.BackupInfo + * @static + * @param {google.bigtable.admin.v2.BackupInfo} message BackupInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.backup = ""; + object.startTime = null; + object.endTime = null; + object.sourceTable = ""; + object.sourceBackup = ""; + } + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + object.backup = message.backup; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + object.sourceTable = message.sourceTable; + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + object.sourceBackup = message.sourceBackup; + return object; + }; + + /** + * Converts this BackupInfo to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.BackupInfo + * @instance + * @returns {Object.} JSON object + */ + BackupInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupInfo + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.BackupInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.BackupInfo"; + }; + + return BackupInfo; + })(); + + /** + * RestoreSourceType enum. + * @name google.bigtable.admin.v2.RestoreSourceType + * @enum {number} + * @property {number} RESTORE_SOURCE_TYPE_UNSPECIFIED=0 RESTORE_SOURCE_TYPE_UNSPECIFIED value + * @property {number} BACKUP=1 BACKUP value + */ + v2.RestoreSourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTORE_SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP"] = 1; + return values; + })(); + + v2.TieredStorageConfig = (function() { + + /** + * Properties of a TieredStorageConfig. + * @memberof google.bigtable.admin.v2 + * @interface ITieredStorageConfig + * @property {google.bigtable.admin.v2.ITieredStorageRule|null} [infrequentAccess] TieredStorageConfig infrequentAccess + */ + + /** + * Constructs a new TieredStorageConfig. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a TieredStorageConfig. + * @implements ITieredStorageConfig + * @constructor + * @param {google.bigtable.admin.v2.ITieredStorageConfig=} [properties] Properties to set + */ + function TieredStorageConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TieredStorageConfig infrequentAccess. + * @member {google.bigtable.admin.v2.ITieredStorageRule|null|undefined} infrequentAccess + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @instance + */ + TieredStorageConfig.prototype.infrequentAccess = null; + + /** + * Creates a new TieredStorageConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @static + * @param {google.bigtable.admin.v2.ITieredStorageConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.TieredStorageConfig} TieredStorageConfig instance + */ + TieredStorageConfig.create = function create(properties) { + return new TieredStorageConfig(properties); + }; + + /** + * Encodes the specified TieredStorageConfig message. Does not implicitly {@link google.bigtable.admin.v2.TieredStorageConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @static + * @param {google.bigtable.admin.v2.ITieredStorageConfig} message TieredStorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TieredStorageConfig.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.infrequentAccess != null && Object.hasOwnProperty.call(message, "infrequentAccess")) + $root.google.bigtable.admin.v2.TieredStorageRule.encode(message.infrequentAccess, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified TieredStorageConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.TieredStorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @static + * @param {google.bigtable.admin.v2.ITieredStorageConfig} message TieredStorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TieredStorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TieredStorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @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.TieredStorageConfig} TieredStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TieredStorageConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.TieredStorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infrequentAccess = $root.google.bigtable.admin.v2.TieredStorageRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TieredStorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.TieredStorageConfig} TieredStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TieredStorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TieredStorageConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TieredStorageConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infrequentAccess != null && Object.hasOwnProperty.call(message, "infrequentAccess")) { + var error = $root.google.bigtable.admin.v2.TieredStorageRule.verify(message.infrequentAccess, long + 1); + if (error) + return "infrequentAccess." + error; + } + return null; + }; + + /** + * Creates a TieredStorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.TieredStorageConfig} TieredStorageConfig + */ + TieredStorageConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.TieredStorageConfig) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.TieredStorageConfig: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.TieredStorageConfig(); + if (object.infrequentAccess != null) { + if (!$util.isObject(object.infrequentAccess)) + throw TypeError(".google.bigtable.admin.v2.TieredStorageConfig.infrequentAccess: object expected"); + message.infrequentAccess = $root.google.bigtable.admin.v2.TieredStorageRule.fromObject(object.infrequentAccess, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TieredStorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @static + * @param {google.bigtable.admin.v2.TieredStorageConfig} message TieredStorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TieredStorageConfig.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.infrequentAccess = null; + if (message.infrequentAccess != null && Object.hasOwnProperty.call(message, "infrequentAccess")) + object.infrequentAccess = $root.google.bigtable.admin.v2.TieredStorageRule.toObject(message.infrequentAccess, options, q + 1); + return object; + }; + + /** + * Converts this TieredStorageConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @instance + * @returns {Object.} JSON object + */ + TieredStorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TieredStorageConfig + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.TieredStorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TieredStorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.TieredStorageConfig"; + }; + + return TieredStorageConfig; + })(); + + v2.TieredStorageRule = (function() { + + /** + * Properties of a TieredStorageRule. + * @memberof google.bigtable.admin.v2 + * @interface ITieredStorageRule + * @property {google.protobuf.IDuration|null} [includeIfOlderThan] TieredStorageRule includeIfOlderThan + */ + + /** + * Constructs a new TieredStorageRule. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a TieredStorageRule. + * @implements ITieredStorageRule + * @constructor + * @param {google.bigtable.admin.v2.ITieredStorageRule=} [properties] Properties to set + */ + function TieredStorageRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TieredStorageRule includeIfOlderThan. + * @member {google.protobuf.IDuration|null|undefined} includeIfOlderThan + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @instance + */ + TieredStorageRule.prototype.includeIfOlderThan = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TieredStorageRule rule. + * @member {"includeIfOlderThan"|undefined} rule + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @instance + */ + Object.defineProperty(TieredStorageRule.prototype, "rule", { + get: $util.oneOfGetter($oneOfFields = ["includeIfOlderThan"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TieredStorageRule instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @static + * @param {google.bigtable.admin.v2.ITieredStorageRule=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.TieredStorageRule} TieredStorageRule instance + */ + TieredStorageRule.create = function create(properties) { + return new TieredStorageRule(properties); + }; + + /** + * Encodes the specified TieredStorageRule message. Does not implicitly {@link google.bigtable.admin.v2.TieredStorageRule.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @static + * @param {google.bigtable.admin.v2.ITieredStorageRule} message TieredStorageRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TieredStorageRule.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.includeIfOlderThan != null && Object.hasOwnProperty.call(message, "includeIfOlderThan")) + $root.google.protobuf.Duration.encode(message.includeIfOlderThan, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified TieredStorageRule message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.TieredStorageRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @static + * @param {google.bigtable.admin.v2.ITieredStorageRule} message TieredStorageRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TieredStorageRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TieredStorageRule message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @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.TieredStorageRule} TieredStorageRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TieredStorageRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.TieredStorageRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.includeIfOlderThan = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TieredStorageRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.TieredStorageRule} TieredStorageRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TieredStorageRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TieredStorageRule message. + * @function verify + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TieredStorageRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.includeIfOlderThan != null && Object.hasOwnProperty.call(message, "includeIfOlderThan")) { + properties.rule = 1; + { + var error = $root.google.protobuf.Duration.verify(message.includeIfOlderThan, long + 1); + if (error) + return "includeIfOlderThan." + error; + } + } + return null; + }; + + /** + * Creates a TieredStorageRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.TieredStorageRule} TieredStorageRule + */ + TieredStorageRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.TieredStorageRule) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.TieredStorageRule: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.TieredStorageRule(); + if (object.includeIfOlderThan != null) { + if (!$util.isObject(object.includeIfOlderThan)) + throw TypeError(".google.bigtable.admin.v2.TieredStorageRule.includeIfOlderThan: object expected"); + message.includeIfOlderThan = $root.google.protobuf.Duration.fromObject(object.includeIfOlderThan, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TieredStorageRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @static + * @param {google.bigtable.admin.v2.TieredStorageRule} message TieredStorageRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TieredStorageRule.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.includeIfOlderThan != null && Object.hasOwnProperty.call(message, "includeIfOlderThan")) { + object.includeIfOlderThan = $root.google.protobuf.Duration.toObject(message.includeIfOlderThan, options, q + 1); + if (options.oneofs) + object.rule = "includeIfOlderThan"; + } + return object; + }; + + /** + * Converts this TieredStorageRule to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @instance + * @returns {Object.} JSON object + */ + TieredStorageRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TieredStorageRule + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.TieredStorageRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TieredStorageRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.TieredStorageRule"; + }; + + return TieredStorageRule; + })(); + + v2.ProtoSchema = (function() { + + /** + * Properties of a ProtoSchema. + * @memberof google.bigtable.admin.v2 + * @interface IProtoSchema + * @property {Uint8Array|null} [protoDescriptors] ProtoSchema protoDescriptors + */ + + /** + * Constructs a new ProtoSchema. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ProtoSchema. + * @implements IProtoSchema + * @constructor + * @param {google.bigtable.admin.v2.IProtoSchema=} [properties] Properties to set + */ + function ProtoSchema(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtoSchema protoDescriptors. + * @member {Uint8Array} protoDescriptors + * @memberof google.bigtable.admin.v2.ProtoSchema + * @instance + */ + ProtoSchema.prototype.protoDescriptors = $util.newBuffer([]); + + /** + * Creates a new ProtoSchema instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ProtoSchema + * @static + * @param {google.bigtable.admin.v2.IProtoSchema=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ProtoSchema} ProtoSchema instance + */ + ProtoSchema.create = function create(properties) { + return new ProtoSchema(properties); + }; + + /** + * Encodes the specified ProtoSchema message. Does not implicitly {@link google.bigtable.admin.v2.ProtoSchema.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ProtoSchema + * @static + * @param {google.bigtable.admin.v2.IProtoSchema} message ProtoSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoSchema.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.protoDescriptors != null && Object.hasOwnProperty.call(message, "protoDescriptors")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.protoDescriptors); + return writer; + }; + + /** + * Encodes the specified ProtoSchema message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ProtoSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ProtoSchema + * @static + * @param {google.bigtable.admin.v2.IProtoSchema} message ProtoSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ProtoSchema message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ProtoSchema + * @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.ProtoSchema} ProtoSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoSchema.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ProtoSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.protoDescriptors = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ProtoSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ProtoSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ProtoSchema} ProtoSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtoSchema message. + * @function verify + * @memberof google.bigtable.admin.v2.ProtoSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtoSchema.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.protoDescriptors != null && Object.hasOwnProperty.call(message, "protoDescriptors")) + if (!(message.protoDescriptors && typeof message.protoDescriptors.length === "number" || $util.isString(message.protoDescriptors))) + return "protoDescriptors: buffer expected"; + return null; + }; + + /** + * Creates a ProtoSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ProtoSchema + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ProtoSchema} ProtoSchema + */ + ProtoSchema.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.ProtoSchema) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ProtoSchema: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.ProtoSchema(); + if (object.protoDescriptors != null) + if (typeof object.protoDescriptors === "string") + $util.base64.decode(object.protoDescriptors, message.protoDescriptors = $util.newBuffer($util.base64.length(object.protoDescriptors)), 0); + else if (object.protoDescriptors.length >= 0) + message.protoDescriptors = object.protoDescriptors; + return message; + }; + + /** + * Creates a plain object from a ProtoSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ProtoSchema + * @static + * @param {google.bigtable.admin.v2.ProtoSchema} message ProtoSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtoSchema.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.protoDescriptors = ""; + else { + object.protoDescriptors = []; + if (options.bytes !== Array) + object.protoDescriptors = $util.newBuffer(object.protoDescriptors); + } + if (message.protoDescriptors != null && Object.hasOwnProperty.call(message, "protoDescriptors")) + object.protoDescriptors = options.bytes === String ? $util.base64.encode(message.protoDescriptors, 0, message.protoDescriptors.length) : options.bytes === Array ? Array.prototype.slice.call(message.protoDescriptors) : message.protoDescriptors; + return object; + }; + + /** + * Converts this ProtoSchema to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ProtoSchema + * @instance + * @returns {Object.} JSON object + */ + ProtoSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtoSchema + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ProtoSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtoSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ProtoSchema"; + }; + + return ProtoSchema; + })(); + + v2.SchemaBundle = (function() { + + /** + * Properties of a SchemaBundle. + * @memberof google.bigtable.admin.v2 + * @interface ISchemaBundle + * @property {string|null} [name] SchemaBundle name + * @property {google.bigtable.admin.v2.IProtoSchema|null} [protoSchema] SchemaBundle protoSchema + * @property {string|null} [etag] SchemaBundle etag + */ + + /** + * Constructs a new SchemaBundle. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a SchemaBundle. + * @implements ISchemaBundle + * @constructor + * @param {google.bigtable.admin.v2.ISchemaBundle=} [properties] Properties to set + */ + function SchemaBundle(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaBundle name. + * @member {string} name + * @memberof google.bigtable.admin.v2.SchemaBundle + * @instance + */ + SchemaBundle.prototype.name = ""; + + /** + * SchemaBundle protoSchema. + * @member {google.bigtable.admin.v2.IProtoSchema|null|undefined} protoSchema + * @memberof google.bigtable.admin.v2.SchemaBundle + * @instance + */ + SchemaBundle.prototype.protoSchema = null; + + /** + * SchemaBundle etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.SchemaBundle + * @instance + */ + SchemaBundle.prototype.etag = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SchemaBundle type. + * @member {"protoSchema"|undefined} type + * @memberof google.bigtable.admin.v2.SchemaBundle + * @instance + */ + Object.defineProperty(SchemaBundle.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["protoSchema"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchemaBundle instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.SchemaBundle + * @static + * @param {google.bigtable.admin.v2.ISchemaBundle=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.SchemaBundle} SchemaBundle instance + */ + SchemaBundle.create = function create(properties) { + return new SchemaBundle(properties); + }; + + /** + * Encodes the specified SchemaBundle message. Does not implicitly {@link google.bigtable.admin.v2.SchemaBundle.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.SchemaBundle + * @static + * @param {google.bigtable.admin.v2.ISchemaBundle} message SchemaBundle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaBundle.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) + $root.google.bigtable.admin.v2.ProtoSchema.encode(message.protoSchema, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); + return writer; + }; + + /** + * Encodes the specified SchemaBundle message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.SchemaBundle.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.SchemaBundle + * @static + * @param {google.bigtable.admin.v2.ISchemaBundle} message SchemaBundle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaBundle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SchemaBundle message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.SchemaBundle + * @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.SchemaBundle} SchemaBundle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaBundle.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.SchemaBundle(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.protoSchema = $root.google.bigtable.admin.v2.ProtoSchema.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaBundle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.SchemaBundle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.SchemaBundle} SchemaBundle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaBundle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaBundle message. + * @function verify + * @memberof google.bigtable.admin.v2.SchemaBundle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaBundle.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) { + properties.type = 1; + { + var error = $root.google.bigtable.admin.v2.ProtoSchema.verify(message.protoSchema, long + 1); + if (error) + return "protoSchema." + error; + } + } + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a SchemaBundle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.SchemaBundle + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.SchemaBundle} SchemaBundle + */ + SchemaBundle.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.SchemaBundle) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.SchemaBundle: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.SchemaBundle(); + if (object.name != null) + message.name = String(object.name); + if (object.protoSchema != null) { + if (!$util.isObject(object.protoSchema)) + throw TypeError(".google.bigtable.admin.v2.SchemaBundle.protoSchema: object expected"); + message.protoSchema = $root.google.bigtable.admin.v2.ProtoSchema.fromObject(object.protoSchema, long + 1); + } + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a SchemaBundle message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.SchemaBundle + * @static + * @param {google.bigtable.admin.v2.SchemaBundle} message SchemaBundle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaBundle.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) { + object.protoSchema = $root.google.bigtable.admin.v2.ProtoSchema.toObject(message.protoSchema, options, q + 1); + if (options.oneofs) + object.type = "protoSchema"; + } + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this SchemaBundle to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.SchemaBundle + * @instance + * @returns {Object.} JSON object + */ + SchemaBundle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaBundle + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.SchemaBundle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaBundle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.SchemaBundle"; + }; + + return SchemaBundle; + })(); + + v2.Type = (function() { + + /** + * Properties of a Type. + * @memberof google.bigtable.admin.v2 + * @interface IType + * @property {google.bigtable.admin.v2.Type.IBytes|null} [bytesType] Type bytesType + * @property {google.bigtable.admin.v2.Type.IString|null} [stringType] Type stringType + * @property {google.bigtable.admin.v2.Type.IInt64|null} [int64Type] Type int64Type + * @property {google.bigtable.admin.v2.Type.IFloat32|null} [float32Type] Type float32Type + * @property {google.bigtable.admin.v2.Type.IFloat64|null} [float64Type] Type float64Type + * @property {google.bigtable.admin.v2.Type.IBool|null} [boolType] Type boolType + * @property {google.bigtable.admin.v2.Type.ITimestamp|null} [timestampType] Type timestampType + * @property {google.bigtable.admin.v2.Type.IDate|null} [dateType] Type dateType + * @property {google.bigtable.admin.v2.Type.IAggregate|null} [aggregateType] Type aggregateType + * @property {google.bigtable.admin.v2.Type.IStruct|null} [structType] Type structType + * @property {google.bigtable.admin.v2.Type.IArray|null} [arrayType] Type arrayType + * @property {google.bigtable.admin.v2.Type.IMap|null} [mapType] Type mapType + * @property {google.bigtable.admin.v2.Type.IProto|null} [protoType] Type protoType + * @property {google.bigtable.admin.v2.Type.IEnum|null} [enumType] Type enumType + */ + + /** + * Constructs a new Type. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a Type. + * @implements IType + * @constructor + * @param {google.bigtable.admin.v2.IType=} [properties] Properties to set + */ + function Type(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Type bytesType. + * @member {google.bigtable.admin.v2.Type.IBytes|null|undefined} bytesType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.bytesType = null; + + /** + * Type stringType. + * @member {google.bigtable.admin.v2.Type.IString|null|undefined} stringType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.stringType = null; + + /** + * Type int64Type. + * @member {google.bigtable.admin.v2.Type.IInt64|null|undefined} int64Type + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.int64Type = null; + + /** + * Type float32Type. + * @member {google.bigtable.admin.v2.Type.IFloat32|null|undefined} float32Type + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.float32Type = null; + + /** + * Type float64Type. + * @member {google.bigtable.admin.v2.Type.IFloat64|null|undefined} float64Type + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.float64Type = null; + + /** + * Type boolType. + * @member {google.bigtable.admin.v2.Type.IBool|null|undefined} boolType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.boolType = null; + + /** + * Type timestampType. + * @member {google.bigtable.admin.v2.Type.ITimestamp|null|undefined} timestampType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.timestampType = null; + + /** + * Type dateType. + * @member {google.bigtable.admin.v2.Type.IDate|null|undefined} dateType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.dateType = null; + + /** + * Type aggregateType. + * @member {google.bigtable.admin.v2.Type.IAggregate|null|undefined} aggregateType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.aggregateType = null; + + /** + * Type structType. + * @member {google.bigtable.admin.v2.Type.IStruct|null|undefined} structType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.structType = null; + + /** + * Type arrayType. + * @member {google.bigtable.admin.v2.Type.IArray|null|undefined} arrayType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.arrayType = null; + + /** + * Type mapType. + * @member {google.bigtable.admin.v2.Type.IMap|null|undefined} mapType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.mapType = null; + + /** + * Type protoType. + * @member {google.bigtable.admin.v2.Type.IProto|null|undefined} protoType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.protoType = null; + + /** + * Type enumType. + * @member {google.bigtable.admin.v2.Type.IEnum|null|undefined} enumType + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Type.prototype.enumType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Type kind. + * @member {"bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"|"protoType"|"enumType"|undefined} kind + * @memberof google.bigtable.admin.v2.Type + * @instance + */ + Object.defineProperty(Type.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["bytesType", "stringType", "int64Type", "float32Type", "float64Type", "boolType", "timestampType", "dateType", "aggregateType", "structType", "arrayType", "mapType", "protoType", "enumType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Type instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {google.bigtable.admin.v2.IType=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type} Type instance + */ + Type.create = function create(properties) { + return new Type(properties); + }; + + /** + * Encodes the specified Type message. Does not implicitly {@link google.bigtable.admin.v2.Type.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {google.bigtable.admin.v2.IType} message Type message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Type.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) + $root.google.bigtable.admin.v2.Type.String.encode(message.stringType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) + $root.google.bigtable.admin.v2.Type.Array.encode(message.arrayType, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) + $root.google.bigtable.admin.v2.Type.Map.encode(message.mapType, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) + $root.google.bigtable.admin.v2.Type.Int64.encode(message.int64Type, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) + $root.google.bigtable.admin.v2.Type.Aggregate.encode(message.aggregateType, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) + $root.google.bigtable.admin.v2.Type.Struct.encode(message.structType, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) + $root.google.bigtable.admin.v2.Type.Bool.encode(message.boolType, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) + $root.google.bigtable.admin.v2.Type.Float64.encode(message.float64Type, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) + $root.google.bigtable.admin.v2.Type.Timestamp.encode(message.timestampType, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) + $root.google.bigtable.admin.v2.Type.Date.encode(message.dateType, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) + $root.google.bigtable.admin.v2.Type.Float32.encode(message.float32Type, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) + $root.google.bigtable.admin.v2.Type.Proto.encode(message.protoType, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + $root.google.bigtable.admin.v2.Type.Enum.encode(message.enumType, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Type message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {google.bigtable.admin.v2.IType} message Type message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Type.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Type message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type + * @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.Type} Type + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Type.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.stringType = $root.google.bigtable.admin.v2.Type.String.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 12: { + message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.boolType = $root.google.bigtable.admin.v2.Type.Bool.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 11: { + message.dateType = $root.google.bigtable.admin.v2.Type.Date.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.structType = $root.google.bigtable.admin.v2.Type.Struct.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.arrayType = $root.google.bigtable.admin.v2.Type.Array.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.mapType = $root.google.bigtable.admin.v2.Type.Map.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 13: { + message.protoType = $root.google.bigtable.admin.v2.Type.Proto.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 14: { + message.enumType = $root.google.bigtable.admin.v2.Type.Enum.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Type message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type} Type + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Type.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Type message. + * @function verify + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Type.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType, long + 1); + if (error) + return "bytesType." + error; + } + } + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.String.verify(message.stringType, long + 1); + if (error) + return "stringType." + error; + } + } + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Int64.verify(message.int64Type, long + 1); + if (error) + return "int64Type." + error; + } + } + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Float32.verify(message.float32Type, long + 1); + if (error) + return "float32Type." + error; + } + } + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Float64.verify(message.float64Type, long + 1); + if (error) + return "float64Type." + error; + } + } + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bool.verify(message.boolType, long + 1); + if (error) + return "boolType." + error; + } + } + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Timestamp.verify(message.timestampType, long + 1); + if (error) + return "timestampType." + error; + } + } + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Date.verify(message.dateType, long + 1); + if (error) + return "dateType." + error; + } + } + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.verify(message.aggregateType, long + 1); + if (error) + return "aggregateType." + error; + } + } + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Struct.verify(message.structType, long + 1); + if (error) + return "structType." + error; + } + } + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Array.verify(message.arrayType, long + 1); + if (error) + return "arrayType." + error; + } + } + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Map.verify(message.mapType, long + 1); + if (error) + return "mapType." + error; + } + } + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Proto.verify(message.protoType, long + 1); + if (error) + return "protoType." + error; + } + } + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Enum.verify(message.enumType, long + 1); + if (error) + return "enumType." + error; + } + } + return null; + }; + + /** + * Creates a Type message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type} Type + */ + Type.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type(); + if (object.bytesType != null) { + if (!$util.isObject(object.bytesType)) + throw TypeError(".google.bigtable.admin.v2.Type.bytesType: object expected"); + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.fromObject(object.bytesType, long + 1); + } + if (object.stringType != null) { + if (!$util.isObject(object.stringType)) + throw TypeError(".google.bigtable.admin.v2.Type.stringType: object expected"); + message.stringType = $root.google.bigtable.admin.v2.Type.String.fromObject(object.stringType, long + 1); + } + if (object.int64Type != null) { + if (!$util.isObject(object.int64Type)) + throw TypeError(".google.bigtable.admin.v2.Type.int64Type: object expected"); + message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.fromObject(object.int64Type, long + 1); + } + if (object.float32Type != null) { + if (!$util.isObject(object.float32Type)) + throw TypeError(".google.bigtable.admin.v2.Type.float32Type: object expected"); + message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.fromObject(object.float32Type, long + 1); + } + if (object.float64Type != null) { + if (!$util.isObject(object.float64Type)) + throw TypeError(".google.bigtable.admin.v2.Type.float64Type: object expected"); + message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.fromObject(object.float64Type, long + 1); + } + if (object.boolType != null) { + if (!$util.isObject(object.boolType)) + throw TypeError(".google.bigtable.admin.v2.Type.boolType: object expected"); + message.boolType = $root.google.bigtable.admin.v2.Type.Bool.fromObject(object.boolType, long + 1); + } + if (object.timestampType != null) { + if (!$util.isObject(object.timestampType)) + throw TypeError(".google.bigtable.admin.v2.Type.timestampType: object expected"); + message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.fromObject(object.timestampType, long + 1); + } + if (object.dateType != null) { + if (!$util.isObject(object.dateType)) + throw TypeError(".google.bigtable.admin.v2.Type.dateType: object expected"); + message.dateType = $root.google.bigtable.admin.v2.Type.Date.fromObject(object.dateType, long + 1); + } + if (object.aggregateType != null) { + if (!$util.isObject(object.aggregateType)) + throw TypeError(".google.bigtable.admin.v2.Type.aggregateType: object expected"); + message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.fromObject(object.aggregateType, long + 1); + } + if (object.structType != null) { + if (!$util.isObject(object.structType)) + throw TypeError(".google.bigtable.admin.v2.Type.structType: object expected"); + message.structType = $root.google.bigtable.admin.v2.Type.Struct.fromObject(object.structType, long + 1); + } + if (object.arrayType != null) { + if (!$util.isObject(object.arrayType)) + throw TypeError(".google.bigtable.admin.v2.Type.arrayType: object expected"); + message.arrayType = $root.google.bigtable.admin.v2.Type.Array.fromObject(object.arrayType, long + 1); + } + if (object.mapType != null) { + if (!$util.isObject(object.mapType)) + throw TypeError(".google.bigtable.admin.v2.Type.mapType: object expected"); + message.mapType = $root.google.bigtable.admin.v2.Type.Map.fromObject(object.mapType, long + 1); + } + if (object.protoType != null) { + if (!$util.isObject(object.protoType)) + throw TypeError(".google.bigtable.admin.v2.Type.protoType: object expected"); + message.protoType = $root.google.bigtable.admin.v2.Type.Proto.fromObject(object.protoType, long + 1); + } + if (object.enumType != null) { + if (!$util.isObject(object.enumType)) + throw TypeError(".google.bigtable.admin.v2.Type.enumType: object expected"); + message.enumType = $root.google.bigtable.admin.v2.Type.Enum.fromObject(object.enumType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Type message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {google.bigtable.admin.v2.Type} message Type + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Type.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { + object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options, q + 1); + if (options.oneofs) + object.kind = "bytesType"; + } + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) { + object.stringType = $root.google.bigtable.admin.v2.Type.String.toObject(message.stringType, options, q + 1); + if (options.oneofs) + object.kind = "stringType"; + } + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) { + object.arrayType = $root.google.bigtable.admin.v2.Type.Array.toObject(message.arrayType, options, q + 1); + if (options.oneofs) + object.kind = "arrayType"; + } + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) { + object.mapType = $root.google.bigtable.admin.v2.Type.Map.toObject(message.mapType, options, q + 1); + if (options.oneofs) + object.kind = "mapType"; + } + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) { + object.int64Type = $root.google.bigtable.admin.v2.Type.Int64.toObject(message.int64Type, options, q + 1); + if (options.oneofs) + object.kind = "int64Type"; + } + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) { + object.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.toObject(message.aggregateType, options, q + 1); + if (options.oneofs) + object.kind = "aggregateType"; + } + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) { + object.structType = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.structType, options, q + 1); + if (options.oneofs) + object.kind = "structType"; + } + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) { + object.boolType = $root.google.bigtable.admin.v2.Type.Bool.toObject(message.boolType, options, q + 1); + if (options.oneofs) + object.kind = "boolType"; + } + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) { + object.float64Type = $root.google.bigtable.admin.v2.Type.Float64.toObject(message.float64Type, options, q + 1); + if (options.oneofs) + object.kind = "float64Type"; + } + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) { + object.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.toObject(message.timestampType, options, q + 1); + if (options.oneofs) + object.kind = "timestampType"; + } + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) { + object.dateType = $root.google.bigtable.admin.v2.Type.Date.toObject(message.dateType, options, q + 1); + if (options.oneofs) + object.kind = "dateType"; + } + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) { + object.float32Type = $root.google.bigtable.admin.v2.Type.Float32.toObject(message.float32Type, options, q + 1); + if (options.oneofs) + object.kind = "float32Type"; + } + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) { + object.protoType = $root.google.bigtable.admin.v2.Type.Proto.toObject(message.protoType, options, q + 1); + if (options.oneofs) + object.kind = "protoType"; + } + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + object.enumType = $root.google.bigtable.admin.v2.Type.Enum.toObject(message.enumType, options, q + 1); + if (options.oneofs) + object.kind = "enumType"; + } + return object; + }; + + /** + * Converts this Type to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type + * @instance + * @returns {Object.} JSON object + */ + Type.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Type + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Type.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type"; + }; + + Type.Bytes = (function() { + + /** + * Properties of a Bytes. + * @memberof google.bigtable.admin.v2.Type + * @interface IBytes + * @property {google.bigtable.admin.v2.Type.Bytes.IEncoding|null} [encoding] Bytes encoding + */ + + /** + * Constructs a new Bytes. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Bytes. + * @implements IBytes + * @constructor + * @param {google.bigtable.admin.v2.Type.IBytes=} [properties] Properties to set + */ + function Bytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Bytes encoding. + * @member {google.bigtable.admin.v2.Type.Bytes.IEncoding|null|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Bytes + * @instance + */ + Bytes.prototype.encoding = null; + + /** + * Creates a new Bytes instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {google.bigtable.admin.v2.Type.IBytes=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Bytes} Bytes instance + */ + Bytes.create = function create(properties) { + return new Bytes(properties); + }; + + /** + * Encodes the specified Bytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {google.bigtable.admin.v2.Type.IBytes} message Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.admin.v2.Type.Bytes.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Bytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {google.bigtable.admin.v2.Type.IBytes} message Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Bytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Bytes + * @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.Type.Bytes} Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Bytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Bytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Bytes} Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Bytes message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Bytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a Bytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Bytes} Bytes + */ + Bytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Bytes: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Bytes(); + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.admin.v2.Type.Bytes.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Bytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {google.bigtable.admin.v2.Type.Bytes} message Bytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Bytes.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this Bytes to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Bytes + * @instance + * @returns {Object.} JSON object + */ + Bytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Bytes + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Bytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Bytes"; + }; + + Bytes.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.admin.v2.Type.Bytes + * @interface IEncoding + * @property {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw|null} [raw] Encoding raw + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.admin.v2.Type.Bytes + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.admin.v2.Type.Bytes.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding raw. + * @member {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw|null|undefined} raw + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @instance + */ + Encoding.prototype.raw = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"raw"|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["raw"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) + $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.encode(message.raw, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @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.Type.Bytes.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Bytes.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify(message.raw, long + 1); + if (error) + return "raw." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Bytes.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Bytes.Encoding(); + if (object.raw != null) { + if (!$util.isObject(object.raw)) + throw TypeError(".google.bigtable.admin.v2.Type.Bytes.Encoding.raw: object expected"); + message.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.fromObject(object.raw, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) { + object.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options, q + 1); + if (options.oneofs) + object.encoding = "raw"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Bytes.Encoding"; + }; + + Encoding.Raw = (function() { + + /** + * Properties of a Raw. + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @interface IRaw + */ + + /** + * Constructs a new Raw. + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @classdesc Represents a Raw. + * @implements IRaw + * @constructor + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw=} [properties] Properties to set + */ + function Raw(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Raw instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} Raw instance + */ + Raw.create = function create(properties) { + return new Raw(properties); + }; + + /** + * Encodes the specified Raw message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw} message Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Raw.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Raw message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw} message Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Raw.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Raw message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @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.Type.Bytes.Encoding.Raw} Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Raw.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Raw message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Raw.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Raw message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Raw.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Raw message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} Raw + */ + Raw.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw) + return object; + return new $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw(); + }; + + /** + * Creates a plain object from a Raw message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} message Raw + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Raw.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Raw to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @instance + * @returns {Object.} JSON object + */ + Raw.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Raw + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Raw.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"; + }; + + return Raw; + })(); + + return Encoding; + })(); + + return Bytes; + })(); + + Type.String = (function() { + + /** + * Properties of a String. + * @memberof google.bigtable.admin.v2.Type + * @interface IString + * @property {google.bigtable.admin.v2.Type.String.IEncoding|null} [encoding] String encoding + */ + + /** + * Constructs a new String. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a String. + * @implements IString + * @constructor + * @param {google.bigtable.admin.v2.Type.IString=} [properties] Properties to set + */ + function String(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * String encoding. + * @member {google.bigtable.admin.v2.Type.String.IEncoding|null|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.String + * @instance + */ + String.prototype.encoding = null; + + /** + * Creates a new String instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.String + * @static + * @param {google.bigtable.admin.v2.Type.IString=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.String} String instance + */ + String.create = function create(properties) { + return new String(properties); + }; + + /** + * Encodes the specified String message. Does not implicitly {@link google.bigtable.admin.v2.Type.String.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.String + * @static + * @param {google.bigtable.admin.v2.Type.IString} message String message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + String.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.admin.v2.Type.String.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified String message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.String.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.String + * @static + * @param {google.bigtable.admin.v2.Type.IString} message String message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + String.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a String message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.String + * @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.Type.String} String + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + String.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.String(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a String message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.String + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.String} String + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + String.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a String message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.String + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + String.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.admin.v2.Type.String.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a String message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.String + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.String} String + */ + String.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.String) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.String: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.String(); + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.admin.v2.Type.String.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a String message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.String + * @static + * @param {google.bigtable.admin.v2.Type.String} message String + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + String.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this String to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.String + * @instance + * @returns {Object.} JSON object + */ + String.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for String + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.String + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + String.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.String"; + }; + + String.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.admin.v2.Type.String + * @interface IEncoding + * @property {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw|null} [utf8Raw] Encoding utf8Raw + * @property {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes|null} [utf8Bytes] Encoding utf8Bytes + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.admin.v2.Type.String + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.admin.v2.Type.String.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding utf8Raw. + * @member {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw|null|undefined} utf8Raw + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @instance + */ + Encoding.prototype.utf8Raw = null; + + /** + * Encoding utf8Bytes. + * @member {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes|null|undefined} utf8Bytes + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @instance + */ + Encoding.prototype.utf8Bytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"utf8Raw"|"utf8Bytes"|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["utf8Raw", "utf8Bytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.String.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.String.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.String.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) + $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.encode(message.utf8Raw, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) + $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.encode(message.utf8Bytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.String.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @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.Type.String.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.String.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.String.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw, long + 1); + if (error) + return "utf8Raw." + error; + } + } + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) { + if (properties.encoding === 1) + return "encoding: multiple values"; + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.verify(message.utf8Bytes, long + 1); + if (error) + return "utf8Bytes." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.String.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.String.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.String.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.String.Encoding(); + if (object.utf8Raw != null) { + if (!$util.isObject(object.utf8Raw)) + throw TypeError(".google.bigtable.admin.v2.Type.String.Encoding.utf8Raw: object expected"); + message.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.fromObject(object.utf8Raw, long + 1); + } + if (object.utf8Bytes != null) { + if (!$util.isObject(object.utf8Bytes)) + throw TypeError(".google.bigtable.admin.v2.Type.String.Encoding.utf8Bytes: object expected"); + message.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.fromObject(object.utf8Bytes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) { + object.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options, q + 1); + if (options.oneofs) + object.encoding = "utf8Raw"; + } + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) { + object.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options, q + 1); + if (options.oneofs) + object.encoding = "utf8Bytes"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.String.Encoding"; + }; + + Encoding.Utf8Raw = (function() { + + /** + * Properties of an Utf8Raw. + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @interface IUtf8Raw + */ + + /** + * Constructs a new Utf8Raw. + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @classdesc Represents an Utf8Raw. + * @implements IUtf8Raw + * @constructor + * @param {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw=} [properties] Properties to set + */ + function Utf8Raw(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Utf8Raw instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw} Utf8Raw instance + */ + Utf8Raw.create = function create(properties) { + return new Utf8Raw(properties); + }; + + /** + * Encodes the specified Utf8Raw message. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw} message Utf8Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Utf8Raw.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Utf8Raw message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Raw} message Utf8Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Utf8Raw.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Utf8Raw message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @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.Type.String.Encoding.Utf8Raw} Utf8Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Utf8Raw.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Utf8Raw message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw} Utf8Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Utf8Raw.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Utf8Raw message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Utf8Raw.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an Utf8Raw message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw} Utf8Raw + */ + Utf8Raw.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) + return object; + return new $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw(); + }; + + /** + * Creates a plain object from an Utf8Raw message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw} message Utf8Raw + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Utf8Raw.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Utf8Raw to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @instance + * @returns {Object.} JSON object + */ + Utf8Raw.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Utf8Raw + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Utf8Raw.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"; + }; + + return Utf8Raw; + })(); + + Encoding.Utf8Bytes = (function() { + + /** + * Properties of an Utf8Bytes. + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @interface IUtf8Bytes + */ + + /** + * Constructs a new Utf8Bytes. + * @memberof google.bigtable.admin.v2.Type.String.Encoding + * @classdesc Represents an Utf8Bytes. + * @implements IUtf8Bytes + * @constructor + * @param {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes=} [properties] Properties to set + */ + function Utf8Bytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Utf8Bytes instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes} Utf8Bytes instance + */ + Utf8Bytes.create = function create(properties) { + return new Utf8Bytes(properties); + }; + + /** + * Encodes the specified Utf8Bytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes} message Utf8Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Utf8Bytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Utf8Bytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding.IUtf8Bytes} message Utf8Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Utf8Bytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Utf8Bytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @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.Type.String.Encoding.Utf8Bytes} Utf8Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Utf8Bytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Utf8Bytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes} Utf8Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Utf8Bytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Utf8Bytes message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Utf8Bytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an Utf8Bytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes} Utf8Bytes + */ + Utf8Bytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) + return object; + return new $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes(); + }; + + /** + * Creates a plain object from an Utf8Bytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes} message Utf8Bytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Utf8Bytes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Utf8Bytes to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @instance + * @returns {Object.} JSON object + */ + Utf8Bytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Utf8Bytes + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Utf8Bytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"; + }; + + return Utf8Bytes; + })(); + + return Encoding; + })(); + + return String; + })(); + + Type.Int64 = (function() { + + /** + * Properties of an Int64. + * @memberof google.bigtable.admin.v2.Type + * @interface IInt64 + * @property {google.bigtable.admin.v2.Type.Int64.IEncoding|null} [encoding] Int64 encoding + */ + + /** + * Constructs a new Int64. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents an Int64. + * @implements IInt64 + * @constructor + * @param {google.bigtable.admin.v2.Type.IInt64=} [properties] Properties to set + */ + function Int64(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64 encoding. + * @member {google.bigtable.admin.v2.Type.Int64.IEncoding|null|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Int64 + * @instance + */ + Int64.prototype.encoding = null; + + /** + * Creates a new Int64 instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {google.bigtable.admin.v2.Type.IInt64=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Int64} Int64 instance + */ + Int64.create = function create(properties) { + return new Int64(properties); + }; + + /** + * Encodes the specified Int64 message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {google.bigtable.admin.v2.Type.IInt64} message Int64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.admin.v2.Type.Int64.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Int64 message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {google.bigtable.admin.v2.Type.IInt64} message Int64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Int64 message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Int64 + * @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.Type.Int64} Int64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Int64(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Int64 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Int64} Int64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64 message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates an Int64 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Int64} Int64 + */ + Int64.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Int64(); + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Int64 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {google.bigtable.admin.v2.Type.Int64} message Int64 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this Int64 to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Int64 + * @instance + * @returns {Object.} JSON object + */ + Int64.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64 + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Int64"; + }; + + Int64.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.admin.v2.Type.Int64 + * @interface IEncoding + * @property {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes|null} [bigEndianBytes] Encoding bigEndianBytes + * @property {google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes|null} [orderedCodeBytes] Encoding orderedCodeBytes + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.admin.v2.Type.Int64 + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.admin.v2.Type.Int64.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding bigEndianBytes. + * @member {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes|null|undefined} bigEndianBytes + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @instance + */ + Encoding.prototype.bigEndianBytes = null; + + /** + * Encoding orderedCodeBytes. + * @member {google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes|null|undefined} orderedCodeBytes + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @instance + */ + Encoding.prototype.orderedCodeBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"bigEndianBytes"|"orderedCodeBytes"|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["bigEndianBytes", "orderedCodeBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Int64.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Int64.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) + $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.encode(message.bigEndianBytes, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) + $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Int64.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @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.Type.Int64.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes, long + 1); + if (error) + return "bigEndianBytes." + error; + } + } + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + if (properties.encoding === 1) + return "encoding: multiple values"; + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.verify(message.orderedCodeBytes, long + 1); + if (error) + return "orderedCodeBytes." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding(); + if (object.bigEndianBytes != null) { + if (!$util.isObject(object.bigEndianBytes)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.bigEndianBytes: object expected"); + message.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.fromObject(object.bigEndianBytes, long + 1); + } + if (object.orderedCodeBytes != null) { + if (!$util.isObject(object.orderedCodeBytes)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.orderedCodeBytes: object expected"); + message.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.fromObject(object.orderedCodeBytes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) { + object.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options, q + 1); + if (options.oneofs) + object.encoding = "bigEndianBytes"; + } + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + object.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options, q + 1); + if (options.oneofs) + object.encoding = "orderedCodeBytes"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Int64.Encoding"; + }; + + Encoding.BigEndianBytes = (function() { + + /** + * Properties of a BigEndianBytes. + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @interface IBigEndianBytes + * @property {google.bigtable.admin.v2.Type.IBytes|null} [bytesType] BigEndianBytes bytesType + */ + + /** + * Constructs a new BigEndianBytes. + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @classdesc Represents a BigEndianBytes. + * @implements IBigEndianBytes + * @constructor + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes=} [properties] Properties to set + */ + function BigEndianBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigEndianBytes bytesType. + * @member {google.bigtable.admin.v2.Type.IBytes|null|undefined} bytesType + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @instance + */ + BigEndianBytes.prototype.bytesType = null; + + /** + * Creates a new BigEndianBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes instance + */ + BigEndianBytes.create = function create(properties) { + return new BigEndianBytes(properties); + }; + + /** + * Encodes the specified BigEndianBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes} message BigEndianBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigEndianBytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigEndianBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes} message BigEndianBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigEndianBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @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.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigEndianBytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigEndianBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigEndianBytes message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigEndianBytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { + var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType, long + 1); + if (error) + return "bytesType." + error; + } + return null; + }; + + /** + * Creates a BigEndianBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + */ + BigEndianBytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(); + if (object.bytesType != null) { + if (!$util.isObject(object.bytesType)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytesType: object expected"); + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.fromObject(object.bytesType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a BigEndianBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} message BigEndianBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigEndianBytes.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.bytesType = null; + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options, q + 1); + return object; + }; + + /** + * Converts this BigEndianBytes to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @instance + * @returns {Object.} JSON object + */ + BigEndianBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigEndianBytes + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigEndianBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"; + }; + + return BigEndianBytes; + })(); + + Encoding.OrderedCodeBytes = (function() { + + /** + * Properties of an OrderedCodeBytes. + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @interface IOrderedCodeBytes + */ + + /** + * Constructs a new OrderedCodeBytes. + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @classdesc Represents an OrderedCodeBytes. + * @implements IOrderedCodeBytes + * @constructor + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes=} [properties] Properties to set + */ + function OrderedCodeBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new OrderedCodeBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes} OrderedCodeBytes instance + */ + OrderedCodeBytes.create = function create(properties) { + return new OrderedCodeBytes(properties); + }; + + /** + * Encodes the specified OrderedCodeBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes} message OrderedCodeBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderedCodeBytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified OrderedCodeBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IOrderedCodeBytes} message OrderedCodeBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderedCodeBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @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.Type.Int64.Encoding.OrderedCodeBytes} OrderedCodeBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderedCodeBytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes} OrderedCodeBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderedCodeBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderedCodeBytes message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderedCodeBytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an OrderedCodeBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes} OrderedCodeBytes + */ + OrderedCodeBytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + return object; + return new $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes(); + }; + + /** + * Creates a plain object from an OrderedCodeBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes} message OrderedCodeBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderedCodeBytes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OrderedCodeBytes to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @instance + * @returns {Object.} JSON object + */ + OrderedCodeBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderedCodeBytes + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderedCodeBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"; + }; + + return OrderedCodeBytes; + })(); + + return Encoding; + })(); + + return Int64; + })(); + + Type.Bool = (function() { + + /** + * Properties of a Bool. + * @memberof google.bigtable.admin.v2.Type + * @interface IBool + */ + + /** + * Constructs a new Bool. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Bool. + * @implements IBool + * @constructor + * @param {google.bigtable.admin.v2.Type.IBool=} [properties] Properties to set + */ + function Bool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Bool instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Bool + * @static + * @param {google.bigtable.admin.v2.Type.IBool=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Bool} Bool instance + */ + Bool.create = function create(properties) { + return new Bool(properties); + }; + + /** + * Encodes the specified Bool message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bool.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Bool + * @static + * @param {google.bigtable.admin.v2.Type.IBool} message Bool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bool.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Bool message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bool + * @static + * @param {google.bigtable.admin.v2.Type.IBool} message Bool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Bool message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Bool + * @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.Type.Bool} Bool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bool.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Bool(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Bool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Bool} Bool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Bool message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Bool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Bool.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Bool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Bool + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Bool} Bool + */ + Bool.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bool) + return object; + return new $root.google.bigtable.admin.v2.Type.Bool(); + }; + + /** + * Creates a plain object from a Bool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Bool + * @static + * @param {google.bigtable.admin.v2.Type.Bool} message Bool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Bool.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Bool to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Bool + * @instance + * @returns {Object.} JSON object + */ + Bool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Bool + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Bool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Bool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Bool"; + }; + + return Bool; + })(); + + Type.Float32 = (function() { + + /** + * Properties of a Float32. + * @memberof google.bigtable.admin.v2.Type + * @interface IFloat32 + */ + + /** + * Constructs a new Float32. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Float32. + * @implements IFloat32 + * @constructor + * @param {google.bigtable.admin.v2.Type.IFloat32=} [properties] Properties to set + */ + function Float32(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Float32 instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Float32 + * @static + * @param {google.bigtable.admin.v2.Type.IFloat32=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Float32} Float32 instance + */ + Float32.create = function create(properties) { + return new Float32(properties); + }; + + /** + * Encodes the specified Float32 message. Does not implicitly {@link google.bigtable.admin.v2.Type.Float32.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Float32 + * @static + * @param {google.bigtable.admin.v2.Type.IFloat32} message Float32 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Float32.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Float32 message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Float32.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Float32 + * @static + * @param {google.bigtable.admin.v2.Type.IFloat32} message Float32 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Float32.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Float32 message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Float32 + * @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.Type.Float32} Float32 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Float32.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Float32(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Float32 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Float32 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Float32} Float32 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Float32.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Float32 message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Float32 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Float32.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Float32 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Float32 + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Float32} Float32 + */ + Float32.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Float32) + return object; + return new $root.google.bigtable.admin.v2.Type.Float32(); + }; + + /** + * Creates a plain object from a Float32 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Float32 + * @static + * @param {google.bigtable.admin.v2.Type.Float32} message Float32 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Float32.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Float32 to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Float32 + * @instance + * @returns {Object.} JSON object + */ + Float32.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Float32 + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Float32 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Float32.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Float32"; + }; + + return Float32; + })(); + + Type.Float64 = (function() { + + /** + * Properties of a Float64. + * @memberof google.bigtable.admin.v2.Type + * @interface IFloat64 + */ + + /** + * Constructs a new Float64. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Float64. + * @implements IFloat64 + * @constructor + * @param {google.bigtable.admin.v2.Type.IFloat64=} [properties] Properties to set + */ + function Float64(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Float64 instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Float64 + * @static + * @param {google.bigtable.admin.v2.Type.IFloat64=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Float64} Float64 instance + */ + Float64.create = function create(properties) { + return new Float64(properties); + }; + + /** + * Encodes the specified Float64 message. Does not implicitly {@link google.bigtable.admin.v2.Type.Float64.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Float64 + * @static + * @param {google.bigtable.admin.v2.Type.IFloat64} message Float64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Float64.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Float64 message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Float64.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Float64 + * @static + * @param {google.bigtable.admin.v2.Type.IFloat64} message Float64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Float64.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Float64 message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Float64 + * @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.Type.Float64} Float64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Float64.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Float64(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Float64 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Float64 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Float64} Float64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Float64.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Float64 message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Float64 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Float64.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Float64 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Float64 + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Float64} Float64 + */ + Float64.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Float64) + return object; + return new $root.google.bigtable.admin.v2.Type.Float64(); + }; + + /** + * Creates a plain object from a Float64 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Float64 + * @static + * @param {google.bigtable.admin.v2.Type.Float64} message Float64 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Float64.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Float64 to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Float64 + * @instance + * @returns {Object.} JSON object + */ + Float64.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Float64 + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Float64 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Float64.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Float64"; + }; + + return Float64; + })(); + + Type.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.bigtable.admin.v2.Type + * @interface ITimestamp + * @property {google.bigtable.admin.v2.Type.Timestamp.IEncoding|null} [encoding] Timestamp encoding + */ + + /** + * Constructs a new Timestamp. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.bigtable.admin.v2.Type.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp encoding. + * @member {google.bigtable.admin.v2.Type.Timestamp.IEncoding|null|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @instance + */ + Timestamp.prototype.encoding = null; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @static + * @param {google.bigtable.admin.v2.Type.ITimestamp=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.bigtable.admin.v2.Type.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @static + * @param {google.bigtable.admin.v2.Type.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @static + * @param {google.bigtable.admin.v2.Type.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @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.Type.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Timestamp) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Timestamp: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Timestamp(); + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.admin.v2.Type.Timestamp.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @static + * @param {google.bigtable.admin.v2.Type.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Timestamp"; + }; + + Timestamp.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @interface IEncoding + * @property {google.bigtable.admin.v2.Type.Int64.IEncoding|null} [unixMicrosInt64] Encoding unixMicrosInt64 + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.admin.v2.Type.Timestamp + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.admin.v2.Type.Timestamp.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding unixMicrosInt64. + * @member {google.bigtable.admin.v2.Type.Int64.IEncoding|null|undefined} unixMicrosInt64 + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @instance + */ + Encoding.prototype.unixMicrosInt64 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"unixMicrosInt64"|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["unixMicrosInt64"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Timestamp.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Timestamp.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Timestamp.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Timestamp.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) + $root.google.bigtable.admin.v2.Type.Int64.Encoding.encode(message.unixMicrosInt64, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Timestamp.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Timestamp.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @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.Type.Timestamp.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Timestamp.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.unixMicrosInt64 = $root.google.bigtable.admin.v2.Type.Int64.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Timestamp.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.verify(message.unixMicrosInt64, long + 1); + if (error) + return "unixMicrosInt64." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Timestamp.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Timestamp.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Timestamp.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Timestamp.Encoding(); + if (object.unixMicrosInt64 != null) { + if (!$util.isObject(object.unixMicrosInt64)) + throw TypeError(".google.bigtable.admin.v2.Type.Timestamp.Encoding.unixMicrosInt64: object expected"); + message.unixMicrosInt64 = $root.google.bigtable.admin.v2.Type.Int64.Encoding.fromObject(object.unixMicrosInt64, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Timestamp.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) { + object.unixMicrosInt64 = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.unixMicrosInt64, options, q + 1); + if (options.oneofs) + object.encoding = "unixMicrosInt64"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Timestamp.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Timestamp.Encoding"; + }; + + return Encoding; + })(); + + return Timestamp; + })(); + + Type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.bigtable.admin.v2.Type + * @interface IDate + */ + + /** + * Constructs a new Date. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.bigtable.admin.v2.Type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Date + * @static + * @param {google.bigtable.admin.v2.Type.IDate=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.bigtable.admin.v2.Type.Date.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Date + * @static + * @param {google.bigtable.admin.v2.Type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Date + * @static + * @param {google.bigtable.admin.v2.Type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Date + * @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.Type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Date} Date + */ + Date.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Date) + return object; + return new $root.google.bigtable.admin.v2.Type.Date(); + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Date + * @static + * @param {google.bigtable.admin.v2.Type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Date"; + }; + + return Date; + })(); + + Type.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.bigtable.admin.v2.Type + * @interface IStruct + * @property {Array.|null} [fields] Struct fields + * @property {google.bigtable.admin.v2.Type.Struct.IEncoding|null} [encoding] Struct encoding + */ + + /** + * Constructs a new Struct. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.bigtable.admin.v2.Type.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Array.} fields + * @memberof google.bigtable.admin.v2.Type.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyArray; + + /** + * Struct encoding. + * @member {google.bigtable.admin.v2.Type.Struct.IEncoding|null|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Struct + * @instance + */ + Struct.prototype.encoding = null; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Struct + * @static + * @param {google.bigtable.admin.v2.Type.IStruct=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Struct + * @static + * @param {google.bigtable.admin.v2.Type.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.bigtable.admin.v2.Type.Struct.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.admin.v2.Type.Struct.Encoding.encode(message.encoding, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct + * @static + * @param {google.bigtable.admin.v2.Type.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Struct + * @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.Type.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Struct(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.bigtable.admin.v2.Type.Struct.Field.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.encoding = $root.google.bigtable.admin.v2.Type.Struct.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.bigtable.admin.v2.Type.Struct.Field.verify(message.fields[i], long + 1); + if (error) + return "fields." + error; + } + } + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.admin.v2.Type.Struct.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Struct} Struct + */ + Struct.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Struct(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (!$util.isObject(object.fields[i])) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.fields: object expected"); + message.fields[i] = $root.google.bigtable.admin.v2.Type.Struct.Field.fromObject(object.fields[i], long + 1); + } + } + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.Struct.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Struct + * @static + * @param {google.bigtable.admin.v2.Type.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) + object.encoding = null; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.bigtable.admin.v2.Type.Struct.Field.toObject(message.fields[j], options, q + 1); + } + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Struct.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Struct"; + }; + + Struct.Field = (function() { + + /** + * Properties of a Field. + * @memberof google.bigtable.admin.v2.Type.Struct + * @interface IField + * @property {string|null} [fieldName] Field fieldName + * @property {google.bigtable.admin.v2.IType|null} [type] Field type + */ + + /** + * Constructs a new Field. + * @memberof google.bigtable.admin.v2.Type.Struct + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.bigtable.admin.v2.Type.Struct.IField=} [properties] Properties to set + */ + function Field(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Field fieldName. + * @member {string} fieldName + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @instance + */ + Field.prototype.fieldName = ""; + + /** + * Field type. + * @member {google.bigtable.admin.v2.IType|null|undefined} type + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @instance + */ + Field.prototype.type = null; + + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @static + * @param {google.bigtable.admin.v2.Type.Struct.IField=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Struct.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Field.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @static + * @param {google.bigtable.admin.v2.Type.Struct.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.admin.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @static + * @param {google.bigtable.admin.v2.Type.Struct.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @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.Type.Struct.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Struct.Field(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Struct.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Field message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.type, long + 1); + if (error) + return "type." + error; + } + return null; + }; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Struct.Field} Field + */ + Field.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Field) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Field: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Struct.Field(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.type != null) { + if (!$util.isObject(object.type)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Field.type: object expected"); + message.type = $root.google.bigtable.admin.v2.Type.fromObject(object.type, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.type = null; + } + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + object.fieldName = message.fieldName; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = $root.google.bigtable.admin.v2.Type.toObject(message.type, options, q + 1); + return object; + }; + + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Struct.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Struct.Field"; + }; + + return Field; + })(); + + Struct.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.admin.v2.Type.Struct + * @interface IEncoding + * @property {google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton|null} [singleton] Encoding singleton + * @property {google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes|null} [delimitedBytes] Encoding delimitedBytes + * @property {google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes|null} [orderedCodeBytes] Encoding orderedCodeBytes + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.admin.v2.Type.Struct + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.admin.v2.Type.Struct.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding singleton. + * @member {google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton|null|undefined} singleton + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @instance + */ + Encoding.prototype.singleton = null; + + /** + * Encoding delimitedBytes. + * @member {google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes|null|undefined} delimitedBytes + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @instance + */ + Encoding.prototype.delimitedBytes = null; + + /** + * Encoding orderedCodeBytes. + * @member {google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes|null|undefined} orderedCodeBytes + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @instance + */ + Encoding.prototype.orderedCodeBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"singleton"|"delimitedBytes"|"orderedCodeBytes"|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["singleton", "delimitedBytes", "orderedCodeBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Struct.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Struct.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) + $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.encode(message.singleton, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) + $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.encode(message.delimitedBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) + $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Struct.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @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.Type.Struct.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Struct.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.singleton = $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.delimitedBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.verify(message.singleton, long + 1); + if (error) + return "singleton." + error; + } + } + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) { + if (properties.encoding === 1) + return "encoding: multiple values"; + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.verify(message.delimitedBytes, long + 1); + if (error) + return "delimitedBytes." + error; + } + } + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + if (properties.encoding === 1) + return "encoding: multiple values"; + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.verify(message.orderedCodeBytes, long + 1); + if (error) + return "orderedCodeBytes." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Struct.Encoding(); + if (object.singleton != null) { + if (!$util.isObject(object.singleton)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding.singleton: object expected"); + message.singleton = $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.fromObject(object.singleton, long + 1); + } + if (object.delimitedBytes != null) { + if (!$util.isObject(object.delimitedBytes)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding.delimitedBytes: object expected"); + message.delimitedBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.fromObject(object.delimitedBytes, long + 1); + } + if (object.orderedCodeBytes != null) { + if (!$util.isObject(object.orderedCodeBytes)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding.orderedCodeBytes: object expected"); + message.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.fromObject(object.orderedCodeBytes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) { + object.singleton = $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.toObject(message.singleton, options, q + 1); + if (options.oneofs) + object.encoding = "singleton"; + } + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) { + object.delimitedBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.toObject(message.delimitedBytes, options, q + 1); + if (options.oneofs) + object.encoding = "delimitedBytes"; + } + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + object.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options, q + 1); + if (options.oneofs) + object.encoding = "orderedCodeBytes"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Struct.Encoding"; + }; + + Encoding.Singleton = (function() { + + /** + * Properties of a Singleton. + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @interface ISingleton + */ + + /** + * Constructs a new Singleton. + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @classdesc Represents a Singleton. + * @implements ISingleton + * @constructor + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton=} [properties] Properties to set + */ + function Singleton(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Singleton instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.Singleton} Singleton instance + */ + Singleton.create = function create(properties) { + return new Singleton(properties); + }; + + /** + * Encodes the specified Singleton message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton} message Singleton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Singleton.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Singleton message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.ISingleton} message Singleton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Singleton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Singleton message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @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.Type.Struct.Encoding.Singleton} Singleton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Singleton.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Singleton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.Singleton} Singleton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Singleton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Singleton message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Singleton.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Singleton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.Singleton} Singleton + */ + Singleton.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) + return object; + return new $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton(); + }; + + /** + * Creates a plain object from a Singleton message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.Singleton} message Singleton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Singleton.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Singleton to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @instance + * @returns {Object.} JSON object + */ + Singleton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Singleton + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Singleton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"; + }; + + return Singleton; + })(); + + Encoding.DelimitedBytes = (function() { + + /** + * Properties of a DelimitedBytes. + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @interface IDelimitedBytes + * @property {Uint8Array|null} [delimiter] DelimitedBytes delimiter + */ + + /** + * Constructs a new DelimitedBytes. + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @classdesc Represents a DelimitedBytes. + * @implements IDelimitedBytes + * @constructor + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes=} [properties] Properties to set + */ + function DelimitedBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelimitedBytes delimiter. + * @member {Uint8Array} delimiter + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @instance + */ + DelimitedBytes.prototype.delimiter = $util.newBuffer([]); + + /** + * Creates a new DelimitedBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes} DelimitedBytes instance + */ + DelimitedBytes.create = function create(properties) { + return new DelimitedBytes(properties); + }; + + /** + * Encodes the specified DelimitedBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes} message DelimitedBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelimitedBytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delimiter); + return writer; + }; + + /** + * Encodes the specified DelimitedBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.IDelimitedBytes} message DelimitedBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelimitedBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DelimitedBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @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.Type.Struct.Encoding.DelimitedBytes} DelimitedBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelimitedBytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.delimiter = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DelimitedBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes} DelimitedBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelimitedBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelimitedBytes message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelimitedBytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + if (!(message.delimiter && typeof message.delimiter.length === "number" || $util.isString(message.delimiter))) + return "delimiter: buffer expected"; + return null; + }; + + /** + * Creates a DelimitedBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes} DelimitedBytes + */ + DelimitedBytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes(); + if (object.delimiter != null) + if (typeof object.delimiter === "string") + $util.base64.decode(object.delimiter, message.delimiter = $util.newBuffer($util.base64.length(object.delimiter)), 0); + else if (object.delimiter.length >= 0) + message.delimiter = object.delimiter; + return message; + }; + + /** + * Creates a plain object from a DelimitedBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes} message DelimitedBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelimitedBytes.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.delimiter = ""; + else { + object.delimiter = []; + if (options.bytes !== Array) + object.delimiter = $util.newBuffer(object.delimiter); + } + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + object.delimiter = options.bytes === String ? $util.base64.encode(message.delimiter, 0, message.delimiter.length) : options.bytes === Array ? Array.prototype.slice.call(message.delimiter) : message.delimiter; + return object; + }; + + /** + * Converts this DelimitedBytes to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @instance + * @returns {Object.} JSON object + */ + DelimitedBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DelimitedBytes + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DelimitedBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"; + }; + + return DelimitedBytes; + })(); + + Encoding.OrderedCodeBytes = (function() { + + /** + * Properties of an OrderedCodeBytes. + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @interface IOrderedCodeBytes + */ + + /** + * Constructs a new OrderedCodeBytes. + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding + * @classdesc Represents an OrderedCodeBytes. + * @implements IOrderedCodeBytes + * @constructor + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes=} [properties] Properties to set + */ + function OrderedCodeBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new OrderedCodeBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes} OrderedCodeBytes instance + */ + OrderedCodeBytes.create = function create(properties) { + return new OrderedCodeBytes(properties); + }; + + /** + * Encodes the specified OrderedCodeBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes} message OrderedCodeBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderedCodeBytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified OrderedCodeBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.IOrderedCodeBytes} message OrderedCodeBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderedCodeBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @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.Type.Struct.Encoding.OrderedCodeBytes} OrderedCodeBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderedCodeBytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes} OrderedCodeBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderedCodeBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderedCodeBytes message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderedCodeBytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an OrderedCodeBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes} OrderedCodeBytes + */ + OrderedCodeBytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) + return object; + return new $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes(); + }; + + /** + * Creates a plain object from an OrderedCodeBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes} message OrderedCodeBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderedCodeBytes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OrderedCodeBytes to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @instance + * @returns {Object.} JSON object + */ + OrderedCodeBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderedCodeBytes + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderedCodeBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"; + }; + + return OrderedCodeBytes; + })(); + + return Encoding; + })(); + + return Struct; + })(); + + Type.Proto = (function() { + + /** + * Properties of a Proto. + * @memberof google.bigtable.admin.v2.Type + * @interface IProto + * @property {string|null} [schemaBundleId] Proto schemaBundleId + * @property {string|null} [messageName] Proto messageName + */ + + /** + * Constructs a new Proto. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Proto. + * @implements IProto + * @constructor + * @param {google.bigtable.admin.v2.Type.IProto=} [properties] Properties to set + */ + function Proto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proto schemaBundleId. + * @member {string} schemaBundleId + * @memberof google.bigtable.admin.v2.Type.Proto + * @instance + */ + Proto.prototype.schemaBundleId = ""; + + /** + * Proto messageName. + * @member {string} messageName + * @memberof google.bigtable.admin.v2.Type.Proto + * @instance + */ + Proto.prototype.messageName = ""; + + /** + * Creates a new Proto instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Proto + * @static + * @param {google.bigtable.admin.v2.Type.IProto=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Proto} Proto instance + */ + Proto.create = function create(properties) { + return new Proto(properties); + }; + + /** + * Encodes the specified Proto message. Does not implicitly {@link google.bigtable.admin.v2.Type.Proto.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Proto + * @static + * @param {google.bigtable.admin.v2.Type.IProto} message Proto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaBundleId); + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.messageName); + return writer; + }; + + /** + * Encodes the specified Proto message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Proto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Proto + * @static + * @param {google.bigtable.admin.v2.Type.IProto} message Proto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Proto message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Proto + * @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.Type.Proto} Proto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Proto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schemaBundleId = reader.string(); + break; + } + case 2: { + message.messageName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Proto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Proto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Proto} Proto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proto message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Proto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + if (!$util.isString(message.schemaBundleId)) + return "schemaBundleId: string expected"; + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) + if (!$util.isString(message.messageName)) + return "messageName: string expected"; + return null; + }; + + /** + * Creates a Proto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Proto + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Proto} Proto + */ + Proto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Proto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Proto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Proto(); + if (object.schemaBundleId != null) + message.schemaBundleId = String(object.schemaBundleId); + if (object.messageName != null) + message.messageName = String(object.messageName); + return message; + }; + + /** + * Creates a plain object from a Proto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Proto + * @static + * @param {google.bigtable.admin.v2.Type.Proto} message Proto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.schemaBundleId = ""; + object.messageName = ""; + } + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + object.schemaBundleId = message.schemaBundleId; + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) + object.messageName = message.messageName; + return object; + }; + + /** + * Converts this Proto to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Proto + * @instance + * @returns {Object.} JSON object + */ + Proto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Proto + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Proto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Proto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Proto"; + }; + + return Proto; + })(); + + Type.Enum = (function() { + + /** + * Properties of an Enum. + * @memberof google.bigtable.admin.v2.Type + * @interface IEnum + * @property {string|null} [schemaBundleId] Enum schemaBundleId + * @property {string|null} [enumName] Enum enumName + */ + + /** + * Constructs a new Enum. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents an Enum. + * @implements IEnum + * @constructor + * @param {google.bigtable.admin.v2.Type.IEnum=} [properties] Properties to set + */ + function Enum(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Enum schemaBundleId. + * @member {string} schemaBundleId + * @memberof google.bigtable.admin.v2.Type.Enum + * @instance + */ + Enum.prototype.schemaBundleId = ""; + + /** + * Enum enumName. + * @member {string} enumName + * @memberof google.bigtable.admin.v2.Type.Enum + * @instance + */ + Enum.prototype.enumName = ""; + + /** + * Creates a new Enum instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Enum + * @static + * @param {google.bigtable.admin.v2.Type.IEnum=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Enum} Enum instance + */ + Enum.create = function create(properties) { + return new Enum(properties); + }; + + /** + * Encodes the specified Enum message. Does not implicitly {@link google.bigtable.admin.v2.Type.Enum.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Enum + * @static + * @param {google.bigtable.admin.v2.Type.IEnum} message Enum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Enum.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaBundleId); + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.enumName); + return writer; + }; + + /** + * Encodes the specified Enum message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Enum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Enum + * @static + * @param {google.bigtable.admin.v2.Type.IEnum} message Enum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Enum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Enum message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Enum + * @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.Type.Enum} Enum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Enum.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Enum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schemaBundleId = reader.string(); + break; + } + case 2: { + message.enumName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Enum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Enum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Enum} Enum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Enum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Enum message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Enum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Enum.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + if (!$util.isString(message.schemaBundleId)) + return "schemaBundleId: string expected"; + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) + if (!$util.isString(message.enumName)) + return "enumName: string expected"; + return null; + }; + + /** + * Creates an Enum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Enum + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Enum} Enum + */ + Enum.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Enum) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Enum: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Enum(); + if (object.schemaBundleId != null) + message.schemaBundleId = String(object.schemaBundleId); + if (object.enumName != null) + message.enumName = String(object.enumName); + return message; + }; + + /** + * Creates a plain object from an Enum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Enum + * @static + * @param {google.bigtable.admin.v2.Type.Enum} message Enum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Enum.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.schemaBundleId = ""; + object.enumName = ""; + } + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + object.schemaBundleId = message.schemaBundleId; + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) + object.enumName = message.enumName; + return object; + }; + + /** + * Converts this Enum to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Enum + * @instance + * @returns {Object.} JSON object + */ + Enum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Enum + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Enum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Enum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Enum"; + }; + + return Enum; + })(); + + Type.Array = (function() { + + /** + * Properties of an Array. + * @memberof google.bigtable.admin.v2.Type + * @interface IArray + * @property {google.bigtable.admin.v2.IType|null} [elementType] Array elementType + */ + + /** + * Constructs a new Array. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents an Array. + * @implements IArray + * @constructor + * @param {google.bigtable.admin.v2.Type.IArray=} [properties] Properties to set + */ + function Array(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Array elementType. + * @member {google.bigtable.admin.v2.IType|null|undefined} elementType + * @memberof google.bigtable.admin.v2.Type.Array + * @instance + */ + Array.prototype.elementType = null; + + /** + * Creates a new Array instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Array + * @static + * @param {google.bigtable.admin.v2.Type.IArray=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Array} Array instance + */ + Array.create = function create(properties) { + return new Array(properties); + }; + + /** + * Encodes the specified Array message. Does not implicitly {@link google.bigtable.admin.v2.Type.Array.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Array + * @static + * @param {google.bigtable.admin.v2.Type.IArray} message Array message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Array.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) + $root.google.bigtable.admin.v2.Type.encode(message.elementType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Array message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Array.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Array + * @static + * @param {google.bigtable.admin.v2.Type.IArray} message Array message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Array.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Array message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Array + * @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.Type.Array} Array + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Array.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Array(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.elementType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Array message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Array + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Array} Array + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Array.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Array message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Array + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Array.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.elementType, long + 1); + if (error) + return "elementType." + error; + } + return null; + }; + + /** + * Creates an Array message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Array + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Array} Array + */ + Array.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Array) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Array: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Array(); + if (object.elementType != null) { + if (!$util.isObject(object.elementType)) + throw TypeError(".google.bigtable.admin.v2.Type.Array.elementType: object expected"); + message.elementType = $root.google.bigtable.admin.v2.Type.fromObject(object.elementType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Array message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Array + * @static + * @param {google.bigtable.admin.v2.Type.Array} message Array + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Array.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.elementType = null; + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) + object.elementType = $root.google.bigtable.admin.v2.Type.toObject(message.elementType, options, q + 1); + return object; + }; + + /** + * Converts this Array to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Array + * @instance + * @returns {Object.} JSON object + */ + Array.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Array + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Array + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Array.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Array"; + }; + + return Array; + })(); + + Type.Map = (function() { + + /** + * Properties of a Map. + * @memberof google.bigtable.admin.v2.Type + * @interface IMap + * @property {google.bigtable.admin.v2.IType|null} [keyType] Map keyType + * @property {google.bigtable.admin.v2.IType|null} [valueType] Map valueType + */ + + /** + * Constructs a new Map. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Map. + * @implements IMap + * @constructor + * @param {google.bigtable.admin.v2.Type.IMap=} [properties] Properties to set + */ + function Map(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Map keyType. + * @member {google.bigtable.admin.v2.IType|null|undefined} keyType + * @memberof google.bigtable.admin.v2.Type.Map + * @instance + */ + Map.prototype.keyType = null; + + /** + * Map valueType. + * @member {google.bigtable.admin.v2.IType|null|undefined} valueType + * @memberof google.bigtable.admin.v2.Type.Map + * @instance + */ + Map.prototype.valueType = null; + + /** + * Creates a new Map instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Map + * @static + * @param {google.bigtable.admin.v2.Type.IMap=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Map} Map instance + */ + Map.create = function create(properties) { + return new Map(properties); + }; + + /** + * Encodes the specified Map message. Does not implicitly {@link google.bigtable.admin.v2.Type.Map.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Map + * @static + * @param {google.bigtable.admin.v2.Type.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) + $root.google.bigtable.admin.v2.Type.encode(message.keyType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + $root.google.bigtable.admin.v2.Type.encode(message.valueType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Map.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Map + * @static + * @param {google.bigtable.admin.v2.Type.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Map message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Map + * @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.Type.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Map(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.keyType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.valueType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Map message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Map + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Map.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.keyType, long + 1); + if (error) + return "keyType." + error; + } + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType, long + 1); + if (error) + return "valueType." + error; + } + return null; + }; + + /** + * Creates a Map message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Map + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Map} Map + */ + Map.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Map) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Map: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Map(); + if (object.keyType != null) { + if (!$util.isObject(object.keyType)) + throw TypeError(".google.bigtable.admin.v2.Type.Map.keyType: object expected"); + message.keyType = $root.google.bigtable.admin.v2.Type.fromObject(object.keyType, long + 1); + } + if (object.valueType != null) { + if (!$util.isObject(object.valueType)) + throw TypeError(".google.bigtable.admin.v2.Type.Map.valueType: object expected"); + message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Map + * @static + * @param {google.bigtable.admin.v2.Type.Map} message Map + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Map.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.keyType = null; + object.valueType = null; + } + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) + object.keyType = $root.google.bigtable.admin.v2.Type.toObject(message.keyType, options, q + 1); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options, q + 1); + return object; + }; + + /** + * Converts this Map to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Map + * @instance + * @returns {Object.} JSON object + */ + Map.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Map + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Map + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Map"; + }; + + return Map; + })(); + + Type.Aggregate = (function() { + + /** + * Properties of an Aggregate. + * @memberof google.bigtable.admin.v2.Type + * @interface IAggregate + * @property {google.bigtable.admin.v2.IType|null} [inputType] Aggregate inputType + * @property {google.bigtable.admin.v2.IType|null} [stateType] Aggregate stateType + * @property {google.bigtable.admin.v2.Type.Aggregate.ISum|null} [sum] Aggregate sum + * @property {google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null} [hllppUniqueCount] Aggregate hllppUniqueCount + * @property {google.bigtable.admin.v2.Type.Aggregate.IMax|null} [max] Aggregate max + * @property {google.bigtable.admin.v2.Type.Aggregate.IMin|null} [min] Aggregate min + */ + + /** + * Constructs a new Aggregate. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents an Aggregate. + * @implements IAggregate + * @constructor + * @param {google.bigtable.admin.v2.Type.IAggregate=} [properties] Properties to set + */ + function Aggregate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Aggregate inputType. + * @member {google.bigtable.admin.v2.IType|null|undefined} inputType + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.inputType = null; + + /** + * Aggregate stateType. + * @member {google.bigtable.admin.v2.IType|null|undefined} stateType + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.stateType = null; + + /** + * Aggregate sum. + * @member {google.bigtable.admin.v2.Type.Aggregate.ISum|null|undefined} sum + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.sum = null; + + /** + * Aggregate hllppUniqueCount. + * @member {google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null|undefined} hllppUniqueCount + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.hllppUniqueCount = null; + + /** + * Aggregate max. + * @member {google.bigtable.admin.v2.Type.Aggregate.IMax|null|undefined} max + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.max = null; + + /** + * Aggregate min. + * @member {google.bigtable.admin.v2.Type.Aggregate.IMin|null|undefined} min + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.min = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Aggregate aggregator. + * @member {"sum"|"hllppUniqueCount"|"max"|"min"|undefined} aggregator + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Object.defineProperty(Aggregate.prototype, "aggregator", { + get: $util.oneOfGetter($oneOfFields = ["sum", "hllppUniqueCount", "max", "min"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Aggregate instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {google.bigtable.admin.v2.Type.IAggregate=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate instance + */ + Aggregate.create = function create(properties) { + return new Aggregate(properties); + }; + + /** + * Encodes the specified Aggregate message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {google.bigtable.admin.v2.Type.IAggregate} message Aggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregate.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + $root.google.bigtable.admin.v2.Type.encode(message.inputType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) + $root.google.bigtable.admin.v2.Type.encode(message.stateType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + $root.google.bigtable.admin.v2.Type.Aggregate.Sum.encode(message.sum, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) + $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.encode(message.hllppUniqueCount, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + $root.google.bigtable.admin.v2.Type.Aggregate.Max.encode(message.max, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + $root.google.bigtable.admin.v2.Type.Aggregate.Min.encode(message.min, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Aggregate message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {google.bigtable.admin.v2.Type.IAggregate} message Aggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Aggregate message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @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.Type.Aggregate} Aggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregate.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Aggregate(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inputType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.stateType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Aggregate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aggregate message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregate.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.inputType, long + 1); + if (error) + return "inputType." + error; + } + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.stateType, long + 1); + if (error) + return "stateType." + error; + } + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) { + properties.aggregator = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.verify(message.sum, long + 1); + if (error) + return "sum." + error; + } + } + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify(message.hllppUniqueCount, long + 1); + if (error) + return "hllppUniqueCount." + error; + } + } + if (message.max != null && Object.hasOwnProperty.call(message, "max")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.Max.verify(message.max, long + 1); + if (error) + return "max." + error; + } + } + if (message.min != null && Object.hasOwnProperty.call(message, "min")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.Min.verify(message.min, long + 1); + if (error) + return "min." + error; + } + } + return null; + }; + + /** + * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate + */ + Aggregate.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.admin.v2.Type.Aggregate(); + if (object.inputType != null) { + if (!$util.isObject(object.inputType)) + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.inputType: object expected"); + message.inputType = $root.google.bigtable.admin.v2.Type.fromObject(object.inputType, long + 1); + } + if (object.stateType != null) { + if (!$util.isObject(object.stateType)) + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.stateType: object expected"); + message.stateType = $root.google.bigtable.admin.v2.Type.fromObject(object.stateType, long + 1); + } + if (object.sum != null) { + if (!$util.isObject(object.sum)) + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.sum: object expected"); + message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.fromObject(object.sum, long + 1); + } + if (object.hllppUniqueCount != null) { + if (!$util.isObject(object.hllppUniqueCount)) + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.hllppUniqueCount: object expected"); + message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount, long + 1); + } + if (object.max != null) { + if (!$util.isObject(object.max)) + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.max: object expected"); + message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.fromObject(object.max, long + 1); + } + if (object.min != null) { + if (!$util.isObject(object.min)) + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.min: object expected"); + message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.fromObject(object.min, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Aggregate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate} message Aggregate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregate.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.inputType = null; + object.stateType = null; + } + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + object.inputType = $root.google.bigtable.admin.v2.Type.toObject(message.inputType, options, q + 1); + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) + object.stateType = $root.google.bigtable.admin.v2.Type.toObject(message.stateType, options, q + 1); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) { + object.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.toObject(message.sum, options, q + 1); + if (options.oneofs) + object.aggregator = "sum"; + } + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) { + object.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options, q + 1); + if (options.oneofs) + object.aggregator = "hllppUniqueCount"; + } + if (message.max != null && Object.hasOwnProperty.call(message, "max")) { + object.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.toObject(message.max, options, q + 1); + if (options.oneofs) + object.aggregator = "max"; + } + if (message.min != null && Object.hasOwnProperty.call(message, "min")) { + object.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.toObject(message.min, options, q + 1); + if (options.oneofs) + object.aggregator = "min"; + } + return object; + }; + + /** + * Converts this Aggregate to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + * @returns {Object.} JSON object + */ + Aggregate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Aggregate + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aggregate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Aggregate"; + }; + + Aggregate.Sum = (function() { + + /** + * Properties of a Sum. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @interface ISum + */ + + /** + * Constructs a new Sum. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @classdesc Represents a Sum. + * @implements ISum + * @constructor + * @param {google.bigtable.admin.v2.Type.Aggregate.ISum=} [properties] Properties to set + */ + function Sum(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Sum instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.ISum=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Aggregate.Sum} Sum instance + */ + Sum.create = function create(properties) { + return new Sum(properties); + }; + + /** + * Encodes the specified Sum message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Sum.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Sum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Sum message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @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.Type.Aggregate.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Aggregate.Sum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Aggregate.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sum message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sum.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Aggregate.Sum} Sum + */ + Sum.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Sum) + return object; + return new $root.google.bigtable.admin.v2.Type.Aggregate.Sum(); + }; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.Sum} message Sum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Sum to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @instance + * @returns {Object.} JSON object + */ + Sum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Sum + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Aggregate.Sum"; + }; + + return Sum; + })(); + + Aggregate.Max = (function() { + + /** + * Properties of a Max. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @interface IMax + */ + + /** + * Constructs a new Max. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @classdesc Represents a Max. + * @implements IMax + * @constructor + * @param {google.bigtable.admin.v2.Type.Aggregate.IMax=} [properties] Properties to set + */ + function Max(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Max instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IMax=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Aggregate.Max} Max instance + */ + Max.create = function create(properties) { + return new Max(properties); + }; + + /** + * Encodes the specified Max message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Max.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IMax} message Max message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Max.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Max message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Max.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IMax} message Max message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Max.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Max message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @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.Type.Aggregate.Max} Max + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Max.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Aggregate.Max(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Max message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Aggregate.Max} Max + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Max.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Max message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Max.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Max message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Aggregate.Max} Max + */ + Max.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Max) + return object; + return new $root.google.bigtable.admin.v2.Type.Aggregate.Max(); + }; + + /** + * Creates a plain object from a Max message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.Max} message Max + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Max.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Max to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @instance + * @returns {Object.} JSON object + */ + Max.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Max + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Aggregate.Max + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Max.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Aggregate.Max"; + }; + + return Max; + })(); + + Aggregate.Min = (function() { + + /** + * Properties of a Min. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @interface IMin + */ + + /** + * Constructs a new Min. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @classdesc Represents a Min. + * @implements IMin + * @constructor + * @param {google.bigtable.admin.v2.Type.Aggregate.IMin=} [properties] Properties to set + */ + function Min(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Min instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IMin=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Aggregate.Min} Min instance + */ + Min.create = function create(properties) { + return new Min(properties); + }; + + /** + * Encodes the specified Min message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Min.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IMin} message Min message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Min.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Min message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Min.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IMin} message Min message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Min.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Min message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @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.Type.Aggregate.Min} Min + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Min.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Aggregate.Min(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Min message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Aggregate.Min} Min + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Min.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Min message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Min.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Min message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Aggregate.Min} Min + */ + Min.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Min) + return object; + return new $root.google.bigtable.admin.v2.Type.Aggregate.Min(); + }; + + /** + * Creates a plain object from a Min message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.Min} message Min + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Min.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Min to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @instance + * @returns {Object.} JSON object + */ + Min.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Min + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Aggregate.Min + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Min.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Aggregate.Min"; + }; + + return Min; + })(); + + Aggregate.HyperLogLogPlusPlusUniqueCount = (function() { + + /** + * Properties of a HyperLogLogPlusPlusUniqueCount. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @interface IHyperLogLogPlusPlusUniqueCount + */ + + /** + * Constructs a new HyperLogLogPlusPlusUniqueCount. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @classdesc Represents a HyperLogLogPlusPlusUniqueCount. + * @implements IHyperLogLogPlusPlusUniqueCount + * @constructor + * @param {google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount=} [properties] Properties to set + */ + function HyperLogLogPlusPlusUniqueCount(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new HyperLogLogPlusPlusUniqueCount instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} HyperLogLogPlusPlusUniqueCount instance + */ + HyperLogLogPlusPlusUniqueCount.create = function create(properties) { + return new HyperLogLogPlusPlusUniqueCount(properties); + }; + + /** + * Encodes the specified HyperLogLogPlusPlusUniqueCount message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount} message HyperLogLogPlusPlusUniqueCount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HyperLogLogPlusPlusUniqueCount.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified HyperLogLogPlusPlusUniqueCount message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount} message HyperLogLogPlusPlusUniqueCount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HyperLogLogPlusPlusUniqueCount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a HyperLogLogPlusPlusUniqueCount message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @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.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} HyperLogLogPlusPlusUniqueCount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HyperLogLogPlusPlusUniqueCount.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HyperLogLogPlusPlusUniqueCount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} HyperLogLogPlusPlusUniqueCount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HyperLogLogPlusPlusUniqueCount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HyperLogLogPlusPlusUniqueCount message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HyperLogLogPlusPlusUniqueCount.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a HyperLogLogPlusPlusUniqueCount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} HyperLogLogPlusPlusUniqueCount + */ + HyperLogLogPlusPlusUniqueCount.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + return object; + return new $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(); + }; + + /** + * Creates a plain object from a HyperLogLogPlusPlusUniqueCount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} message HyperLogLogPlusPlusUniqueCount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HyperLogLogPlusPlusUniqueCount.toObject = function toObject() { + return {}; + }; + + /** + * Converts this HyperLogLogPlusPlusUniqueCount to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @instance + * @returns {Object.} JSON object + */ + HyperLogLogPlusPlusUniqueCount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HyperLogLogPlusPlusUniqueCount + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HyperLogLogPlusPlusUniqueCount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"; + }; + + return HyperLogLogPlusPlusUniqueCount; + })(); + + return Aggregate; + })(); + + return Type; + })(); + + return v2; + })(); + + return admin; + })(); + + bigtable.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.bigtable + * @namespace + */ + var v2 = {}; + + v2.Bigtable = (function() { + + /** + * Constructs a new Bigtable service. + * @memberof google.bigtable.v2 + * @classdesc Represents a Bigtable + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Bigtable(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Bigtable.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Bigtable; + + /** + * Creates new Bigtable service using the specified rpc implementation. + * @function create + * @memberof google.bigtable.v2.Bigtable + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Bigtable} RPC service. Useful where requests and/or responses are streamed. + */ + Bigtable.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|readRows}. + * @memberof google.bigtable.v2.Bigtable + * @typedef ReadRowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.ReadRowsResponse} [response] ReadRowsResponse + */ + + /** + * Calls ReadRows. + * @function readRows + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IReadRowsRequest} request ReadRowsRequest message or plain object + * @param {google.bigtable.v2.Bigtable.ReadRowsCallback} callback Node-style callback called with the error, if any, and ReadRowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.readRows = function readRows(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, readRows, $root.google.bigtable.v2.ReadRowsRequest, $root.google.bigtable.v2.ReadRowsResponse, request, callback); + }, "name", { value: "ReadRows" }); + + /** + * Calls ReadRows. + * @function readRows + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IReadRowsRequest} request ReadRowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|sampleRowKeys}. + * @memberof google.bigtable.v2.Bigtable + * @typedef SampleRowKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.SampleRowKeysResponse} [response] SampleRowKeysResponse + */ + + /** + * Calls SampleRowKeys. + * @function sampleRowKeys + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ISampleRowKeysRequest} request SampleRowKeysRequest message or plain object + * @param {google.bigtable.v2.Bigtable.SampleRowKeysCallback} callback Node-style callback called with the error, if any, and SampleRowKeysResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.sampleRowKeys = function sampleRowKeys(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, sampleRowKeys, $root.google.bigtable.v2.SampleRowKeysRequest, $root.google.bigtable.v2.SampleRowKeysResponse, request, callback); + }, "name", { value: "SampleRowKeys" }); + + /** + * Calls SampleRowKeys. + * @function sampleRowKeys + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ISampleRowKeysRequest} request SampleRowKeysRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|mutateRow}. + * @memberof google.bigtable.v2.Bigtable + * @typedef MutateRowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.MutateRowResponse} [response] MutateRowResponse + */ + + /** + * Calls MutateRow. + * @function mutateRow + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IMutateRowRequest} request MutateRowRequest message or plain object + * @param {google.bigtable.v2.Bigtable.MutateRowCallback} callback Node-style callback called with the error, if any, and MutateRowResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.mutateRow = function mutateRow(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, mutateRow, $root.google.bigtable.v2.MutateRowRequest, $root.google.bigtable.v2.MutateRowResponse, request, callback); + }, "name", { value: "MutateRow" }); + + /** + * Calls MutateRow. + * @function mutateRow + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IMutateRowRequest} request MutateRowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|mutateRows}. + * @memberof google.bigtable.v2.Bigtable + * @typedef MutateRowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.MutateRowsResponse} [response] MutateRowsResponse + */ + + /** + * Calls MutateRows. + * @function mutateRows + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IMutateRowsRequest} request MutateRowsRequest message or plain object + * @param {google.bigtable.v2.Bigtable.MutateRowsCallback} callback Node-style callback called with the error, if any, and MutateRowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.mutateRows = function mutateRows(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, mutateRows, $root.google.bigtable.v2.MutateRowsRequest, $root.google.bigtable.v2.MutateRowsResponse, request, callback); + }, "name", { value: "MutateRows" }); + + /** + * Calls MutateRows. + * @function mutateRows + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IMutateRowsRequest} request MutateRowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|checkAndMutateRow}. + * @memberof google.bigtable.v2.Bigtable + * @typedef CheckAndMutateRowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.CheckAndMutateRowResponse} [response] CheckAndMutateRowResponse + */ + + /** + * Calls CheckAndMutateRow. + * @function checkAndMutateRow + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ICheckAndMutateRowRequest} request CheckAndMutateRowRequest message or plain object + * @param {google.bigtable.v2.Bigtable.CheckAndMutateRowCallback} callback Node-style callback called with the error, if any, and CheckAndMutateRowResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.checkAndMutateRow = function checkAndMutateRow(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, checkAndMutateRow, $root.google.bigtable.v2.CheckAndMutateRowRequest, $root.google.bigtable.v2.CheckAndMutateRowResponse, request, callback); + }, "name", { value: "CheckAndMutateRow" }); + + /** + * Calls CheckAndMutateRow. + * @function checkAndMutateRow + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ICheckAndMutateRowRequest} request CheckAndMutateRowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|pingAndWarm}. + * @memberof google.bigtable.v2.Bigtable + * @typedef PingAndWarmCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.PingAndWarmResponse} [response] PingAndWarmResponse + */ + + /** + * Calls PingAndWarm. + * @function pingAndWarm + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IPingAndWarmRequest} request PingAndWarmRequest message or plain object + * @param {google.bigtable.v2.Bigtable.PingAndWarmCallback} callback Node-style callback called with the error, if any, and PingAndWarmResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.pingAndWarm = function pingAndWarm(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, pingAndWarm, $root.google.bigtable.v2.PingAndWarmRequest, $root.google.bigtable.v2.PingAndWarmResponse, request, callback); + }, "name", { value: "PingAndWarm" }); + + /** + * Calls PingAndWarm. + * @function pingAndWarm + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IPingAndWarmRequest} request PingAndWarmRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|readModifyWriteRow}. + * @memberof google.bigtable.v2.Bigtable + * @typedef ReadModifyWriteRowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.ReadModifyWriteRowResponse} [response] ReadModifyWriteRowResponse + */ + + /** + * Calls ReadModifyWriteRow. + * @function readModifyWriteRow + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IReadModifyWriteRowRequest} request ReadModifyWriteRowRequest message or plain object + * @param {google.bigtable.v2.Bigtable.ReadModifyWriteRowCallback} callback Node-style callback called with the error, if any, and ReadModifyWriteRowResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.readModifyWriteRow = function readModifyWriteRow(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, readModifyWriteRow, $root.google.bigtable.v2.ReadModifyWriteRowRequest, $root.google.bigtable.v2.ReadModifyWriteRowResponse, request, callback); + }, "name", { value: "ReadModifyWriteRow" }); + + /** + * Calls ReadModifyWriteRow. + * @function readModifyWriteRow + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IReadModifyWriteRowRequest} request ReadModifyWriteRowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|generateInitialChangeStreamPartitions}. + * @memberof google.bigtable.v2.Bigtable + * @typedef GenerateInitialChangeStreamPartitionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} [response] GenerateInitialChangeStreamPartitionsResponse + */ + + /** + * Calls GenerateInitialChangeStreamPartitions. + * @function generateInitialChangeStreamPartitions + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest} request GenerateInitialChangeStreamPartitionsRequest message or plain object + * @param {google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitionsCallback} callback Node-style callback called with the error, if any, and GenerateInitialChangeStreamPartitionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.generateInitialChangeStreamPartitions = function generateInitialChangeStreamPartitions(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, generateInitialChangeStreamPartitions, $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, request, callback); + }, "name", { value: "GenerateInitialChangeStreamPartitions" }); + + /** + * Calls GenerateInitialChangeStreamPartitions. + * @function generateInitialChangeStreamPartitions + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest} request GenerateInitialChangeStreamPartitionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|readChangeStream}. + * @memberof google.bigtable.v2.Bigtable + * @typedef ReadChangeStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.ReadChangeStreamResponse} [response] ReadChangeStreamResponse + */ + + /** + * Calls ReadChangeStream. + * @function readChangeStream + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IReadChangeStreamRequest} request ReadChangeStreamRequest message or plain object + * @param {google.bigtable.v2.Bigtable.ReadChangeStreamCallback} callback Node-style callback called with the error, if any, and ReadChangeStreamResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.readChangeStream = function readChangeStream(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, readChangeStream, $root.google.bigtable.v2.ReadChangeStreamRequest, $root.google.bigtable.v2.ReadChangeStreamResponse, request, callback); + }, "name", { value: "ReadChangeStream" }); + + /** + * Calls ReadChangeStream. + * @function readChangeStream + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IReadChangeStreamRequest} request ReadChangeStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|prepareQuery}. + * @memberof google.bigtable.v2.Bigtable + * @typedef PrepareQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.PrepareQueryResponse} [response] PrepareQueryResponse + */ + + /** + * Calls PrepareQuery. + * @function prepareQuery + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IPrepareQueryRequest} request PrepareQueryRequest message or plain object + * @param {google.bigtable.v2.Bigtable.PrepareQueryCallback} callback Node-style callback called with the error, if any, and PrepareQueryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.prepareQuery = function prepareQuery(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, prepareQuery, $root.google.bigtable.v2.PrepareQueryRequest, $root.google.bigtable.v2.PrepareQueryResponse, request, callback); + }, "name", { value: "PrepareQuery" }); + + /** + * Calls PrepareQuery. + * @function prepareQuery + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IPrepareQueryRequest} request PrepareQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|executeQuery}. + * @memberof google.bigtable.v2.Bigtable + * @typedef ExecuteQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.ExecuteQueryResponse} [response] ExecuteQueryResponse + */ + + /** + * Calls ExecuteQuery. + * @function executeQuery + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IExecuteQueryRequest} request ExecuteQueryRequest message or plain object + * @param {google.bigtable.v2.Bigtable.ExecuteQueryCallback} callback Node-style callback called with the error, if any, and ExecuteQueryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.executeQuery = function executeQuery(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, executeQuery, $root.google.bigtable.v2.ExecuteQueryRequest, $root.google.bigtable.v2.ExecuteQueryResponse, request, callback); + }, "name", { value: "ExecuteQuery" }); + + /** + * Calls ExecuteQuery. + * @function executeQuery + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IExecuteQueryRequest} request ExecuteQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|getClientConfiguration}. + * @memberof google.bigtable.v2.Bigtable + * @typedef GetClientConfigurationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.ClientConfiguration} [response] ClientConfiguration + */ + + /** + * Calls GetClientConfiguration. + * @function getClientConfiguration + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IGetClientConfigurationRequest} request GetClientConfigurationRequest message or plain object + * @param {google.bigtable.v2.Bigtable.GetClientConfigurationCallback} callback Node-style callback called with the error, if any, and ClientConfiguration + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.getClientConfiguration = function getClientConfiguration(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getClientConfiguration, $root.google.bigtable.v2.GetClientConfigurationRequest, $root.google.bigtable.v2.ClientConfiguration, request, callback); + }, "name", { value: "GetClientConfiguration" }); + + /** + * Calls GetClientConfiguration. + * @function getClientConfiguration + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IGetClientConfigurationRequest} request GetClientConfigurationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|openTable}. + * @memberof google.bigtable.v2.Bigtable + * @typedef OpenTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.SessionResponse} [response] SessionResponse + */ + + /** + * Calls OpenTable. + * @function openTable + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ISessionRequest} request SessionRequest message or plain object + * @param {google.bigtable.v2.Bigtable.OpenTableCallback} callback Node-style callback called with the error, if any, and SessionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.openTable = function openTable(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, openTable, $root.google.bigtable.v2.SessionRequest, $root.google.bigtable.v2.SessionResponse, request, callback); + }, "name", { value: "OpenTable" }); + + /** + * Calls OpenTable. + * @function openTable + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ISessionRequest} request SessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|openAuthorizedView}. + * @memberof google.bigtable.v2.Bigtable + * @typedef OpenAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.SessionResponse} [response] SessionResponse + */ + + /** + * Calls OpenAuthorizedView. + * @function openAuthorizedView + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ISessionRequest} request SessionRequest message or plain object + * @param {google.bigtable.v2.Bigtable.OpenAuthorizedViewCallback} callback Node-style callback called with the error, if any, and SessionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.openAuthorizedView = function openAuthorizedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, openAuthorizedView, $root.google.bigtable.v2.SessionRequest, $root.google.bigtable.v2.SessionResponse, request, callback); + }, "name", { value: "OpenAuthorizedView" }); + + /** + * Calls OpenAuthorizedView. + * @function openAuthorizedView + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ISessionRequest} request SessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.v2.Bigtable|openMaterializedView}. + * @memberof google.bigtable.v2.Bigtable + * @typedef OpenMaterializedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.SessionResponse} [response] SessionResponse + */ + + /** + * Calls OpenMaterializedView. + * @function openMaterializedView + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ISessionRequest} request SessionRequest message or plain object + * @param {google.bigtable.v2.Bigtable.OpenMaterializedViewCallback} callback Node-style callback called with the error, if any, and SessionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.openMaterializedView = function openMaterializedView(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, openMaterializedView, $root.google.bigtable.v2.SessionRequest, $root.google.bigtable.v2.SessionResponse, request, callback); + }, "name", { value: "OpenMaterializedView" }); + + /** + * Calls OpenMaterializedView. + * @function openMaterializedView + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.ISessionRequest} request SessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Bigtable; + })(); + + v2.ReadRowsRequest = (function() { + + /** + * Properties of a ReadRowsRequest. + * @memberof google.bigtable.v2 + * @interface IReadRowsRequest + * @property {string|null} [tableName] ReadRowsRequest tableName + * @property {string|null} [authorizedViewName] ReadRowsRequest authorizedViewName + * @property {string|null} [materializedViewName] ReadRowsRequest materializedViewName + * @property {string|null} [appProfileId] ReadRowsRequest appProfileId + * @property {google.bigtable.v2.IRowSet|null} [rows] ReadRowsRequest rows + * @property {google.bigtable.v2.IRowFilter|null} [filter] ReadRowsRequest filter + * @property {number|Long|null} [rowsLimit] ReadRowsRequest rowsLimit + * @property {google.bigtable.v2.ReadRowsRequest.RequestStatsView|null} [requestStatsView] ReadRowsRequest requestStatsView + * @property {boolean|null} [reversed] ReadRowsRequest reversed + */ + + /** + * Constructs a new ReadRowsRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a ReadRowsRequest. + * @implements IReadRowsRequest + * @constructor + * @param {google.bigtable.v2.IReadRowsRequest=} [properties] Properties to set + */ + function ReadRowsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadRowsRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.tableName = ""; + + /** + * ReadRowsRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.authorizedViewName = ""; + + /** + * ReadRowsRequest materializedViewName. + * @member {string} materializedViewName + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.materializedViewName = ""; + + /** + * ReadRowsRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.appProfileId = ""; + + /** + * ReadRowsRequest rows. + * @member {google.bigtable.v2.IRowSet|null|undefined} rows + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.rows = null; + + /** + * ReadRowsRequest filter. + * @member {google.bigtable.v2.IRowFilter|null|undefined} filter + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.filter = null; + + /** + * ReadRowsRequest rowsLimit. + * @member {number|Long} rowsLimit + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.rowsLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReadRowsRequest requestStatsView. + * @member {google.bigtable.v2.ReadRowsRequest.RequestStatsView} requestStatsView + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.requestStatsView = 0; + + /** + * ReadRowsRequest reversed. + * @member {boolean} reversed + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.reversed = false; + + /** + * Creates a new ReadRowsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {google.bigtable.v2.IReadRowsRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadRowsRequest} ReadRowsRequest instance + */ + ReadRowsRequest.create = function create(properties) { + return new ReadRowsRequest(properties); + }; + + /** + * Encodes the specified ReadRowsRequest message. Does not implicitly {@link google.bigtable.v2.ReadRowsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {google.bigtable.v2.IReadRowsRequest} message ReadRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadRowsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) + $root.google.bigtable.v2.RowSet.encode(message.rows, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.bigtable.v2.RowFilter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.rowsLimit != null && Object.hasOwnProperty.call(message, "rowsLimit")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.rowsLimit); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.appProfileId); + if (message.requestStatsView != null && Object.hasOwnProperty.call(message, "requestStatsView")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.requestStatsView); + if (message.reversed != null && Object.hasOwnProperty.call(message, "reversed")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.reversed); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.authorizedViewName); + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.materializedViewName); + return writer; + }; + + /** + * Encodes the specified ReadRowsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadRowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {google.bigtable.v2.IReadRowsRequest} message ReadRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReadRowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadRowsRequest} ReadRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadRowsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 9: { + message.authorizedViewName = reader.string(); + break; + } + case 11: { + message.materializedViewName = reader.string(); + break; + } + case 5: { + message.appProfileId = reader.string(); + break; + } + case 2: { + message.rows = $root.google.bigtable.v2.RowSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.filter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.rowsLimit = reader.int64(); + break; + } + case 6: { + message.requestStatsView = reader.int32(); + break; + } + case 7: { + message.reversed = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReadRowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadRowsRequest} ReadRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadRowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadRowsRequest message. + * @function verify + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadRowsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + if (!$util.isString(message.materializedViewName)) + return "materializedViewName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) { + var error = $root.google.bigtable.v2.RowSet.verify(message.rows, long + 1); + if (error) + return "rows." + error; + } + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filter, long + 1); + if (error) + return "filter." + error; + } + if (message.rowsLimit != null && Object.hasOwnProperty.call(message, "rowsLimit")) + if (!$util.isInteger(message.rowsLimit) && !(message.rowsLimit && $util.isInteger(message.rowsLimit.low) && $util.isInteger(message.rowsLimit.high))) + return "rowsLimit: integer|Long expected"; + if (message.requestStatsView != null && Object.hasOwnProperty.call(message, "requestStatsView")) + switch (message.requestStatsView) { + default: + return "requestStatsView: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.reversed != null && Object.hasOwnProperty.call(message, "reversed")) + if (typeof message.reversed !== "boolean") + return "reversed: boolean expected"; + return null; + }; + + /** + * Creates a ReadRowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadRowsRequest} ReadRowsRequest + */ + ReadRowsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadRowsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadRowsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadRowsRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); + if (object.materializedViewName != null) + message.materializedViewName = String(object.materializedViewName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.rows != null) { + if (!$util.isObject(object.rows)) + throw TypeError(".google.bigtable.v2.ReadRowsRequest.rows: object expected"); + message.rows = $root.google.bigtable.v2.RowSet.fromObject(object.rows, long + 1); + } + if (object.filter != null) { + if (!$util.isObject(object.filter)) + throw TypeError(".google.bigtable.v2.ReadRowsRequest.filter: object expected"); + message.filter = $root.google.bigtable.v2.RowFilter.fromObject(object.filter, long + 1); + } + if (object.rowsLimit != null) + if ($util.Long) + message.rowsLimit = $util.Long.fromValue(object.rowsLimit, false); + else if (typeof object.rowsLimit === "string") + message.rowsLimit = parseInt(object.rowsLimit, 10); + else if (typeof object.rowsLimit === "number") + message.rowsLimit = object.rowsLimit; + else if (typeof object.rowsLimit === "object") + message.rowsLimit = new $util.LongBits(object.rowsLimit.low >>> 0, object.rowsLimit.high >>> 0).toNumber(); + switch (object.requestStatsView) { + default: + if (typeof object.requestStatsView === "number") { + message.requestStatsView = object.requestStatsView; + break; + } + break; + case "REQUEST_STATS_VIEW_UNSPECIFIED": + case 0: + message.requestStatsView = 0; + break; + case "REQUEST_STATS_NONE": + case 1: + message.requestStatsView = 1; + break; + case "REQUEST_STATS_FULL": + case 2: + message.requestStatsView = 2; + break; + } + if (object.reversed != null) + message.reversed = Boolean(object.reversed); + return message; + }; + + /** + * Creates a plain object from a ReadRowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {google.bigtable.v2.ReadRowsRequest} message ReadRowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadRowsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.rows = null; + object.filter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowsLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.rowsLimit = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.appProfileId = ""; + object.requestStatsView = options.enums === String ? "REQUEST_STATS_VIEW_UNSPECIFIED" : 0; + object.reversed = false; + object.authorizedViewName = ""; + object.materializedViewName = ""; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) + object.rows = $root.google.bigtable.v2.RowSet.toObject(message.rows, options, q + 1); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + object.filter = $root.google.bigtable.v2.RowFilter.toObject(message.filter, options, q + 1); + if (message.rowsLimit != null && Object.hasOwnProperty.call(message, "rowsLimit")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rowsLimit = typeof message.rowsLimit === "number" ? BigInt(message.rowsLimit) : $util.Long.fromBits(message.rowsLimit.low >>> 0, message.rowsLimit.high >>> 0, false).toBigInt(); + else if (typeof message.rowsLimit === "number") + object.rowsLimit = options.longs === String ? String(message.rowsLimit) : message.rowsLimit; + else + object.rowsLimit = options.longs === String ? $util.Long.prototype.toString.call(message.rowsLimit) : options.longs === Number ? new $util.LongBits(message.rowsLimit.low >>> 0, message.rowsLimit.high >>> 0).toNumber() : message.rowsLimit; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.requestStatsView != null && Object.hasOwnProperty.call(message, "requestStatsView")) + object.requestStatsView = options.enums === String ? $root.google.bigtable.v2.ReadRowsRequest.RequestStatsView[message.requestStatsView] === undefined ? message.requestStatsView : $root.google.bigtable.v2.ReadRowsRequest.RequestStatsView[message.requestStatsView] : message.requestStatsView; + if (message.reversed != null && Object.hasOwnProperty.call(message, "reversed")) + object.reversed = message.reversed; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + object.materializedViewName = message.materializedViewName; + return object; + }; + + /** + * Converts this ReadRowsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + * @returns {Object.} JSON object + */ + ReadRowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadRowsRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadRowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadRowsRequest"; + }; + + /** + * RequestStatsView enum. + * @name google.bigtable.v2.ReadRowsRequest.RequestStatsView + * @enum {number} + * @property {number} REQUEST_STATS_VIEW_UNSPECIFIED=0 REQUEST_STATS_VIEW_UNSPECIFIED value + * @property {number} REQUEST_STATS_NONE=1 REQUEST_STATS_NONE value + * @property {number} REQUEST_STATS_FULL=2 REQUEST_STATS_FULL value + */ + ReadRowsRequest.RequestStatsView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REQUEST_STATS_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "REQUEST_STATS_NONE"] = 1; + values[valuesById[2] = "REQUEST_STATS_FULL"] = 2; + return values; + })(); + + return ReadRowsRequest; + })(); + + v2.ReadRowsResponse = (function() { + + /** + * Properties of a ReadRowsResponse. + * @memberof google.bigtable.v2 + * @interface IReadRowsResponse + * @property {Array.|null} [chunks] ReadRowsResponse chunks + * @property {Uint8Array|null} [lastScannedRowKey] ReadRowsResponse lastScannedRowKey + * @property {google.bigtable.v2.IRequestStats|null} [requestStats] ReadRowsResponse requestStats + */ + + /** + * Constructs a new ReadRowsResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a ReadRowsResponse. + * @implements IReadRowsResponse + * @constructor + * @param {google.bigtable.v2.IReadRowsResponse=} [properties] Properties to set + */ + function ReadRowsResponse(properties) { + this.chunks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadRowsResponse chunks. + * @member {Array.} chunks + * @memberof google.bigtable.v2.ReadRowsResponse + * @instance + */ + ReadRowsResponse.prototype.chunks = $util.emptyArray; + + /** + * ReadRowsResponse lastScannedRowKey. + * @member {Uint8Array} lastScannedRowKey + * @memberof google.bigtable.v2.ReadRowsResponse + * @instance + */ + ReadRowsResponse.prototype.lastScannedRowKey = $util.newBuffer([]); + + /** + * ReadRowsResponse requestStats. + * @member {google.bigtable.v2.IRequestStats|null|undefined} requestStats + * @memberof google.bigtable.v2.ReadRowsResponse + * @instance + */ + ReadRowsResponse.prototype.requestStats = null; + + /** + * Creates a new ReadRowsResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {google.bigtable.v2.IReadRowsResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadRowsResponse} ReadRowsResponse instance + */ + ReadRowsResponse.create = function create(properties) { + return new ReadRowsResponse(properties); + }; + + /** + * Encodes the specified ReadRowsResponse message. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {google.bigtable.v2.IReadRowsResponse} message ReadRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadRowsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.chunks != null && message.chunks.length) + for (var i = 0; i < message.chunks.length; ++i) + $root.google.bigtable.v2.ReadRowsResponse.CellChunk.encode(message.chunks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.lastScannedRowKey != null && Object.hasOwnProperty.call(message, "lastScannedRowKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.lastScannedRowKey); + if (message.requestStats != null && Object.hasOwnProperty.call(message, "requestStats")) + $root.google.bigtable.v2.RequestStats.encode(message.requestStats, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReadRowsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {google.bigtable.v2.IReadRowsResponse} message ReadRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReadRowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadRowsResponse} ReadRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadRowsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.chunks && message.chunks.length)) + message.chunks = []; + message.chunks.push($root.google.bigtable.v2.ReadRowsResponse.CellChunk.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.lastScannedRowKey = reader.bytes(); + break; + } + case 3: { + message.requestStats = $root.google.bigtable.v2.RequestStats.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReadRowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadRowsResponse} ReadRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadRowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadRowsResponse message. + * @function verify + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadRowsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) { + if (!Array.isArray(message.chunks)) + return "chunks: array expected"; + for (var i = 0; i < message.chunks.length; ++i) { + var error = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.verify(message.chunks[i], long + 1); + if (error) + return "chunks." + error; + } + } + if (message.lastScannedRowKey != null && Object.hasOwnProperty.call(message, "lastScannedRowKey")) + if (!(message.lastScannedRowKey && typeof message.lastScannedRowKey.length === "number" || $util.isString(message.lastScannedRowKey))) + return "lastScannedRowKey: buffer expected"; + if (message.requestStats != null && Object.hasOwnProperty.call(message, "requestStats")) { + var error = $root.google.bigtable.v2.RequestStats.verify(message.requestStats, long + 1); + if (error) + return "requestStats." + error; + } + return null; + }; + + /** + * Creates a ReadRowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadRowsResponse} ReadRowsResponse + */ + ReadRowsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadRowsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadRowsResponse(); + if (object.chunks) { + if (!Array.isArray(object.chunks)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse.chunks: array expected"); + message.chunks = []; + for (var i = 0; i < object.chunks.length; ++i) { + if (!$util.isObject(object.chunks[i])) + throw TypeError(".google.bigtable.v2.ReadRowsResponse.chunks: object expected"); + message.chunks[i] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.fromObject(object.chunks[i], long + 1); + } + } + if (object.lastScannedRowKey != null) + if (typeof object.lastScannedRowKey === "string") + $util.base64.decode(object.lastScannedRowKey, message.lastScannedRowKey = $util.newBuffer($util.base64.length(object.lastScannedRowKey)), 0); + else if (object.lastScannedRowKey.length >= 0) + message.lastScannedRowKey = object.lastScannedRowKey; + if (object.requestStats != null) { + if (!$util.isObject(object.requestStats)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse.requestStats: object expected"); + message.requestStats = $root.google.bigtable.v2.RequestStats.fromObject(object.requestStats, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ReadRowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {google.bigtable.v2.ReadRowsResponse} message ReadRowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadRowsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.chunks = []; + if (options.defaults) { + if (options.bytes === String) + object.lastScannedRowKey = ""; + else { + object.lastScannedRowKey = []; + if (options.bytes !== Array) + object.lastScannedRowKey = $util.newBuffer(object.lastScannedRowKey); + } + object.requestStats = null; + } + if (message.chunks && message.chunks.length) { + object.chunks = []; + for (var j = 0; j < message.chunks.length; ++j) + object.chunks[j] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.toObject(message.chunks[j], options, q + 1); + } + if (message.lastScannedRowKey != null && Object.hasOwnProperty.call(message, "lastScannedRowKey")) + object.lastScannedRowKey = options.bytes === String ? $util.base64.encode(message.lastScannedRowKey, 0, message.lastScannedRowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastScannedRowKey) : message.lastScannedRowKey; + if (message.requestStats != null && Object.hasOwnProperty.call(message, "requestStats")) + object.requestStats = $root.google.bigtable.v2.RequestStats.toObject(message.requestStats, options, q + 1); + return object; + }; + + /** + * Converts this ReadRowsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadRowsResponse + * @instance + * @returns {Object.} JSON object + */ + ReadRowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadRowsResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadRowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadRowsResponse"; + }; + + ReadRowsResponse.CellChunk = (function() { + + /** + * Properties of a CellChunk. + * @memberof google.bigtable.v2.ReadRowsResponse + * @interface ICellChunk + * @property {Uint8Array|null} [rowKey] CellChunk rowKey + * @property {google.protobuf.IStringValue|null} [familyName] CellChunk familyName + * @property {google.protobuf.IBytesValue|null} [qualifier] CellChunk qualifier + * @property {number|Long|null} [timestampMicros] CellChunk timestampMicros + * @property {Array.|null} [labels] CellChunk labels + * @property {Uint8Array|null} [value] CellChunk value + * @property {number|null} [valueSize] CellChunk valueSize + * @property {boolean|null} [resetRow] CellChunk resetRow + * @property {boolean|null} [commitRow] CellChunk commitRow + */ + + /** + * Constructs a new CellChunk. + * @memberof google.bigtable.v2.ReadRowsResponse + * @classdesc Represents a CellChunk. + * @implements ICellChunk + * @constructor + * @param {google.bigtable.v2.ReadRowsResponse.ICellChunk=} [properties] Properties to set + */ + function CellChunk(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CellChunk rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.rowKey = $util.newBuffer([]); + + /** + * CellChunk familyName. + * @member {google.protobuf.IStringValue|null|undefined} familyName + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.familyName = null; + + /** + * CellChunk qualifier. + * @member {google.protobuf.IBytesValue|null|undefined} qualifier + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.qualifier = null; + + /** + * CellChunk timestampMicros. + * @member {number|Long} timestampMicros + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.timestampMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CellChunk labels. + * @member {Array.} labels + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.labels = $util.emptyArray; + + /** + * CellChunk value. + * @member {Uint8Array} value + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.value = $util.newBuffer([]); + + /** + * CellChunk valueSize. + * @member {number} valueSize + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.valueSize = 0; + + /** + * CellChunk resetRow. + * @member {boolean|null|undefined} resetRow + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.resetRow = null; + + /** + * CellChunk commitRow. + * @member {boolean|null|undefined} commitRow + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + CellChunk.prototype.commitRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CellChunk rowStatus. + * @member {"resetRow"|"commitRow"|undefined} rowStatus + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + */ + Object.defineProperty(CellChunk.prototype, "rowStatus", { + get: $util.oneOfGetter($oneOfFields = ["resetRow", "commitRow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CellChunk instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {google.bigtable.v2.ReadRowsResponse.ICellChunk=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadRowsResponse.CellChunk} CellChunk instance + */ + CellChunk.create = function create(properties) { + return new CellChunk(properties); + }; + + /** + * Encodes the specified CellChunk message. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.CellChunk.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {google.bigtable.v2.ReadRowsResponse.ICellChunk} message CellChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CellChunk.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowKey); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + $root.google.protobuf.StringValue.encode(message.familyName, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) + $root.google.protobuf.BytesValue.encode(message.qualifier, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.timestampMicros); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.labels[i]); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.value); + if (message.valueSize != null && Object.hasOwnProperty.call(message, "valueSize")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.valueSize); + if (message.resetRow != null && Object.hasOwnProperty.call(message, "resetRow")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.resetRow); + if (message.commitRow != null && Object.hasOwnProperty.call(message, "commitRow")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.commitRow); + return writer; + }; + + /** + * Encodes the specified CellChunk message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadRowsResponse.CellChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {google.bigtable.v2.ReadRowsResponse.ICellChunk} message CellChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CellChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CellChunk message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadRowsResponse.CellChunk} CellChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CellChunk.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadRowsResponse.CellChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rowKey = reader.bytes(); + break; + } + case 2: { + message.familyName = $root.google.protobuf.StringValue.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.qualifier = $root.google.protobuf.BytesValue.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.timestampMicros = reader.int64(); + break; + } + case 5: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push(reader.string()); + break; + } + case 6: { + message.value = reader.bytes(); + break; + } + case 7: { + message.valueSize = reader.int32(); + break; + } + case 8: { + message.resetRow = reader.bool(); + break; + } + case 9: { + message.commitRow = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CellChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadRowsResponse.CellChunk} CellChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CellChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CellChunk message. + * @function verify + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CellChunk.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) { + var error = $root.google.protobuf.StringValue.verify(message.familyName, long + 1); + if (error) + return "familyName." + error; + } + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) { + var error = $root.google.protobuf.BytesValue.verify(message.qualifier, long + 1); + if (error) + return "qualifier." + error; + } + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (!$util.isInteger(message.timestampMicros) && !(message.timestampMicros && $util.isInteger(message.timestampMicros.low) && $util.isInteger(message.timestampMicros.high))) + return "timestampMicros: integer|Long expected"; + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) + if (!$util.isString(message.labels[i])) + return "labels: string[] expected"; + } + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.valueSize != null && Object.hasOwnProperty.call(message, "valueSize")) + if (!$util.isInteger(message.valueSize)) + return "valueSize: integer expected"; + if (message.resetRow != null && Object.hasOwnProperty.call(message, "resetRow")) { + properties.rowStatus = 1; + if (typeof message.resetRow !== "boolean") + return "resetRow: boolean expected"; + } + if (message.commitRow != null && Object.hasOwnProperty.call(message, "commitRow")) { + if (properties.rowStatus === 1) + return "rowStatus: multiple values"; + properties.rowStatus = 1; + if (typeof message.commitRow !== "boolean") + return "commitRow: boolean expected"; + } + return null; + }; + + /** + * Creates a CellChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadRowsResponse.CellChunk} CellChunk + */ + CellChunk.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadRowsResponse.CellChunk) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadRowsResponse.CellChunk(); + if (object.rowKey != null) + if (typeof object.rowKey === "string") + $util.base64.decode(object.rowKey, message.rowKey = $util.newBuffer($util.base64.length(object.rowKey)), 0); + else if (object.rowKey.length >= 0) + message.rowKey = object.rowKey; + if (object.familyName != null) { + if (!$util.isObject(object.familyName)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.familyName: object expected"); + message.familyName = $root.google.protobuf.StringValue.fromObject(object.familyName, long + 1); + } + if (object.qualifier != null) { + if (!$util.isObject(object.qualifier)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier: object expected"); + message.qualifier = $root.google.protobuf.BytesValue.fromObject(object.qualifier, long + 1); + } + if (object.timestampMicros != null) + if ($util.Long) + message.timestampMicros = $util.Long.fromValue(object.timestampMicros, false); + else if (typeof object.timestampMicros === "string") + message.timestampMicros = parseInt(object.timestampMicros, 10); + else if (typeof object.timestampMicros === "number") + message.timestampMicros = object.timestampMicros; + else if (typeof object.timestampMicros === "object") + message.timestampMicros = new $util.LongBits(object.timestampMicros.low >>> 0, object.timestampMicros.high >>> 0).toNumber(); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) + message.labels[i] = String(object.labels[i]); + } + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + if (object.valueSize != null) + message.valueSize = object.valueSize | 0; + if (object.resetRow != null) + message.resetRow = Boolean(object.resetRow); + if (object.commitRow != null) + message.commitRow = Boolean(object.commitRow); + return message; + }; + + /** + * Creates a plain object from a CellChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {google.bigtable.v2.ReadRowsResponse.CellChunk} message CellChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CellChunk.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + if (options.bytes === String) + object.rowKey = ""; + else { + object.rowKey = []; + if (options.bytes !== Array) + object.rowKey = $util.newBuffer(object.rowKey); + } + object.familyName = null; + object.qualifier = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.timestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.valueSize = 0; + } + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = $root.google.protobuf.StringValue.toObject(message.familyName, options, q + 1); + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) + object.qualifier = $root.google.protobuf.BytesValue.toObject(message.qualifier, options, q + 1); + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.timestampMicros = typeof message.timestampMicros === "number" ? BigInt(message.timestampMicros) : $util.Long.fromBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.timestampMicros === "number") + object.timestampMicros = options.longs === String ? String(message.timestampMicros) : message.timestampMicros; + else + object.timestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMicros) : options.longs === Number ? new $util.LongBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0).toNumber() : message.timestampMicros; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = message.labels[j]; + } + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.valueSize != null && Object.hasOwnProperty.call(message, "valueSize")) + object.valueSize = message.valueSize; + if (message.resetRow != null && Object.hasOwnProperty.call(message, "resetRow")) { + object.resetRow = message.resetRow; + if (options.oneofs) + object.rowStatus = "resetRow"; + } + if (message.commitRow != null && Object.hasOwnProperty.call(message, "commitRow")) { + object.commitRow = message.commitRow; + if (options.oneofs) + object.rowStatus = "commitRow"; + } + return object; + }; + + /** + * Converts this CellChunk to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @instance + * @returns {Object.} JSON object + */ + CellChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CellChunk + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadRowsResponse.CellChunk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CellChunk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadRowsResponse.CellChunk"; + }; + + return CellChunk; + })(); + + return ReadRowsResponse; + })(); + + v2.SampleRowKeysRequest = (function() { + + /** + * Properties of a SampleRowKeysRequest. + * @memberof google.bigtable.v2 + * @interface ISampleRowKeysRequest + * @property {string|null} [tableName] SampleRowKeysRequest tableName + * @property {string|null} [authorizedViewName] SampleRowKeysRequest authorizedViewName + * @property {string|null} [materializedViewName] SampleRowKeysRequest materializedViewName + * @property {string|null} [appProfileId] SampleRowKeysRequest appProfileId + * @property {google.bigtable.v2.IRowRange|null} [rowRange] SampleRowKeysRequest rowRange + */ + + /** + * Constructs a new SampleRowKeysRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a SampleRowKeysRequest. + * @implements ISampleRowKeysRequest + * @constructor + * @param {google.bigtable.v2.ISampleRowKeysRequest=} [properties] Properties to set + */ + function SampleRowKeysRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SampleRowKeysRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @instance + */ + SampleRowKeysRequest.prototype.tableName = ""; + + /** + * SampleRowKeysRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @instance + */ + SampleRowKeysRequest.prototype.authorizedViewName = ""; + + /** + * SampleRowKeysRequest materializedViewName. + * @member {string} materializedViewName + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @instance + */ + SampleRowKeysRequest.prototype.materializedViewName = ""; + + /** + * SampleRowKeysRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @instance + */ + SampleRowKeysRequest.prototype.appProfileId = ""; + + /** + * SampleRowKeysRequest rowRange. + * @member {google.bigtable.v2.IRowRange|null|undefined} rowRange + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @instance + */ + SampleRowKeysRequest.prototype.rowRange = null; + + /** + * Creates a new SampleRowKeysRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {google.bigtable.v2.ISampleRowKeysRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.SampleRowKeysRequest} SampleRowKeysRequest instance + */ + SampleRowKeysRequest.create = function create(properties) { + return new SampleRowKeysRequest(properties); + }; + + /** + * Encodes the specified SampleRowKeysRequest message. Does not implicitly {@link google.bigtable.v2.SampleRowKeysRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {google.bigtable.v2.ISampleRowKeysRequest} message SampleRowKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleRowKeysRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.authorizedViewName); + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.materializedViewName); + if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) + $root.google.bigtable.v2.RowRange.encode(message.rowRange, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SampleRowKeysRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SampleRowKeysRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {google.bigtable.v2.ISampleRowKeysRequest} message SampleRowKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleRowKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SampleRowKeysRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SampleRowKeysRequest} SampleRowKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleRowKeysRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 4: { + message.authorizedViewName = reader.string(); + break; + } + case 5: { + message.materializedViewName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + case 6: { + message.rowRange = $root.google.bigtable.v2.RowRange.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SampleRowKeysRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SampleRowKeysRequest} SampleRowKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleRowKeysRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SampleRowKeysRequest message. + * @function verify + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SampleRowKeysRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + if (!$util.isString(message.materializedViewName)) + return "materializedViewName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) { + var error = $root.google.bigtable.v2.RowRange.verify(message.rowRange, long + 1); + if (error) + return "rowRange." + error; + } + return null; + }; + + /** + * Creates a SampleRowKeysRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SampleRowKeysRequest} SampleRowKeysRequest + */ + SampleRowKeysRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SampleRowKeysRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SampleRowKeysRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SampleRowKeysRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); + if (object.materializedViewName != null) + message.materializedViewName = String(object.materializedViewName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.rowRange != null) { + if (!$util.isObject(object.rowRange)) + throw TypeError(".google.bigtable.v2.SampleRowKeysRequest.rowRange: object expected"); + message.rowRange = $root.google.bigtable.v2.RowRange.fromObject(object.rowRange, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SampleRowKeysRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {google.bigtable.v2.SampleRowKeysRequest} message SampleRowKeysRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SampleRowKeysRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.authorizedViewName = ""; + object.materializedViewName = ""; + object.rowRange = null; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + object.materializedViewName = message.materializedViewName; + if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) + object.rowRange = $root.google.bigtable.v2.RowRange.toObject(message.rowRange, options, q + 1); + return object; + }; + + /** + * Converts this SampleRowKeysRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @instance + * @returns {Object.} JSON object + */ + SampleRowKeysRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SampleRowKeysRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SampleRowKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SampleRowKeysRequest"; + }; + + return SampleRowKeysRequest; + })(); + + v2.SampleRowKeysResponse = (function() { + + /** + * Properties of a SampleRowKeysResponse. + * @memberof google.bigtable.v2 + * @interface ISampleRowKeysResponse + * @property {Uint8Array|null} [rowKey] SampleRowKeysResponse rowKey + * @property {number|Long|null} [offsetBytes] SampleRowKeysResponse offsetBytes + */ + + /** + * Constructs a new SampleRowKeysResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a SampleRowKeysResponse. + * @implements ISampleRowKeysResponse + * @constructor + * @param {google.bigtable.v2.ISampleRowKeysResponse=} [properties] Properties to set + */ + function SampleRowKeysResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SampleRowKeysResponse rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @instance + */ + SampleRowKeysResponse.prototype.rowKey = $util.newBuffer([]); + + /** + * SampleRowKeysResponse offsetBytes. + * @member {number|Long} offsetBytes + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @instance + */ + SampleRowKeysResponse.prototype.offsetBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SampleRowKeysResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {google.bigtable.v2.ISampleRowKeysResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.SampleRowKeysResponse} SampleRowKeysResponse instance + */ + SampleRowKeysResponse.create = function create(properties) { + return new SampleRowKeysResponse(properties); + }; + + /** + * Encodes the specified SampleRowKeysResponse message. Does not implicitly {@link google.bigtable.v2.SampleRowKeysResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {google.bigtable.v2.ISampleRowKeysResponse} message SampleRowKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleRowKeysResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowKey); + if (message.offsetBytes != null && Object.hasOwnProperty.call(message, "offsetBytes")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offsetBytes); + return writer; + }; + + /** + * Encodes the specified SampleRowKeysResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SampleRowKeysResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {google.bigtable.v2.ISampleRowKeysResponse} message SampleRowKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleRowKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SampleRowKeysResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SampleRowKeysResponse} SampleRowKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleRowKeysResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SampleRowKeysResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rowKey = reader.bytes(); + break; + } + case 2: { + message.offsetBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SampleRowKeysResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SampleRowKeysResponse} SampleRowKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleRowKeysResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SampleRowKeysResponse message. + * @function verify + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SampleRowKeysResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.offsetBytes != null && Object.hasOwnProperty.call(message, "offsetBytes")) + if (!$util.isInteger(message.offsetBytes) && !(message.offsetBytes && $util.isInteger(message.offsetBytes.low) && $util.isInteger(message.offsetBytes.high))) + return "offsetBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a SampleRowKeysResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SampleRowKeysResponse} SampleRowKeysResponse + */ + SampleRowKeysResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SampleRowKeysResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SampleRowKeysResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SampleRowKeysResponse(); + if (object.rowKey != null) + if (typeof object.rowKey === "string") + $util.base64.decode(object.rowKey, message.rowKey = $util.newBuffer($util.base64.length(object.rowKey)), 0); + else if (object.rowKey.length >= 0) + message.rowKey = object.rowKey; + if (object.offsetBytes != null) + if ($util.Long) + message.offsetBytes = $util.Long.fromValue(object.offsetBytes, false); + else if (typeof object.offsetBytes === "string") + message.offsetBytes = parseInt(object.offsetBytes, 10); + else if (typeof object.offsetBytes === "number") + message.offsetBytes = object.offsetBytes; + else if (typeof object.offsetBytes === "object") + message.offsetBytes = new $util.LongBits(object.offsetBytes.low >>> 0, object.offsetBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SampleRowKeysResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {google.bigtable.v2.SampleRowKeysResponse} message SampleRowKeysResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SampleRowKeysResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.rowKey = ""; + else { + object.rowKey = []; + if (options.bytes !== Array) + object.rowKey = $util.newBuffer(object.rowKey); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offsetBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.offsetBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + } + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; + if (message.offsetBytes != null && Object.hasOwnProperty.call(message, "offsetBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.offsetBytes = typeof message.offsetBytes === "number" ? BigInt(message.offsetBytes) : $util.Long.fromBits(message.offsetBytes.low >>> 0, message.offsetBytes.high >>> 0, false).toBigInt(); + else if (typeof message.offsetBytes === "number") + object.offsetBytes = options.longs === String ? String(message.offsetBytes) : message.offsetBytes; + else + object.offsetBytes = options.longs === String ? $util.Long.prototype.toString.call(message.offsetBytes) : options.longs === Number ? new $util.LongBits(message.offsetBytes.low >>> 0, message.offsetBytes.high >>> 0).toNumber() : message.offsetBytes; + return object; + }; + + /** + * Converts this SampleRowKeysResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @instance + * @returns {Object.} JSON object + */ + SampleRowKeysResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SampleRowKeysResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.SampleRowKeysResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SampleRowKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SampleRowKeysResponse"; + }; + + return SampleRowKeysResponse; + })(); + + v2.MutateRowRequest = (function() { + + /** + * Properties of a MutateRowRequest. + * @memberof google.bigtable.v2 + * @interface IMutateRowRequest + * @property {string|null} [tableName] MutateRowRequest tableName + * @property {string|null} [authorizedViewName] MutateRowRequest authorizedViewName + * @property {string|null} [appProfileId] MutateRowRequest appProfileId + * @property {Uint8Array|null} [rowKey] MutateRowRequest rowKey + * @property {Array.|null} [mutations] MutateRowRequest mutations + * @property {google.bigtable.v2.IIdempotency|null} [idempotency] MutateRowRequest idempotency + */ + + /** + * Constructs a new MutateRowRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a MutateRowRequest. + * @implements IMutateRowRequest + * @constructor + * @param {google.bigtable.v2.IMutateRowRequest=} [properties] Properties to set + */ + function MutateRowRequest(properties) { + this.mutations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MutateRowRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.MutateRowRequest + * @instance + */ + MutateRowRequest.prototype.tableName = ""; + + /** + * MutateRowRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.MutateRowRequest + * @instance + */ + MutateRowRequest.prototype.authorizedViewName = ""; + + /** + * MutateRowRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.MutateRowRequest + * @instance + */ + MutateRowRequest.prototype.appProfileId = ""; + + /** + * MutateRowRequest rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.MutateRowRequest + * @instance + */ + MutateRowRequest.prototype.rowKey = $util.newBuffer([]); + + /** + * MutateRowRequest mutations. + * @member {Array.} mutations + * @memberof google.bigtable.v2.MutateRowRequest + * @instance + */ + MutateRowRequest.prototype.mutations = $util.emptyArray; + + /** + * MutateRowRequest idempotency. + * @member {google.bigtable.v2.IIdempotency|null|undefined} idempotency + * @memberof google.bigtable.v2.MutateRowRequest + * @instance + */ + MutateRowRequest.prototype.idempotency = null; + + /** + * Creates a new MutateRowRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {google.bigtable.v2.IMutateRowRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowRequest} MutateRowRequest instance + */ + MutateRowRequest.create = function create(properties) { + return new MutateRowRequest(properties); + }; + + /** + * Encodes the specified MutateRowRequest message. Does not implicitly {@link google.bigtable.v2.MutateRowRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {google.bigtable.v2.IMutateRowRequest} message MutateRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateRowRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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.mutations != null && message.mutations.length) + for (var i = 0; i < message.mutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.mutations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.authorizedViewName); + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) + $root.google.bigtable.v2.Idempotency.encode(message.idempotency, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {google.bigtable.v2.IMutateRowRequest} message MutateRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MutateRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.MutateRowRequest} MutateRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateRowRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 6: { + message.authorizedViewName = reader.string(); + break; + } + case 4: { + message.appProfileId = reader.string(); + break; + } + case 2: { + message.rowKey = reader.bytes(); + break; + } + case 3: { + if (!(message.mutations && message.mutations.length)) + message.mutations = []; + message.mutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + message.idempotency = $root.google.bigtable.v2.Idempotency.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MutateRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.MutateRowRequest} MutateRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateRowRequest message. + * @function verify + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateRowRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.mutations != null && Object.hasOwnProperty.call(message, "mutations")) { + if (!Array.isArray(message.mutations)) + return "mutations: array expected"; + for (var i = 0; i < message.mutations.length; ++i) { + var error = $root.google.bigtable.v2.Mutation.verify(message.mutations[i], long + 1); + if (error) + return "mutations." + error; + } + } + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) { + var error = $root.google.bigtable.v2.Idempotency.verify(message.idempotency, long + 1); + if (error) + return "idempotency." + error; + } + return null; + }; + + /** + * Creates a MutateRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.MutateRowRequest} MutateRowRequest + */ + MutateRowRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.MutateRowRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.MutateRowRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.rowKey != null) + if (typeof object.rowKey === "string") + $util.base64.decode(object.rowKey, message.rowKey = $util.newBuffer($util.base64.length(object.rowKey)), 0); + else if (object.rowKey.length >= 0) + message.rowKey = object.rowKey; + if (object.mutations) { + if (!Array.isArray(object.mutations)) + throw TypeError(".google.bigtable.v2.MutateRowRequest.mutations: array expected"); + message.mutations = []; + for (var i = 0; i < object.mutations.length; ++i) { + if (!$util.isObject(object.mutations[i])) + throw TypeError(".google.bigtable.v2.MutateRowRequest.mutations: object expected"); + message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i], long + 1); + } + } + if (object.idempotency != null) { + if (!$util.isObject(object.idempotency)) + throw TypeError(".google.bigtable.v2.MutateRowRequest.idempotency: object expected"); + message.idempotency = $root.google.bigtable.v2.Idempotency.fromObject(object.idempotency, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MutateRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {google.bigtable.v2.MutateRowRequest} message MutateRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateRowRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.mutations = []; + if (options.defaults) { + object.tableName = ""; + if (options.bytes === String) + object.rowKey = ""; + else { + object.rowKey = []; + if (options.bytes !== Array) + object.rowKey = $util.newBuffer(object.rowKey); + } + object.appProfileId = ""; + object.authorizedViewName = ""; + object.idempotency = null; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; + if (message.mutations && message.mutations.length) { + object.mutations = []; + for (var j = 0; j < message.mutations.length; ++j) + object.mutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.mutations[j], options, q + 1); + } + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) + object.idempotency = $root.google.bigtable.v2.Idempotency.toObject(message.idempotency, options, q + 1); + return object; + }; + + /** + * Converts this MutateRowRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.MutateRowRequest + * @instance + * @returns {Object.} JSON object + */ + MutateRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateRowRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.MutateRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.MutateRowRequest"; + }; + + return MutateRowRequest; + })(); + + v2.MutateRowResponse = (function() { + + /** + * Properties of a MutateRowResponse. + * @memberof google.bigtable.v2 + * @interface IMutateRowResponse + */ + + /** + * Constructs a new MutateRowResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a MutateRowResponse. + * @implements IMutateRowResponse + * @constructor + * @param {google.bigtable.v2.IMutateRowResponse=} [properties] Properties to set + */ + function MutateRowResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MutateRowResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {google.bigtable.v2.IMutateRowResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse instance + */ + MutateRowResponse.create = function create(properties) { + return new MutateRowResponse(properties); + }; + + /** + * Encodes the specified MutateRowResponse message. Does not implicitly {@link google.bigtable.v2.MutateRowResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {google.bigtable.v2.IMutateRowResponse} message MutateRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateRowResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified MutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {google.bigtable.v2.IMutateRowResponse} message MutateRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MutateRowResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateRowResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MutateRowResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateRowResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateRowResponse message. + * @function verify + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateRowResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a MutateRowResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.MutateRowResponse} MutateRowResponse + */ + MutateRowResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.MutateRowResponse) + return object; + return new $root.google.bigtable.v2.MutateRowResponse(); + }; + + /** + * Creates a plain object from a MutateRowResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {google.bigtable.v2.MutateRowResponse} message MutateRowResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateRowResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MutateRowResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.MutateRowResponse + * @instance + * @returns {Object.} JSON object + */ + MutateRowResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateRowResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.MutateRowResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.MutateRowResponse"; + }; + + return MutateRowResponse; + })(); + + v2.MutateRowsRequest = (function() { + + /** + * Properties of a MutateRowsRequest. + * @memberof google.bigtable.v2 + * @interface IMutateRowsRequest + * @property {string|null} [tableName] MutateRowsRequest tableName + * @property {string|null} [authorizedViewName] MutateRowsRequest authorizedViewName + * @property {string|null} [appProfileId] MutateRowsRequest appProfileId + * @property {Array.|null} [entries] MutateRowsRequest entries + */ + + /** + * Constructs a new MutateRowsRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a MutateRowsRequest. + * @implements IMutateRowsRequest + * @constructor + * @param {google.bigtable.v2.IMutateRowsRequest=} [properties] Properties to set + */ + function MutateRowsRequest(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MutateRowsRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.MutateRowsRequest + * @instance + */ + MutateRowsRequest.prototype.tableName = ""; + + /** + * MutateRowsRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.MutateRowsRequest + * @instance + */ + MutateRowsRequest.prototype.authorizedViewName = ""; + + /** + * MutateRowsRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.MutateRowsRequest + * @instance + */ + MutateRowsRequest.prototype.appProfileId = ""; + + /** + * MutateRowsRequest entries. + * @member {Array.} entries + * @memberof google.bigtable.v2.MutateRowsRequest + * @instance + */ + MutateRowsRequest.prototype.entries = $util.emptyArray; + + /** + * Creates a new MutateRowsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {google.bigtable.v2.IMutateRowsRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowsRequest} MutateRowsRequest instance + */ + MutateRowsRequest.create = function create(properties) { + return new MutateRowsRequest(properties); + }; + + /** + * Encodes the specified MutateRowsRequest message. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {google.bigtable.v2.IMutateRowsRequest} message MutateRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateRowsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.bigtable.v2.MutateRowsRequest.Entry.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.authorizedViewName); + return writer; + }; + + /** + * Encodes the specified MutateRowsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {google.bigtable.v2.IMutateRowsRequest} message MutateRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MutateRowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.MutateRowsRequest} MutateRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateRowsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 5: { + message.authorizedViewName = reader.string(); + break; + } + case 3: { + message.appProfileId = reader.string(); + break; + } + case 2: { + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.bigtable.v2.MutateRowsRequest.Entry.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MutateRowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.MutateRowsRequest} MutateRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateRowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateRowsRequest message. + * @function verify + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateRowsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.bigtable.v2.MutateRowsRequest.Entry.verify(message.entries[i], long + 1); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a MutateRowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.MutateRowsRequest} MutateRowsRequest + */ + MutateRowsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.MutateRowsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.MutateRowsRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.bigtable.v2.MutateRowsRequest.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (!$util.isObject(object.entries[i])) + throw TypeError(".google.bigtable.v2.MutateRowsRequest.entries: object expected"); + message.entries[i] = $root.google.bigtable.v2.MutateRowsRequest.Entry.fromObject(object.entries[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a MutateRowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {google.bigtable.v2.MutateRowsRequest} message MutateRowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateRowsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.authorizedViewName = ""; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.bigtable.v2.MutateRowsRequest.Entry.toObject(message.entries[j], options, q + 1); + } + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + return object; + }; + + /** + * Converts this MutateRowsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.MutateRowsRequest + * @instance + * @returns {Object.} JSON object + */ + MutateRowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateRowsRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.MutateRowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.MutateRowsRequest"; + }; + + MutateRowsRequest.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof google.bigtable.v2.MutateRowsRequest + * @interface IEntry + * @property {Uint8Array|null} [rowKey] Entry rowKey + * @property {Array.|null} [mutations] Entry mutations + * @property {google.bigtable.v2.IIdempotency|null} [idempotency] Entry idempotency + */ + + /** + * Constructs a new Entry. + * @memberof google.bigtable.v2.MutateRowsRequest + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.bigtable.v2.MutateRowsRequest.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + this.mutations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @instance + */ + Entry.prototype.rowKey = $util.newBuffer([]); + + /** + * Entry mutations. + * @member {Array.} mutations + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @instance + */ + Entry.prototype.mutations = $util.emptyArray; + + /** + * Entry idempotency. + * @member {google.bigtable.v2.IIdempotency|null|undefined} idempotency + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @instance + */ + Entry.prototype.idempotency = null; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {google.bigtable.v2.MutateRowsRequest.IEntry=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowsRequest.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.Entry.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {google.bigtable.v2.MutateRowsRequest.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowKey); + if (message.mutations != null && message.mutations.length) + for (var i = 0; i < message.mutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.mutations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) + $root.google.bigtable.v2.Idempotency.encode(message.idempotency, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsRequest.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {google.bigtable.v2.MutateRowsRequest.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.MutateRowsRequest.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsRequest.Entry(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rowKey = reader.bytes(); + break; + } + case 2: { + if (!(message.mutations && message.mutations.length)) + message.mutations = []; + message.mutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.idempotency = $root.google.bigtable.v2.Idempotency.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.MutateRowsRequest.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.mutations != null && Object.hasOwnProperty.call(message, "mutations")) { + if (!Array.isArray(message.mutations)) + return "mutations: array expected"; + for (var i = 0; i < message.mutations.length; ++i) { + var error = $root.google.bigtable.v2.Mutation.verify(message.mutations[i], long + 1); + if (error) + return "mutations." + error; + } + } + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) { + var error = $root.google.bigtable.v2.Idempotency.verify(message.idempotency, long + 1); + if (error) + return "idempotency." + error; + } + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.MutateRowsRequest.Entry} Entry + */ + Entry.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.MutateRowsRequest.Entry) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.MutateRowsRequest.Entry(); + if (object.rowKey != null) + if (typeof object.rowKey === "string") + $util.base64.decode(object.rowKey, message.rowKey = $util.newBuffer($util.base64.length(object.rowKey)), 0); + else if (object.rowKey.length >= 0) + message.rowKey = object.rowKey; + if (object.mutations) { + if (!Array.isArray(object.mutations)) + throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.mutations: array expected"); + message.mutations = []; + for (var i = 0; i < object.mutations.length; ++i) { + if (!$util.isObject(object.mutations[i])) + throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.mutations: object expected"); + message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i], long + 1); + } + } + if (object.idempotency != null) { + if (!$util.isObject(object.idempotency)) + throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.idempotency: object expected"); + message.idempotency = $root.google.bigtable.v2.Idempotency.fromObject(object.idempotency, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {google.bigtable.v2.MutateRowsRequest.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.mutations = []; + if (options.defaults) { + if (options.bytes === String) + object.rowKey = ""; + else { + object.rowKey = []; + if (options.bytes !== Array) + object.rowKey = $util.newBuffer(object.rowKey); + } + object.idempotency = null; + } + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; + if (message.mutations && message.mutations.length) { + object.mutations = []; + for (var j = 0; j < message.mutations.length; ++j) + object.mutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.mutations[j], options, q + 1); + } + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) + object.idempotency = $root.google.bigtable.v2.Idempotency.toObject(message.idempotency, options, q + 1); + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof google.bigtable.v2.MutateRowsRequest.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.MutateRowsRequest.Entry"; + }; + + return Entry; + })(); + + return MutateRowsRequest; + })(); + + v2.MutateRowsResponse = (function() { + + /** + * Properties of a MutateRowsResponse. + * @memberof google.bigtable.v2 + * @interface IMutateRowsResponse + * @property {Array.|null} [entries] MutateRowsResponse entries + * @property {google.bigtable.v2.IRateLimitInfo|null} [rateLimitInfo] MutateRowsResponse rateLimitInfo + */ + + /** + * Constructs a new MutateRowsResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a MutateRowsResponse. + * @implements IMutateRowsResponse + * @constructor + * @param {google.bigtable.v2.IMutateRowsResponse=} [properties] Properties to set + */ + function MutateRowsResponse(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MutateRowsResponse entries. + * @member {Array.} entries + * @memberof google.bigtable.v2.MutateRowsResponse + * @instance + */ + 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; + + // Virtual OneOf for proto3 optional field + 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 + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {google.bigtable.v2.IMutateRowsResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse instance + */ + MutateRowsResponse.create = function create(properties) { + return new MutateRowsResponse(properties); + }; + + /** + * Encodes the specified MutateRowsResponse message. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {google.bigtable.v2.IMutateRowsResponse} message MutateRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateRowsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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(), q + 1).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(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutateRowsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {google.bigtable.v2.IMutateRowsResponse} message MutateRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MutateRowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateRowsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.bigtable.v2.MutateRowsResponse.Entry.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MutateRowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateRowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateRowsResponse message. + * @function verify + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateRowsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.bigtable.v2.MutateRowsResponse.Entry.verify(message.entries[i], long + 1); + if (error) + return "entries." + error; + } + } + if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) { + properties._rateLimitInfo = 1; + { + var error = $root.google.bigtable.v2.RateLimitInfo.verify(message.rateLimitInfo, long + 1); + if (error) + return "rateLimitInfo." + error; + } + } + return null; + }; + + /** + * Creates a MutateRowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.MutateRowsResponse} MutateRowsResponse + */ + MutateRowsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.MutateRowsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.MutateRowsResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.bigtable.v2.MutateRowsResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (!$util.isObject(object.entries[i])) + throw TypeError(".google.bigtable.v2.MutateRowsResponse.entries: object expected"); + message.entries[i] = $root.google.bigtable.v2.MutateRowsResponse.Entry.fromObject(object.entries[i], long + 1); + } + } + if (object.rateLimitInfo != null) { + if (!$util.isObject(object.rateLimitInfo)) + throw TypeError(".google.bigtable.v2.MutateRowsResponse.rateLimitInfo: object expected"); + message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.fromObject(object.rateLimitInfo, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MutateRowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {google.bigtable.v2.MutateRowsResponse} message MutateRowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateRowsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.bigtable.v2.MutateRowsResponse.Entry.toObject(message.entries[j], options, q + 1); + } + if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) { + object.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.toObject(message.rateLimitInfo, options, q + 1); + if (options.oneofs) + object._rateLimitInfo = "rateLimitInfo"; + } + return object; + }; + + /** + * Converts this MutateRowsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.MutateRowsResponse + * @instance + * @returns {Object.} JSON object + */ + MutateRowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateRowsResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.MutateRowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.MutateRowsResponse"; + }; + + MutateRowsResponse.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof google.bigtable.v2.MutateRowsResponse + * @interface IEntry + * @property {number|Long|null} [index] Entry index + * @property {google.rpc.IStatus|null} [status] Entry status + */ + + /** + * Constructs a new Entry. + * @memberof google.bigtable.v2.MutateRowsResponse + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.bigtable.v2.MutateRowsResponse.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry index. + * @member {number|Long} index + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @instance + */ + Entry.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Entry status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @instance + */ + Entry.prototype.status = null; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {google.bigtable.v2.MutateRowsResponse.IEntry=} [properties] Properties to set + * @returns {google.bigtable.v2.MutateRowsResponse.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.Entry.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {google.bigtable.v2.MutateRowsResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.index); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.bigtable.v2.MutateRowsResponse.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {google.bigtable.v2.MutateRowsResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.MutateRowsResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MutateRowsResponse.Entry(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.index = reader.int64(); + break; + } + case 2: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.MutateRowsResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { + var error = $root.google.rpc.Status.verify(message.status, long + 1); + if (error) + return "status." + error; + } + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.MutateRowsResponse.Entry} Entry + */ + Entry.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.MutateRowsResponse.Entry) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowsResponse.Entry: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.MutateRowsResponse.Entry(); + if (object.index != null) + if ($util.Long) + message.index = $util.Long.fromValue(object.index, false); + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.status != null) { + if (!$util.isObject(object.status)) + throw TypeError(".google.bigtable.v2.MutateRowsResponse.Entry.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {google.bigtable.v2.MutateRowsResponse.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.index = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.status = null; + } + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.index = typeof message.index === "number" ? BigInt(message.index) : $util.Long.fromBits(message.index.low >>> 0, message.index.high >>> 0, false).toBigInt(); + else if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + object.status = $root.google.rpc.Status.toObject(message.status, options, q + 1); + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof google.bigtable.v2.MutateRowsResponse.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.MutateRowsResponse.Entry"; + }; + + return Entry; + })(); + + return MutateRowsResponse; + })(); + + v2.RateLimitInfo = (function() { + + /** + * Properties of a RateLimitInfo. + * @memberof google.bigtable.v2 + * @interface IRateLimitInfo + * @property {google.protobuf.IDuration|null} [period] RateLimitInfo period + * @property {number|null} [factor] RateLimitInfo factor + */ + + /** + * Constructs a new RateLimitInfo. + * @memberof google.bigtable.v2 + * @classdesc Represents a RateLimitInfo. + * @implements IRateLimitInfo + * @constructor + * @param {google.bigtable.v2.IRateLimitInfo=} [properties] Properties to set + */ + function RateLimitInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RateLimitInfo period. + * @member {google.protobuf.IDuration|null|undefined} period + * @memberof google.bigtable.v2.RateLimitInfo + * @instance + */ + RateLimitInfo.prototype.period = null; + + /** + * RateLimitInfo factor. + * @member {number} factor + * @memberof google.bigtable.v2.RateLimitInfo + * @instance + */ + RateLimitInfo.prototype.factor = 0; + + /** + * Creates a new RateLimitInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {google.bigtable.v2.IRateLimitInfo=} [properties] Properties to set + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo instance + */ + RateLimitInfo.create = function create(properties) { + return new RateLimitInfo(properties); + }; + + /** + * Encodes the specified RateLimitInfo message. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. + * @function encode + * @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.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).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 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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RateLimitInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.factor = reader.double(); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.period != null && Object.hasOwnProperty.call(message, "period")) { + var error = $root.google.protobuf.Duration.verify(message.period, long + 1); + if (error) + return "period." + error; + } + if (message.factor != null && Object.hasOwnProperty.call(message, "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, long) { + if (object instanceof $root.google.bigtable.v2.RateLimitInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RateLimitInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RateLimitInfo(); + if (object.period != null) { + if (!$util.isObject(object.period)) + throw TypeError(".google.bigtable.v2.RateLimitInfo.period: object expected"); + message.period = $root.google.protobuf.Duration.fromObject(object.period, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.period = null; + object.factor = 0; + } + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + object.period = $root.google.protobuf.Duration.toObject(message.period, options, q + 1); + if (message.factor != null && Object.hasOwnProperty.call(message, "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} [authorizedViewName] CheckAndMutateRowRequest authorizedViewName + * @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 && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckAndMutateRowRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.tableName = ""; + + /** + * CheckAndMutateRowRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.authorizedViewName = ""; + + /** + * 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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(), q + 1).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(), q + 1).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(), q + 1).ldelim(); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.authorizedViewName); + 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 + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAndMutateRowRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 9: { + message.authorizedViewName = reader.string(); + break; + } + case 7: { + message.appProfileId = reader.string(); + break; + } + case 2: { + message.rowKey = reader.bytes(); + break; + } + case 6: { + message.predicateFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + if (!(message.trueMutations && message.trueMutations.length)) + message.trueMutations = []; + message.trueMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + if (!(message.falseMutations && message.falseMutations.length)) + message.falseMutations = []; + message.falseMutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CheckAndMutateRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAndMutateRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckAndMutateRowRequest message. + * @function verify + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckAndMutateRowRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter, long + 1); + if (error) + return "predicateFilter." + error; + } + if (message.trueMutations != null && Object.hasOwnProperty.call(message, "trueMutations")) { + if (!Array.isArray(message.trueMutations)) + return "trueMutations: array expected"; + for (var i = 0; i < message.trueMutations.length; ++i) { + var error = $root.google.bigtable.v2.Mutation.verify(message.trueMutations[i], long + 1); + if (error) + return "trueMutations." + error; + } + } + if (message.falseMutations != null && Object.hasOwnProperty.call(message, "falseMutations")) { + if (!Array.isArray(message.falseMutations)) + return "falseMutations: array expected"; + for (var i = 0; i < message.falseMutations.length; ++i) { + var error = $root.google.bigtable.v2.Mutation.verify(message.falseMutations[i], long + 1); + if (error) + return "falseMutations." + error; + } + } + return null; + }; + + /** + * Creates a CheckAndMutateRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest + */ + CheckAndMutateRowRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.CheckAndMutateRowRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.rowKey != null) + if (typeof object.rowKey === "string") + $util.base64.decode(object.rowKey, message.rowKey = $util.newBuffer($util.base64.length(object.rowKey)), 0); + else if (object.rowKey.length >= 0) + message.rowKey = object.rowKey; + if (object.predicateFilter != null) { + if (!$util.isObject(object.predicateFilter)) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.predicateFilter: object expected"); + message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter, long + 1); + } + if (object.trueMutations) { + if (!Array.isArray(object.trueMutations)) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.trueMutations: array expected"); + message.trueMutations = []; + for (var i = 0; i < object.trueMutations.length; ++i) { + if (!$util.isObject(object.trueMutations[i])) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.trueMutations: object expected"); + message.trueMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.trueMutations[i], long + 1); + } + } + if (object.falseMutations) { + if (!Array.isArray(object.falseMutations)) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.falseMutations: array expected"); + message.falseMutations = []; + for (var i = 0; i < object.falseMutations.length; ++i) { + if (!$util.isObject(object.falseMutations[i])) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.falseMutations: object expected"); + message.falseMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.falseMutations[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a CheckAndMutateRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @static + * @param {google.bigtable.v2.CheckAndMutateRowRequest} message CheckAndMutateRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckAndMutateRowRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.trueMutations = []; + object.falseMutations = []; + } + if (options.defaults) { + object.tableName = ""; + if (options.bytes === String) + object.rowKey = ""; + else { + object.rowKey = []; + if (options.bytes !== Array) + object.rowKey = $util.newBuffer(object.rowKey); + } + object.predicateFilter = null; + object.appProfileId = ""; + object.authorizedViewName = ""; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; + if (message.trueMutations && message.trueMutations.length) { + object.trueMutations = []; + for (var j = 0; j < message.trueMutations.length; ++j) + object.trueMutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.trueMutations[j], options, q + 1); + } + if (message.falseMutations && message.falseMutations.length) { + object.falseMutations = []; + for (var j = 0; j < message.falseMutations.length; ++j) + object.falseMutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.falseMutations[j], options, q + 1); + } + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) + object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options, q + 1); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + return object; + }; + + /** + * Converts this CheckAndMutateRowRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + * @returns {Object.} JSON object + */ + CheckAndMutateRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckAndMutateRowRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckAndMutateRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.CheckAndMutateRowRequest"; + }; + + return CheckAndMutateRowRequest; + })(); + + v2.CheckAndMutateRowResponse = (function() { + + /** + * Properties of a CheckAndMutateRowResponse. + * @memberof google.bigtable.v2 + * @interface ICheckAndMutateRowResponse + * @property {boolean|null} [predicateMatched] CheckAndMutateRowResponse predicateMatched + */ + + /** + * Constructs a new CheckAndMutateRowResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a CheckAndMutateRowResponse. + * @implements ICheckAndMutateRowResponse + * @constructor + * @param {google.bigtable.v2.ICheckAndMutateRowResponse=} [properties] Properties to set + */ + function CheckAndMutateRowResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckAndMutateRowResponse predicateMatched. + * @member {boolean} predicateMatched + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @instance + */ + CheckAndMutateRowResponse.prototype.predicateMatched = false; + + /** + * Creates a new CheckAndMutateRowResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {google.bigtable.v2.ICheckAndMutateRowResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse instance + */ + CheckAndMutateRowResponse.create = function create(properties) { + return new CheckAndMutateRowResponse(properties); + }; + + /** + * Encodes the specified CheckAndMutateRowResponse message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {google.bigtable.v2.ICheckAndMutateRowResponse} message CheckAndMutateRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAndMutateRowResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.predicateMatched != null && Object.hasOwnProperty.call(message, "predicateMatched")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.predicateMatched); + return writer; + }; + + /** + * Encodes the specified CheckAndMutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {google.bigtable.v2.ICheckAndMutateRowResponse} message CheckAndMutateRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAndMutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAndMutateRowResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CheckAndMutateRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.predicateMatched = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CheckAndMutateRowResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAndMutateRowResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckAndMutateRowResponse message. + * @function verify + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckAndMutateRowResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.predicateMatched != null && Object.hasOwnProperty.call(message, "predicateMatched")) + if (typeof message.predicateMatched !== "boolean") + return "predicateMatched: boolean expected"; + return null; + }; + + /** + * Creates a CheckAndMutateRowResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.CheckAndMutateRowResponse} CheckAndMutateRowResponse + */ + CheckAndMutateRowResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.CheckAndMutateRowResponse(); + if (object.predicateMatched != null) + message.predicateMatched = Boolean(object.predicateMatched); + return message; + }; + + /** + * Creates a plain object from a CheckAndMutateRowResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {google.bigtable.v2.CheckAndMutateRowResponse} message CheckAndMutateRowResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckAndMutateRowResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.predicateMatched = false; + if (message.predicateMatched != null && Object.hasOwnProperty.call(message, "predicateMatched")) + object.predicateMatched = message.predicateMatched; + return object; + }; + + /** + * Converts this CheckAndMutateRowResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @instance + * @returns {Object.} JSON object + */ + CheckAndMutateRowResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckAndMutateRowResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.CheckAndMutateRowResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckAndMutateRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.CheckAndMutateRowResponse"; + }; + + return CheckAndMutateRowResponse; + })(); + + v2.PingAndWarmRequest = (function() { + + /** + * Properties of a PingAndWarmRequest. + * @memberof google.bigtable.v2 + * @interface IPingAndWarmRequest + * @property {string|null} [name] PingAndWarmRequest name + * @property {string|null} [appProfileId] PingAndWarmRequest appProfileId + */ + + /** + * Constructs a new PingAndWarmRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a PingAndWarmRequest. + * @implements IPingAndWarmRequest + * @constructor + * @param {google.bigtable.v2.IPingAndWarmRequest=} [properties] Properties to set + */ + function PingAndWarmRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingAndWarmRequest name. + * @member {string} name + * @memberof google.bigtable.v2.PingAndWarmRequest + * @instance + */ + PingAndWarmRequest.prototype.name = ""; + + /** + * PingAndWarmRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.PingAndWarmRequest + * @instance + */ + PingAndWarmRequest.prototype.appProfileId = ""; + + /** + * Creates a new PingAndWarmRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {google.bigtable.v2.IPingAndWarmRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest instance + */ + PingAndWarmRequest.create = function create(properties) { + return new PingAndWarmRequest(properties); + }; + + /** + * Encodes the specified PingAndWarmRequest message. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {google.bigtable.v2.IPingAndWarmRequest} message PingAndWarmRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingAndWarmRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + return writer; + }; + + /** + * Encodes the specified PingAndWarmRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {google.bigtable.v2.IPingAndWarmRequest} message PingAndWarmRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingAndWarmRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PingAndWarmRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingAndWarmRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PingAndWarmRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingAndWarmRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingAndWarmRequest message. + * @function verify + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingAndWarmRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + return null; + }; + + /** + * Creates a PingAndWarmRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest + */ + PingAndWarmRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.PingAndWarmRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PingAndWarmRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.PingAndWarmRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + return message; + }; + + /** + * Creates a plain object from a PingAndWarmRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {google.bigtable.v2.PingAndWarmRequest} message PingAndWarmRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingAndWarmRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.appProfileId = ""; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + return object; + }; + + /** + * Converts this PingAndWarmRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PingAndWarmRequest + * @instance + * @returns {Object.} JSON object + */ + PingAndWarmRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingAndWarmRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingAndWarmRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.PingAndWarmRequest"; + }; + + return PingAndWarmRequest; + })(); + + v2.PingAndWarmResponse = (function() { + + /** + * Properties of a PingAndWarmResponse. + * @memberof google.bigtable.v2 + * @interface IPingAndWarmResponse + */ + + /** + * Constructs a new PingAndWarmResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a PingAndWarmResponse. + * @implements IPingAndWarmResponse + * @constructor + * @param {google.bigtable.v2.IPingAndWarmResponse=} [properties] Properties to set + */ + function PingAndWarmResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PingAndWarmResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {google.bigtable.v2.IPingAndWarmResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse instance + */ + PingAndWarmResponse.create = function create(properties) { + return new PingAndWarmResponse(properties); + }; + + /** + * Encodes the specified PingAndWarmResponse message. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {google.bigtable.v2.IPingAndWarmResponse} message PingAndWarmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingAndWarmResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified PingAndWarmResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {google.bigtable.v2.IPingAndWarmResponse} message PingAndWarmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingAndWarmResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PingAndWarmResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingAndWarmResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PingAndWarmResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingAndWarmResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingAndWarmResponse message. + * @function verify + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingAndWarmResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a PingAndWarmResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse + */ + PingAndWarmResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.PingAndWarmResponse) + return object; + return new $root.google.bigtable.v2.PingAndWarmResponse(); + }; + + /** + * Creates a plain object from a PingAndWarmResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {google.bigtable.v2.PingAndWarmResponse} message PingAndWarmResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingAndWarmResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PingAndWarmResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PingAndWarmResponse + * @instance + * @returns {Object.} JSON object + */ + PingAndWarmResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingAndWarmResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingAndWarmResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.PingAndWarmResponse"; + }; + + return PingAndWarmResponse; + })(); + + v2.ReadModifyWriteRowRequest = (function() { + + /** + * Properties of a ReadModifyWriteRowRequest. + * @memberof google.bigtable.v2 + * @interface IReadModifyWriteRowRequest + * @property {string|null} [tableName] ReadModifyWriteRowRequest tableName + * @property {string|null} [authorizedViewName] ReadModifyWriteRowRequest authorizedViewName + * @property {string|null} [appProfileId] ReadModifyWriteRowRequest appProfileId + * @property {Uint8Array|null} [rowKey] ReadModifyWriteRowRequest rowKey + * @property {Array.|null} [rules] ReadModifyWriteRowRequest rules + */ + + /** + * Constructs a new ReadModifyWriteRowRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a ReadModifyWriteRowRequest. + * @implements IReadModifyWriteRowRequest + * @constructor + * @param {google.bigtable.v2.IReadModifyWriteRowRequest=} [properties] Properties to set + */ + function ReadModifyWriteRowRequest(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadModifyWriteRowRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.tableName = ""; + + /** + * ReadModifyWriteRowRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.authorizedViewName = ""; + + /** + * ReadModifyWriteRowRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.appProfileId = ""; + + /** + * ReadModifyWriteRowRequest rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.rowKey = $util.newBuffer([]); + + /** + * ReadModifyWriteRowRequest rules. + * @member {Array.} rules + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.rules = $util.emptyArray; + + /** + * Creates a new ReadModifyWriteRowRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {google.bigtable.v2.IReadModifyWriteRowRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadModifyWriteRowRequest} ReadModifyWriteRowRequest instance + */ + ReadModifyWriteRowRequest.create = function create(properties) { + return new ReadModifyWriteRowRequest(properties); + }; + + /** + * Encodes the specified ReadModifyWriteRowRequest message. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {google.bigtable.v2.IReadModifyWriteRowRequest} message ReadModifyWriteRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadModifyWriteRowRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.bigtable.v2.ReadModifyWriteRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.authorizedViewName); + return writer; + }; + + /** + * Encodes the specified ReadModifyWriteRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {google.bigtable.v2.IReadModifyWriteRowRequest} message ReadModifyWriteRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadModifyWriteRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReadModifyWriteRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadModifyWriteRowRequest} ReadModifyWriteRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadModifyWriteRowRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 6: { + message.authorizedViewName = reader.string(); + break; + } + case 4: { + message.appProfileId = reader.string(); + break; + } + case 2: { + message.rowKey = reader.bytes(); + break; + } + case 3: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.bigtable.v2.ReadModifyWriteRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReadModifyWriteRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadModifyWriteRowRequest} ReadModifyWriteRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadModifyWriteRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadModifyWriteRowRequest message. + * @function verify + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadModifyWriteRowRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.bigtable.v2.ReadModifyWriteRule.verify(message.rules[i], long + 1); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates a ReadModifyWriteRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadModifyWriteRowRequest} ReadModifyWriteRowRequest + */ + ReadModifyWriteRowRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadModifyWriteRowRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.rowKey != null) + if (typeof object.rowKey === "string") + $util.base64.decode(object.rowKey, message.rowKey = $util.newBuffer($util.base64.length(object.rowKey)), 0); + else if (object.rowKey.length >= 0) + message.rowKey = object.rowKey; + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (!$util.isObject(object.rules[i])) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest.rules: object expected"); + message.rules[i] = $root.google.bigtable.v2.ReadModifyWriteRule.fromObject(object.rules[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ReadModifyWriteRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {google.bigtable.v2.ReadModifyWriteRowRequest} message ReadModifyWriteRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadModifyWriteRowRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) { + object.tableName = ""; + if (options.bytes === String) + object.rowKey = ""; + else { + object.rowKey = []; + if (options.bytes !== Array) + object.rowKey = $util.newBuffer(object.rowKey); + } + object.appProfileId = ""; + object.authorizedViewName = ""; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.bigtable.v2.ReadModifyWriteRule.toObject(message.rules[j], options, q + 1); + } + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + return object; + }; + + /** + * Converts this ReadModifyWriteRowRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + * @returns {Object.} JSON object + */ + ReadModifyWriteRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadModifyWriteRowRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadModifyWriteRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadModifyWriteRowRequest"; + }; + + return ReadModifyWriteRowRequest; + })(); + + v2.ReadModifyWriteRowResponse = (function() { + + /** + * Properties of a ReadModifyWriteRowResponse. + * @memberof google.bigtable.v2 + * @interface IReadModifyWriteRowResponse + * @property {google.bigtable.v2.IRow|null} [row] ReadModifyWriteRowResponse row + */ + + /** + * Constructs a new ReadModifyWriteRowResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a ReadModifyWriteRowResponse. + * @implements IReadModifyWriteRowResponse + * @constructor + * @param {google.bigtable.v2.IReadModifyWriteRowResponse=} [properties] Properties to set + */ + function ReadModifyWriteRowResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadModifyWriteRowResponse row. + * @member {google.bigtable.v2.IRow|null|undefined} row + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @instance + */ + ReadModifyWriteRowResponse.prototype.row = null; + + /** + * Creates a new ReadModifyWriteRowResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {google.bigtable.v2.IReadModifyWriteRowResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadModifyWriteRowResponse} ReadModifyWriteRowResponse instance + */ + ReadModifyWriteRowResponse.create = function create(properties) { + return new ReadModifyWriteRowResponse(properties); + }; + + /** + * Encodes the specified ReadModifyWriteRowResponse message. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {google.bigtable.v2.IReadModifyWriteRowResponse} message ReadModifyWriteRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadModifyWriteRowResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.row != null && Object.hasOwnProperty.call(message, "row")) + $root.google.bigtable.v2.Row.encode(message.row, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReadModifyWriteRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRowResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {google.bigtable.v2.IReadModifyWriteRowResponse} message ReadModifyWriteRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadModifyWriteRowResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReadModifyWriteRowResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadModifyWriteRowResponse} ReadModifyWriteRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadModifyWriteRowResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.row = $root.google.bigtable.v2.Row.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReadModifyWriteRowResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadModifyWriteRowResponse} ReadModifyWriteRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadModifyWriteRowResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadModifyWriteRowResponse message. + * @function verify + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadModifyWriteRowResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.row != null && Object.hasOwnProperty.call(message, "row")) { + var error = $root.google.bigtable.v2.Row.verify(message.row, long + 1); + if (error) + return "row." + error; + } + return null; + }; + + /** + * Creates a ReadModifyWriteRowResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadModifyWriteRowResponse} ReadModifyWriteRowResponse + */ + ReadModifyWriteRowResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); + if (object.row != null) { + if (!$util.isObject(object.row)) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowResponse.row: object expected"); + message.row = $root.google.bigtable.v2.Row.fromObject(object.row, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ReadModifyWriteRowResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {google.bigtable.v2.ReadModifyWriteRowResponse} message ReadModifyWriteRowResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadModifyWriteRowResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.row = null; + if (message.row != null && Object.hasOwnProperty.call(message, "row")) + object.row = $root.google.bigtable.v2.Row.toObject(message.row, options, q + 1); + return object; + }; + + /** + * Converts this ReadModifyWriteRowResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @instance + * @returns {Object.} JSON object + */ + ReadModifyWriteRowResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadModifyWriteRowResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadModifyWriteRowResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadModifyWriteRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadModifyWriteRowResponse"; + }; + + return ReadModifyWriteRowResponse; + })(); + + v2.GenerateInitialChangeStreamPartitionsRequest = (function() { + + /** + * Properties of a GenerateInitialChangeStreamPartitionsRequest. + * @memberof google.bigtable.v2 + * @interface IGenerateInitialChangeStreamPartitionsRequest + * @property {string|null} [tableName] GenerateInitialChangeStreamPartitionsRequest tableName + * @property {string|null} [appProfileId] GenerateInitialChangeStreamPartitionsRequest appProfileId + */ + + /** + * Constructs a new GenerateInitialChangeStreamPartitionsRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a GenerateInitialChangeStreamPartitionsRequest. + * @implements IGenerateInitialChangeStreamPartitionsRequest + * @constructor + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest=} [properties] Properties to set + */ + function GenerateInitialChangeStreamPartitionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateInitialChangeStreamPartitionsRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @instance + */ + GenerateInitialChangeStreamPartitionsRequest.prototype.tableName = ""; + + /** + * GenerateInitialChangeStreamPartitionsRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @instance + */ + GenerateInitialChangeStreamPartitionsRequest.prototype.appProfileId = ""; + + /** + * Creates a new GenerateInitialChangeStreamPartitionsRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} GenerateInitialChangeStreamPartitionsRequest instance + */ + GenerateInitialChangeStreamPartitionsRequest.create = function create(properties) { + return new GenerateInitialChangeStreamPartitionsRequest(properties); + }; + + /** + * Encodes the specified GenerateInitialChangeStreamPartitionsRequest message. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest} message GenerateInitialChangeStreamPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateInitialChangeStreamPartitionsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + return writer; + }; + + /** + * Encodes the specified GenerateInitialChangeStreamPartitionsRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest} message GenerateInitialChangeStreamPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateInitialChangeStreamPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GenerateInitialChangeStreamPartitionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} GenerateInitialChangeStreamPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateInitialChangeStreamPartitionsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateInitialChangeStreamPartitionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} GenerateInitialChangeStreamPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateInitialChangeStreamPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateInitialChangeStreamPartitionsRequest message. + * @function verify + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateInitialChangeStreamPartitionsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + return null; + }; + + /** + * Creates a GenerateInitialChangeStreamPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} GenerateInitialChangeStreamPartitionsRequest + */ + GenerateInitialChangeStreamPartitionsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + return message; + }; + + /** + * Creates a plain object from a GenerateInitialChangeStreamPartitionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} message GenerateInitialChangeStreamPartitionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateInitialChangeStreamPartitionsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + return object; + }; + + /** + * Converts this GenerateInitialChangeStreamPartitionsRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateInitialChangeStreamPartitionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateInitialChangeStreamPartitionsRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateInitialChangeStreamPartitionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest"; + }; + + return GenerateInitialChangeStreamPartitionsRequest; + })(); + + v2.GenerateInitialChangeStreamPartitionsResponse = (function() { + + /** + * Properties of a GenerateInitialChangeStreamPartitionsResponse. + * @memberof google.bigtable.v2 + * @interface IGenerateInitialChangeStreamPartitionsResponse + * @property {google.bigtable.v2.IStreamPartition|null} [partition] GenerateInitialChangeStreamPartitionsResponse partition + */ + + /** + * Constructs a new GenerateInitialChangeStreamPartitionsResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a GenerateInitialChangeStreamPartitionsResponse. + * @implements IGenerateInitialChangeStreamPartitionsResponse + * @constructor + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse=} [properties] Properties to set + */ + function GenerateInitialChangeStreamPartitionsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateInitialChangeStreamPartitionsResponse partition. + * @member {google.bigtable.v2.IStreamPartition|null|undefined} partition + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @instance + */ + GenerateInitialChangeStreamPartitionsResponse.prototype.partition = null; + + /** + * Creates a new GenerateInitialChangeStreamPartitionsResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} GenerateInitialChangeStreamPartitionsResponse instance + */ + GenerateInitialChangeStreamPartitionsResponse.create = function create(properties) { + return new GenerateInitialChangeStreamPartitionsResponse(properties); + }; + + /** + * Encodes the specified GenerateInitialChangeStreamPartitionsResponse message. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse} message GenerateInitialChangeStreamPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateInitialChangeStreamPartitionsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateInitialChangeStreamPartitionsResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {google.bigtable.v2.IGenerateInitialChangeStreamPartitionsResponse} message GenerateInitialChangeStreamPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateInitialChangeStreamPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GenerateInitialChangeStreamPartitionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} GenerateInitialChangeStreamPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateInitialChangeStreamPartitionsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateInitialChangeStreamPartitionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} GenerateInitialChangeStreamPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateInitialChangeStreamPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateInitialChangeStreamPartitionsResponse message. + * @function verify + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateInitialChangeStreamPartitionsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition, long + 1); + if (error) + return "partition." + error; + } + return null; + }; + + /** + * Creates a GenerateInitialChangeStreamPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} GenerateInitialChangeStreamPartitionsResponse + */ + GenerateInitialChangeStreamPartitionsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); + if (object.partition != null) { + if (!$util.isObject(object.partition)) + throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a GenerateInitialChangeStreamPartitionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} message GenerateInitialChangeStreamPartitionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateInitialChangeStreamPartitionsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.partition = null; + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options, q + 1); + return object; + }; + + /** + * Converts this GenerateInitialChangeStreamPartitionsResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateInitialChangeStreamPartitionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateInitialChangeStreamPartitionsResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateInitialChangeStreamPartitionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse"; + }; + + return GenerateInitialChangeStreamPartitionsResponse; + })(); + + v2.ReadChangeStreamRequest = (function() { + + /** + * Properties of a ReadChangeStreamRequest. + * @memberof google.bigtable.v2 + * @interface IReadChangeStreamRequest + * @property {string|null} [tableName] ReadChangeStreamRequest tableName + * @property {string|null} [appProfileId] ReadChangeStreamRequest appProfileId + * @property {google.bigtable.v2.IStreamPartition|null} [partition] ReadChangeStreamRequest partition + * @property {google.protobuf.ITimestamp|null} [startTime] ReadChangeStreamRequest startTime + * @property {google.bigtable.v2.IStreamContinuationTokens|null} [continuationTokens] ReadChangeStreamRequest continuationTokens + * @property {google.protobuf.ITimestamp|null} [endTime] ReadChangeStreamRequest endTime + * @property {google.protobuf.IDuration|null} [heartbeatDuration] ReadChangeStreamRequest heartbeatDuration + */ + + /** + * Constructs a new ReadChangeStreamRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a ReadChangeStreamRequest. + * @implements IReadChangeStreamRequest + * @constructor + * @param {google.bigtable.v2.IReadChangeStreamRequest=} [properties] Properties to set + */ + function ReadChangeStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadChangeStreamRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.tableName = ""; + + /** + * ReadChangeStreamRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.appProfileId = ""; + + /** + * ReadChangeStreamRequest partition. + * @member {google.bigtable.v2.IStreamPartition|null|undefined} partition + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.partition = null; + + /** + * ReadChangeStreamRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.startTime = null; + + /** + * ReadChangeStreamRequest continuationTokens. + * @member {google.bigtable.v2.IStreamContinuationTokens|null|undefined} continuationTokens + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.continuationTokens = null; + + /** + * ReadChangeStreamRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.endTime = null; + + /** + * ReadChangeStreamRequest heartbeatDuration. + * @member {google.protobuf.IDuration|null|undefined} heartbeatDuration + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + ReadChangeStreamRequest.prototype.heartbeatDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReadChangeStreamRequest startFrom. + * @member {"startTime"|"continuationTokens"|undefined} startFrom + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + */ + Object.defineProperty(ReadChangeStreamRequest.prototype, "startFrom", { + get: $util.oneOfGetter($oneOfFields = ["startTime", "continuationTokens"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReadChangeStreamRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {google.bigtable.v2.IReadChangeStreamRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest instance + */ + ReadChangeStreamRequest.create = function create(properties) { + return new ReadChangeStreamRequest(properties); + }; + + /** + * Encodes the specified ReadChangeStreamRequest message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {google.bigtable.v2.IReadChangeStreamRequest} message ReadChangeStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadChangeStreamRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.continuationTokens != null && Object.hasOwnProperty.call(message, "continuationTokens")) + $root.google.bigtable.v2.StreamContinuationTokens.encode(message.continuationTokens, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.heartbeatDuration != null && Object.hasOwnProperty.call(message, "heartbeatDuration")) + $root.google.protobuf.Duration.encode(message.heartbeatDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReadChangeStreamRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {google.bigtable.v2.IReadChangeStreamRequest} message ReadChangeStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadChangeStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReadChangeStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadChangeStreamRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + case 3: { + message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.heartbeatDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReadChangeStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadChangeStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadChangeStreamRequest message. + * @function verify + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadChangeStreamRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition, long + 1); + if (error) + return "partition." + error; + } + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + properties.startFrom = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + } + if (message.continuationTokens != null && Object.hasOwnProperty.call(message, "continuationTokens")) { + if (properties.startFrom === 1) + return "startFrom: multiple values"; + properties.startFrom = 1; + { + var error = $root.google.bigtable.v2.StreamContinuationTokens.verify(message.continuationTokens, long + 1); + if (error) + return "continuationTokens." + error; + } + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + if (message.heartbeatDuration != null && Object.hasOwnProperty.call(message, "heartbeatDuration")) { + var error = $root.google.protobuf.Duration.verify(message.heartbeatDuration, long + 1); + if (error) + return "heartbeatDuration." + error; + } + return null; + }; + + /** + * Creates a ReadChangeStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadChangeStreamRequest} ReadChangeStreamRequest + */ + ReadChangeStreamRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadChangeStreamRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.partition != null) { + if (!$util.isObject(object.partition)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition, long + 1); + } + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.continuationTokens != null) { + if (!$util.isObject(object.continuationTokens)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.continuationTokens: object expected"); + message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.fromObject(object.continuationTokens, long + 1); + } + if (object.endTime != null) { + if (!$util.isObject(object.endTime)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + if (object.heartbeatDuration != null) { + if (!$util.isObject(object.heartbeatDuration)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.heartbeatDuration: object expected"); + message.heartbeatDuration = $root.google.protobuf.Duration.fromObject(object.heartbeatDuration, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ReadChangeStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {google.bigtable.v2.ReadChangeStreamRequest} message ReadChangeStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadChangeStreamRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.partition = null; + object.endTime = null; + object.heartbeatDuration = null; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (options.oneofs) + object.startFrom = "startTime"; + } + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.continuationTokens != null && Object.hasOwnProperty.call(message, "continuationTokens")) { + object.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.toObject(message.continuationTokens, options, q + 1); + if (options.oneofs) + object.startFrom = "continuationTokens"; + } + if (message.heartbeatDuration != null && Object.hasOwnProperty.call(message, "heartbeatDuration")) + object.heartbeatDuration = $root.google.protobuf.Duration.toObject(message.heartbeatDuration, options, q + 1); + return object; + }; + + /** + * Converts this ReadChangeStreamRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @instance + * @returns {Object.} JSON object + */ + ReadChangeStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadChangeStreamRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadChangeStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadChangeStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamRequest"; + }; + + return ReadChangeStreamRequest; + })(); + + v2.ReadChangeStreamResponse = (function() { + + /** + * Properties of a ReadChangeStreamResponse. + * @memberof google.bigtable.v2 + * @interface IReadChangeStreamResponse + * @property {google.bigtable.v2.ReadChangeStreamResponse.IDataChange|null} [dataChange] ReadChangeStreamResponse dataChange + * @property {google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat|null} [heartbeat] ReadChangeStreamResponse heartbeat + * @property {google.bigtable.v2.ReadChangeStreamResponse.ICloseStream|null} [closeStream] ReadChangeStreamResponse closeStream + */ + + /** + * Constructs a new ReadChangeStreamResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a ReadChangeStreamResponse. + * @implements IReadChangeStreamResponse + * @constructor + * @param {google.bigtable.v2.IReadChangeStreamResponse=} [properties] Properties to set + */ + function ReadChangeStreamResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadChangeStreamResponse dataChange. + * @member {google.bigtable.v2.ReadChangeStreamResponse.IDataChange|null|undefined} dataChange + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @instance + */ + ReadChangeStreamResponse.prototype.dataChange = null; + + /** + * ReadChangeStreamResponse heartbeat. + * @member {google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat|null|undefined} heartbeat + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @instance + */ + ReadChangeStreamResponse.prototype.heartbeat = null; + + /** + * ReadChangeStreamResponse closeStream. + * @member {google.bigtable.v2.ReadChangeStreamResponse.ICloseStream|null|undefined} closeStream + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @instance + */ + ReadChangeStreamResponse.prototype.closeStream = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReadChangeStreamResponse streamRecord. + * @member {"dataChange"|"heartbeat"|"closeStream"|undefined} streamRecord + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @instance + */ + Object.defineProperty(ReadChangeStreamResponse.prototype, "streamRecord", { + get: $util.oneOfGetter($oneOfFields = ["dataChange", "heartbeat", "closeStream"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReadChangeStreamResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {google.bigtable.v2.IReadChangeStreamResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse instance + */ + ReadChangeStreamResponse.create = function create(properties) { + return new ReadChangeStreamResponse(properties); + }; + + /** + * Encodes the specified ReadChangeStreamResponse message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {google.bigtable.v2.IReadChangeStreamResponse} message ReadChangeStreamResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadChangeStreamResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.dataChange != null && Object.hasOwnProperty.call(message, "dataChange")) + $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.encode(message.dataChange, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) + $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.encode(message.heartbeat, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.closeStream != null && Object.hasOwnProperty.call(message, "closeStream")) + $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.encode(message.closeStream, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReadChangeStreamResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {google.bigtable.v2.IReadChangeStreamResponse} message ReadChangeStreamResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadChangeStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReadChangeStreamResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadChangeStreamResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReadChangeStreamResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadChangeStreamResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadChangeStreamResponse message. + * @function verify + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadChangeStreamResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.dataChange != null && Object.hasOwnProperty.call(message, "dataChange")) { + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify(message.dataChange, long + 1); + if (error) + return "dataChange." + error; + } + } + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) { + if (properties.streamRecord === 1) + return "streamRecord: multiple values"; + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify(message.heartbeat, long + 1); + if (error) + return "heartbeat." + error; + } + } + if (message.closeStream != null && Object.hasOwnProperty.call(message, "closeStream")) { + if (properties.streamRecord === 1) + return "streamRecord: multiple values"; + properties.streamRecord = 1; + { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify(message.closeStream, long + 1); + if (error) + return "closeStream." + error; + } + } + return null; + }; + + /** + * Creates a ReadChangeStreamResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadChangeStreamResponse} ReadChangeStreamResponse + */ + ReadChangeStreamResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); + if (object.dataChange != null) { + if (!$util.isObject(object.dataChange)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.dataChange: object expected"); + message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.fromObject(object.dataChange, long + 1); + } + if (object.heartbeat != null) { + if (!$util.isObject(object.heartbeat)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.heartbeat: object expected"); + message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.fromObject(object.heartbeat, long + 1); + } + if (object.closeStream != null) { + if (!$util.isObject(object.closeStream)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.closeStream: object expected"); + message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.fromObject(object.closeStream, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ReadChangeStreamResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse} message ReadChangeStreamResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadChangeStreamResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.dataChange != null && Object.hasOwnProperty.call(message, "dataChange")) { + object.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.toObject(message.dataChange, options, q + 1); + if (options.oneofs) + object.streamRecord = "dataChange"; + } + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) { + object.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.toObject(message.heartbeat, options, q + 1); + if (options.oneofs) + object.streamRecord = "heartbeat"; + } + if (message.closeStream != null && Object.hasOwnProperty.call(message, "closeStream")) { + object.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.toObject(message.closeStream, options, q + 1); + if (options.oneofs) + object.streamRecord = "closeStream"; + } + return object; + }; + + /** + * Converts this ReadChangeStreamResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @instance + * @returns {Object.} JSON object + */ + ReadChangeStreamResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadChangeStreamResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadChangeStreamResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse"; + }; + + ReadChangeStreamResponse.MutationChunk = (function() { + + /** + * Properties of a MutationChunk. + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @interface IMutationChunk + * @property {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo|null} [chunkInfo] MutationChunk chunkInfo + * @property {google.bigtable.v2.IMutation|null} [mutation] MutationChunk mutation + */ + + /** + * Constructs a new MutationChunk. + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @classdesc Represents a MutationChunk. + * @implements IMutationChunk + * @constructor + * @param {google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk=} [properties] Properties to set + */ + function MutationChunk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MutationChunk chunkInfo. + * @member {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo|null|undefined} chunkInfo + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @instance + */ + MutationChunk.prototype.chunkInfo = null; + + /** + * MutationChunk mutation. + * @member {google.bigtable.v2.IMutation|null|undefined} mutation + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @instance + */ + MutationChunk.prototype.mutation = null; + + /** + * Creates a new MutationChunk instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} MutationChunk instance + */ + MutationChunk.create = function create(properties) { + return new MutationChunk(properties); + }; + + /** + * Encodes the specified MutationChunk message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk} message MutationChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutationChunk.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.chunkInfo != null && Object.hasOwnProperty.call(message, "chunkInfo")) + $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.encode(message.chunkInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.mutation != null && Object.hasOwnProperty.call(message, "mutation")) + $root.google.bigtable.v2.Mutation.encode(message.mutation, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutationChunk message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IMutationChunk} message MutationChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutationChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MutationChunk message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} MutationChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutationChunk.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.mutation = $root.google.bigtable.v2.Mutation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MutationChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} MutationChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutationChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutationChunk message. + * @function verify + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutationChunk.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.chunkInfo != null && Object.hasOwnProperty.call(message, "chunkInfo")) { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify(message.chunkInfo, long + 1); + if (error) + return "chunkInfo." + error; + } + if (message.mutation != null && Object.hasOwnProperty.call(message, "mutation")) { + var error = $root.google.bigtable.v2.Mutation.verify(message.mutation, long + 1); + if (error) + return "mutation." + error; + } + return null; + }; + + /** + * Creates a MutationChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} MutationChunk + */ + MutationChunk.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(); + if (object.chunkInfo != null) { + if (!$util.isObject(object.chunkInfo)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.chunkInfo: object expected"); + message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.fromObject(object.chunkInfo, long + 1); + } + if (object.mutation != null) { + if (!$util.isObject(object.mutation)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.mutation: object expected"); + message.mutation = $root.google.bigtable.v2.Mutation.fromObject(object.mutation, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MutationChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} message MutationChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutationChunk.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.chunkInfo = null; + object.mutation = null; + } + if (message.chunkInfo != null && Object.hasOwnProperty.call(message, "chunkInfo")) + object.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.toObject(message.chunkInfo, options, q + 1); + if (message.mutation != null && Object.hasOwnProperty.call(message, "mutation")) + object.mutation = $root.google.bigtable.v2.Mutation.toObject(message.mutation, options, q + 1); + return object; + }; + + /** + * Converts this MutationChunk to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @instance + * @returns {Object.} JSON object + */ + MutationChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutationChunk + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutationChunk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse.MutationChunk"; + }; + + MutationChunk.ChunkInfo = (function() { + + /** + * Properties of a ChunkInfo. + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @interface IChunkInfo + * @property {number|null} [chunkedValueSize] ChunkInfo chunkedValueSize + * @property {number|null} [chunkedValueOffset] ChunkInfo chunkedValueOffset + * @property {boolean|null} [lastChunk] ChunkInfo lastChunk + */ + + /** + * Constructs a new ChunkInfo. + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + * @classdesc Represents a ChunkInfo. + * @implements IChunkInfo + * @constructor + * @param {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo=} [properties] Properties to set + */ + function ChunkInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChunkInfo chunkedValueSize. + * @member {number} chunkedValueSize + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @instance + */ + ChunkInfo.prototype.chunkedValueSize = 0; + + /** + * ChunkInfo chunkedValueOffset. + * @member {number} chunkedValueOffset + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @instance + */ + ChunkInfo.prototype.chunkedValueOffset = 0; + + /** + * ChunkInfo lastChunk. + * @member {boolean} lastChunk + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @instance + */ + ChunkInfo.prototype.lastChunk = false; + + /** + * Creates a new ChunkInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} ChunkInfo instance + */ + ChunkInfo.create = function create(properties) { + return new ChunkInfo(properties); + }; + + /** + * Encodes the specified ChunkInfo message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo} message ChunkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.chunkedValueSize != null && Object.hasOwnProperty.call(message, "chunkedValueSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chunkedValueSize); + if (message.chunkedValueOffset != null && Object.hasOwnProperty.call(message, "chunkedValueOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.chunkedValueOffset); + if (message.lastChunk != null && Object.hasOwnProperty.call(message, "lastChunk")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.lastChunk); + return writer; + }; + + /** + * Encodes the specified ChunkInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.IChunkInfo} message ChunkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ChunkInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} ChunkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.chunkedValueSize = reader.int32(); + break; + } + case 2: { + message.chunkedValueOffset = reader.int32(); + break; + } + case 3: { + message.lastChunk = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ChunkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} ChunkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChunkInfo message. + * @function verify + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChunkInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.chunkedValueSize != null && Object.hasOwnProperty.call(message, "chunkedValueSize")) + if (!$util.isInteger(message.chunkedValueSize)) + return "chunkedValueSize: integer expected"; + if (message.chunkedValueOffset != null && Object.hasOwnProperty.call(message, "chunkedValueOffset")) + if (!$util.isInteger(message.chunkedValueOffset)) + return "chunkedValueOffset: integer expected"; + if (message.lastChunk != null && Object.hasOwnProperty.call(message, "lastChunk")) + if (typeof message.lastChunk !== "boolean") + return "lastChunk: boolean expected"; + return null; + }; + + /** + * Creates a ChunkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} ChunkInfo + */ + ChunkInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo(); + if (object.chunkedValueSize != null) + message.chunkedValueSize = object.chunkedValueSize | 0; + if (object.chunkedValueOffset != null) + message.chunkedValueOffset = object.chunkedValueOffset | 0; + if (object.lastChunk != null) + message.lastChunk = Boolean(object.lastChunk); + return message; + }; + + /** + * Creates a plain object from a ChunkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} message ChunkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChunkInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.chunkedValueSize = 0; + object.chunkedValueOffset = 0; + object.lastChunk = false; + } + if (message.chunkedValueSize != null && Object.hasOwnProperty.call(message, "chunkedValueSize")) + object.chunkedValueSize = message.chunkedValueSize; + if (message.chunkedValueOffset != null && Object.hasOwnProperty.call(message, "chunkedValueOffset")) + object.chunkedValueOffset = message.chunkedValueOffset; + if (message.lastChunk != null && Object.hasOwnProperty.call(message, "lastChunk")) + object.lastChunk = message.lastChunk; + return object; + }; + + /** + * Converts this ChunkInfo to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @instance + * @returns {Object.} JSON object + */ + ChunkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChunkInfo + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChunkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo"; + }; + + return ChunkInfo; + })(); + + return MutationChunk; + })(); + + ReadChangeStreamResponse.DataChange = (function() { + + /** + * Properties of a DataChange. + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @interface IDataChange + * @property {google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type|null} [type] DataChange type + * @property {string|null} [sourceClusterId] DataChange sourceClusterId + * @property {Uint8Array|null} [rowKey] DataChange rowKey + * @property {google.protobuf.ITimestamp|null} [commitTimestamp] DataChange commitTimestamp + * @property {number|null} [tiebreaker] DataChange tiebreaker + * @property {Array.|null} [chunks] DataChange chunks + * @property {boolean|null} [done] DataChange done + * @property {string|null} [token] DataChange token + * @property {google.protobuf.ITimestamp|null} [estimatedLowWatermark] DataChange estimatedLowWatermark + */ + + /** + * Constructs a new DataChange. + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @classdesc Represents a DataChange. + * @implements IDataChange + * @constructor + * @param {google.bigtable.v2.ReadChangeStreamResponse.IDataChange=} [properties] Properties to set + */ + function DataChange(properties) { + this.chunks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataChange type. + * @member {google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type} type + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.type = 0; + + /** + * DataChange sourceClusterId. + * @member {string} sourceClusterId + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.sourceClusterId = ""; + + /** + * DataChange rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.rowKey = $util.newBuffer([]); + + /** + * DataChange commitTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} commitTimestamp + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.commitTimestamp = null; + + /** + * DataChange tiebreaker. + * @member {number} tiebreaker + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.tiebreaker = 0; + + /** + * DataChange chunks. + * @member {Array.} chunks + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.chunks = $util.emptyArray; + + /** + * DataChange done. + * @member {boolean} done + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.done = false; + + /** + * DataChange token. + * @member {string} token + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.token = ""; + + /** + * DataChange estimatedLowWatermark. + * @member {google.protobuf.ITimestamp|null|undefined} estimatedLowWatermark + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + */ + DataChange.prototype.estimatedLowWatermark = null; + + /** + * Creates a new DataChange instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IDataChange=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamResponse.DataChange} DataChange instance + */ + DataChange.create = function create(properties) { + return new DataChange(properties); + }; + + /** + * Encodes the specified DataChange message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IDataChange} message DataChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataChange.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.sourceClusterId != null && Object.hasOwnProperty.call(message, "sourceClusterId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceClusterId); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.rowKey); + if (message.commitTimestamp != null && Object.hasOwnProperty.call(message, "commitTimestamp")) + $root.google.protobuf.Timestamp.encode(message.commitTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.tiebreaker != null && Object.hasOwnProperty.call(message, "tiebreaker")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.tiebreaker); + if (message.chunks != null && message.chunks.length) + for (var i = 0; i < message.chunks.length; ++i) + $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.encode(message.chunks[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.done); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.token); + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) + $root.google.protobuf.Timestamp.encode(message.estimatedLowWatermark, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataChange message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IDataChange} message DataChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DataChange message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadChangeStreamResponse.DataChange} DataChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataChange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.sourceClusterId = reader.string(); + break; + } + case 3: { + message.rowKey = reader.bytes(); + break; + } + case 4: { + message.commitTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.tiebreaker = reader.int32(); + break; + } + case 6: { + if (!(message.chunks && message.chunks.length)) + message.chunks = []; + message.chunks.push($root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + message.done = reader.bool(); + break; + } + case 9: { + message.token = reader.string(); + break; + } + case 10: { + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadChangeStreamResponse.DataChange} DataChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataChange message. + * @function verify + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataChange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sourceClusterId != null && Object.hasOwnProperty.call(message, "sourceClusterId")) + if (!$util.isString(message.sourceClusterId)) + return "sourceClusterId: string expected"; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) + return "rowKey: buffer expected"; + if (message.commitTimestamp != null && Object.hasOwnProperty.call(message, "commitTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp, long + 1); + if (error) + return "commitTimestamp." + error; + } + if (message.tiebreaker != null && Object.hasOwnProperty.call(message, "tiebreaker")) + if (!$util.isInteger(message.tiebreaker)) + return "tiebreaker: integer expected"; + if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) { + if (!Array.isArray(message.chunks)) + return "chunks: array expected"; + for (var i = 0; i < message.chunks.length; ++i) { + var error = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.verify(message.chunks[i], long + 1); + if (error) + return "chunks." + error; + } + } + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) { + var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark, long + 1); + if (error) + return "estimatedLowWatermark." + error; + } + return null; + }; + + /** + * Creates a DataChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadChangeStreamResponse.DataChange} DataChange + */ + DataChange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "USER": + case 1: + message.type = 1; + break; + case "GARBAGE_COLLECTION": + case 2: + message.type = 2; + break; + case "CONTINUATION": + case 3: + message.type = 3; + break; + } + if (object.sourceClusterId != null) + message.sourceClusterId = String(object.sourceClusterId); + if (object.rowKey != null) + if (typeof object.rowKey === "string") + $util.base64.decode(object.rowKey, message.rowKey = $util.newBuffer($util.base64.length(object.rowKey)), 0); + else if (object.rowKey.length >= 0) + message.rowKey = object.rowKey; + if (object.commitTimestamp != null) { + if (!$util.isObject(object.commitTimestamp)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.commitTimestamp: object expected"); + message.commitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.commitTimestamp, long + 1); + } + if (object.tiebreaker != null) + message.tiebreaker = object.tiebreaker | 0; + if (object.chunks) { + if (!Array.isArray(object.chunks)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.chunks: array expected"); + message.chunks = []; + for (var i = 0; i < object.chunks.length; ++i) { + if (!$util.isObject(object.chunks[i])) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.chunks: object expected"); + message.chunks[i] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.fromObject(object.chunks[i], long + 1); + } + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.token != null) + message.token = String(object.token); + if (object.estimatedLowWatermark != null) { + if (!$util.isObject(object.estimatedLowWatermark)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.estimatedLowWatermark: object expected"); + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DataChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.DataChange} message DataChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataChange.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.chunks = []; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.sourceClusterId = ""; + if (options.bytes === String) + object.rowKey = ""; + else { + object.rowKey = []; + if (options.bytes !== Array) + object.rowKey = $util.newBuffer(object.rowKey); + } + object.commitTimestamp = null; + object.tiebreaker = 0; + object.done = false; + object.token = ""; + object.estimatedLowWatermark = null; + } + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === String ? $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type[message.type] === undefined ? message.type : $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type[message.type] : message.type; + if (message.sourceClusterId != null && Object.hasOwnProperty.call(message, "sourceClusterId")) + object.sourceClusterId = message.sourceClusterId; + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; + if (message.commitTimestamp != null && Object.hasOwnProperty.call(message, "commitTimestamp")) + object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options, q + 1); + if (message.tiebreaker != null && Object.hasOwnProperty.call(message, "tiebreaker")) + object.tiebreaker = message.tiebreaker; + if (message.chunks && message.chunks.length) { + object.chunks = []; + for (var j = 0; j < message.chunks.length; ++j) + object.chunks[j] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.toObject(message.chunks[j], options, q + 1); + } + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + object.done = message.done; + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + object.token = message.token; + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) + object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options, q + 1); + return object; + }; + + /** + * Converts this DataChange to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @instance + * @returns {Object.} JSON object + */ + DataChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataChange + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadChangeStreamResponse.DataChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse.DataChange"; + }; + + /** + * Type enum. + * @name google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} USER=1 USER value + * @property {number} GARBAGE_COLLECTION=2 GARBAGE_COLLECTION value + * @property {number} CONTINUATION=3 CONTINUATION value + */ + DataChange.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER"] = 1; + values[valuesById[2] = "GARBAGE_COLLECTION"] = 2; + values[valuesById[3] = "CONTINUATION"] = 3; + return values; + })(); + + return DataChange; + })(); + + ReadChangeStreamResponse.Heartbeat = (function() { + + /** + * Properties of a Heartbeat. + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @interface IHeartbeat + * @property {google.bigtable.v2.IStreamContinuationToken|null} [continuationToken] Heartbeat continuationToken + * @property {google.protobuf.ITimestamp|null} [estimatedLowWatermark] Heartbeat estimatedLowWatermark + */ + + /** + * Constructs a new Heartbeat. + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @classdesc Represents a Heartbeat. + * @implements IHeartbeat + * @constructor + * @param {google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat=} [properties] Properties to set + */ + function Heartbeat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Heartbeat continuationToken. + * @member {google.bigtable.v2.IStreamContinuationToken|null|undefined} continuationToken + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @instance + */ + Heartbeat.prototype.continuationToken = null; + + /** + * Heartbeat estimatedLowWatermark. + * @member {google.protobuf.ITimestamp|null|undefined} estimatedLowWatermark + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @instance + */ + Heartbeat.prototype.estimatedLowWatermark = null; + + /** + * Creates a new Heartbeat instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} Heartbeat instance + */ + Heartbeat.create = function create(properties) { + return new Heartbeat(properties); + }; + + /** + * Encodes the specified Heartbeat message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat} message Heartbeat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Heartbeat.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) + $root.google.bigtable.v2.StreamContinuationToken.encode(message.continuationToken, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) + $root.google.protobuf.Timestamp.encode(message.estimatedLowWatermark, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Heartbeat message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.IHeartbeat} message Heartbeat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Heartbeat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Heartbeat message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} Heartbeat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Heartbeat.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Heartbeat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} Heartbeat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Heartbeat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Heartbeat message. + * @function verify + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Heartbeat.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) { + var error = $root.google.bigtable.v2.StreamContinuationToken.verify(message.continuationToken, long + 1); + if (error) + return "continuationToken." + error; + } + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) { + var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark, long + 1); + if (error) + return "estimatedLowWatermark." + error; + } + return null; + }; + + /** + * Creates a Heartbeat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} Heartbeat + */ + Heartbeat.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(); + if (object.continuationToken != null) { + if (!$util.isObject(object.continuationToken)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.continuationToken: object expected"); + message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationToken, long + 1); + } + if (object.estimatedLowWatermark != null) { + if (!$util.isObject(object.estimatedLowWatermark)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.estimatedLowWatermark: object expected"); + message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Heartbeat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} message Heartbeat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Heartbeat.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.continuationToken = null; + object.estimatedLowWatermark = null; + } + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) + object.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationToken, options, q + 1); + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) + object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options, q + 1); + return object; + }; + + /** + * Converts this Heartbeat to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @instance + * @returns {Object.} JSON object + */ + Heartbeat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Heartbeat + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Heartbeat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse.Heartbeat"; + }; + + return Heartbeat; + })(); + + ReadChangeStreamResponse.CloseStream = (function() { + + /** + * Properties of a CloseStream. + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @interface ICloseStream + * @property {google.rpc.IStatus|null} [status] CloseStream status + * @property {Array.|null} [continuationTokens] CloseStream continuationTokens + * @property {Array.|null} [newPartitions] CloseStream newPartitions + */ + + /** + * Constructs a new CloseStream. + * @memberof google.bigtable.v2.ReadChangeStreamResponse + * @classdesc Represents a CloseStream. + * @implements ICloseStream + * @constructor + * @param {google.bigtable.v2.ReadChangeStreamResponse.ICloseStream=} [properties] Properties to set + */ + function CloseStream(properties) { + this.continuationTokens = []; + this.newPartitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloseStream status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @instance + */ + CloseStream.prototype.status = null; + + /** + * CloseStream continuationTokens. + * @member {Array.} continuationTokens + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @instance + */ + CloseStream.prototype.continuationTokens = $util.emptyArray; + + /** + * CloseStream newPartitions. + * @member {Array.} newPartitions + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @instance + */ + CloseStream.prototype.newPartitions = $util.emptyArray; + + /** + * Creates a new CloseStream instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.ICloseStream=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadChangeStreamResponse.CloseStream} CloseStream instance + */ + CloseStream.create = function create(properties) { + return new CloseStream(properties); + }; + + /** + * Encodes the specified CloseStream message. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.ICloseStream} message CloseStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloseStream.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.continuationTokens != null && message.continuationTokens.length) + for (var i = 0; i < message.continuationTokens.length; ++i) + $root.google.bigtable.v2.StreamContinuationToken.encode(message.continuationTokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.newPartitions != null && message.newPartitions.length) + for (var i = 0; i < message.newPartitions.length; ++i) + $root.google.bigtable.v2.StreamPartition.encode(message.newPartitions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloseStream message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadChangeStreamResponse.CloseStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.ICloseStream} message CloseStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloseStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CloseStream message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadChangeStreamResponse.CloseStream} CloseStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloseStream.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (!(message.continuationTokens && message.continuationTokens.length)) + message.continuationTokens = []; + message.continuationTokens.push($root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + if (!(message.newPartitions && message.newPartitions.length)) + message.newPartitions = []; + message.newPartitions.push($root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloseStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadChangeStreamResponse.CloseStream} CloseStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloseStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloseStream message. + * @function verify + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloseStream.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { + var error = $root.google.rpc.Status.verify(message.status, long + 1); + if (error) + return "status." + error; + } + if (message.continuationTokens != null && Object.hasOwnProperty.call(message, "continuationTokens")) { + if (!Array.isArray(message.continuationTokens)) + return "continuationTokens: array expected"; + for (var i = 0; i < message.continuationTokens.length; ++i) { + var error = $root.google.bigtable.v2.StreamContinuationToken.verify(message.continuationTokens[i], long + 1); + if (error) + return "continuationTokens." + error; + } + } + if (message.newPartitions != null && Object.hasOwnProperty.call(message, "newPartitions")) { + if (!Array.isArray(message.newPartitions)) + return "newPartitions: array expected"; + for (var i = 0; i < message.newPartitions.length; ++i) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.newPartitions[i], long + 1); + if (error) + return "newPartitions." + error; + } + } + return null; + }; + + /** + * Creates a CloseStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadChangeStreamResponse.CloseStream} CloseStream + */ + CloseStream.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(); + if (object.status != null) { + if (!$util.isObject(object.status)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status, long + 1); + } + if (object.continuationTokens) { + if (!Array.isArray(object.continuationTokens)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.continuationTokens: array expected"); + message.continuationTokens = []; + for (var i = 0; i < object.continuationTokens.length; ++i) { + if (!$util.isObject(object.continuationTokens[i])) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.continuationTokens: object expected"); + message.continuationTokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationTokens[i], long + 1); + } + } + if (object.newPartitions) { + if (!Array.isArray(object.newPartitions)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newPartitions: array expected"); + message.newPartitions = []; + for (var i = 0; i < object.newPartitions.length; ++i) { + if (!$util.isObject(object.newPartitions[i])) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newPartitions: object expected"); + message.newPartitions[i] = $root.google.bigtable.v2.StreamPartition.fromObject(object.newPartitions[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a CloseStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {google.bigtable.v2.ReadChangeStreamResponse.CloseStream} message CloseStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloseStream.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.continuationTokens = []; + object.newPartitions = []; + } + if (options.defaults) + object.status = null; + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + object.status = $root.google.rpc.Status.toObject(message.status, options, q + 1); + if (message.continuationTokens && message.continuationTokens.length) { + object.continuationTokens = []; + for (var j = 0; j < message.continuationTokens.length; ++j) + object.continuationTokens[j] = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationTokens[j], options, q + 1); + } + if (message.newPartitions && message.newPartitions.length) { + object.newPartitions = []; + for (var j = 0; j < message.newPartitions.length; ++j) + object.newPartitions[j] = $root.google.bigtable.v2.StreamPartition.toObject(message.newPartitions[j], options, q + 1); + } + return object; + }; + + /** + * Converts this CloseStream to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @instance + * @returns {Object.} JSON object + */ + CloseStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloseStream + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadChangeStreamResponse.CloseStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloseStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadChangeStreamResponse.CloseStream"; + }; + + return CloseStream; + })(); + + return ReadChangeStreamResponse; + })(); + + v2.ExecuteQueryRequest = (function() { + + /** + * Properties of an ExecuteQueryRequest. + * @memberof google.bigtable.v2 + * @interface IExecuteQueryRequest + * @property {string|null} [instanceName] ExecuteQueryRequest instanceName + * @property {string|null} [appProfileId] ExecuteQueryRequest appProfileId + * @property {string|null} [query] ExecuteQueryRequest query + * @property {Uint8Array|null} [preparedQuery] ExecuteQueryRequest preparedQuery + * @property {google.bigtable.v2.IProtoFormat|null} [protoFormat] ExecuteQueryRequest protoFormat + * @property {Uint8Array|null} [resumeToken] ExecuteQueryRequest resumeToken + * @property {Object.|null} [params] ExecuteQueryRequest params + * @property {Object.|null} [viewParameters] ExecuteQueryRequest viewParameters + */ + + /** + * Constructs a new ExecuteQueryRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents an ExecuteQueryRequest. + * @implements IExecuteQueryRequest + * @constructor + * @param {google.bigtable.v2.IExecuteQueryRequest=} [properties] Properties to set + */ + function ExecuteQueryRequest(properties) { + this.params = {}; + this.viewParameters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteQueryRequest instanceName. + * @member {string} instanceName + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.instanceName = ""; + + /** + * ExecuteQueryRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.appProfileId = ""; + + /** + * ExecuteQueryRequest query. + * @member {string} query + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.query = ""; + + /** + * ExecuteQueryRequest preparedQuery. + * @member {Uint8Array} preparedQuery + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.preparedQuery = $util.newBuffer([]); + + /** + * ExecuteQueryRequest protoFormat. + * @member {google.bigtable.v2.IProtoFormat|null|undefined} protoFormat + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.protoFormat = null; + + /** + * ExecuteQueryRequest resumeToken. + * @member {Uint8Array} resumeToken + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.resumeToken = $util.newBuffer([]); + + /** + * ExecuteQueryRequest params. + * @member {Object.} params + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.params = $util.emptyObject; + + /** + * ExecuteQueryRequest viewParameters. + * @member {Object.} viewParameters + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + ExecuteQueryRequest.prototype.viewParameters = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecuteQueryRequest dataFormat. + * @member {"protoFormat"|undefined} dataFormat + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + */ + Object.defineProperty(ExecuteQueryRequest.prototype, "dataFormat", { + get: $util.oneOfGetter($oneOfFields = ["protoFormat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecuteQueryRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {google.bigtable.v2.IExecuteQueryRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.ExecuteQueryRequest} ExecuteQueryRequest instance + */ + ExecuteQueryRequest.create = function create(properties) { + return new ExecuteQueryRequest(properties); + }; + + /** + * Encodes the specified ExecuteQueryRequest message. Does not implicitly {@link google.bigtable.v2.ExecuteQueryRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {google.bigtable.v2.IExecuteQueryRequest} message ExecuteQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteQueryRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.query); + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) + $root.google.bigtable.v2.ProtoFormat.encode(message.protoFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.v2.Value.encode(message.params[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + } + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.resumeToken); + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.preparedQuery); + if (message.viewParameters != null && Object.hasOwnProperty.call(message, "viewParameters")) + for (var keys = Object.keys(message.viewParameters), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.v2.Value.encode(message.viewParameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ExecuteQueryRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.ExecuteQueryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {google.bigtable.v2.IExecuteQueryRequest} message ExecuteQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an ExecuteQueryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ExecuteQueryRequest} ExecuteQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteQueryRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ExecuteQueryRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.instanceName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + case 3: { + message.query = reader.string(); + break; + } + case 9: { + message.preparedQuery = reader.bytes(); + break; + } + case 4: { + message.protoFormat = $root.google.bigtable.v2.ProtoFormat.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.resumeToken = reader.bytes(); + break; + } + case 7: { + if (message.params === $util.emptyObject) + message.params = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.params, key); + message.params[key] = value; + break; + } + case 12: { + if (message.viewParameters === $util.emptyObject) + message.viewParameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.viewParameters, key); + message.viewParameters[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteQueryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ExecuteQueryRequest} ExecuteQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteQueryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteQueryRequest message. + * @function verify + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteQueryRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + if (!$util.isString(message.instanceName)) + return "instanceName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) + if (!(message.preparedQuery && typeof message.preparedQuery.length === "number" || $util.isString(message.preparedQuery))) + return "preparedQuery: buffer expected"; + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) { + properties.dataFormat = 1; + { + var error = $root.google.bigtable.v2.ProtoFormat.verify(message.protoFormat, long + 1); + if (error) + return "protoFormat." + error; + } + } + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) + return "resumeToken: buffer expected"; + if (message.params != null && Object.hasOwnProperty.call(message, "params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.params[key[i]], long + 1); + if (error) + return "params." + error; + } + } + if (message.viewParameters != null && Object.hasOwnProperty.call(message, "viewParameters")) { + if (!$util.isObject(message.viewParameters)) + return "viewParameters: object expected"; + var key = Object.keys(message.viewParameters); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.viewParameters[key[i]], long + 1); + if (error) + return "viewParameters." + error; + } + } + return null; + }; + + /** + * Creates an ExecuteQueryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ExecuteQueryRequest} ExecuteQueryRequest + */ + ExecuteQueryRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ExecuteQueryRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ExecuteQueryRequest(); + if (object.instanceName != null) + message.instanceName = String(object.instanceName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.query != null) + message.query = String(object.query); + if (object.preparedQuery != null) + if (typeof object.preparedQuery === "string") + $util.base64.decode(object.preparedQuery, message.preparedQuery = $util.newBuffer($util.base64.length(object.preparedQuery)), 0); + else if (object.preparedQuery.length >= 0) + message.preparedQuery = object.preparedQuery; + if (object.protoFormat != null) { + if (!$util.isObject(object.protoFormat)) + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.protoFormat: object expected"); + message.protoFormat = $root.google.bigtable.v2.ProtoFormat.fromObject(object.protoFormat, long + 1); + } + if (object.resumeToken != null) + if (typeof object.resumeToken === "string") + $util.base64.decode(object.resumeToken, message.resumeToken = $util.newBuffer($util.base64.length(object.resumeToken)), 0); + else if (object.resumeToken.length >= 0) + message.resumeToken = object.resumeToken; + if (object.params) { + if (!$util.isObject(object.params)) + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.params, keys[i]); + if (!$util.isObject(object.params[keys[i]])) + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.params: object expected"); + message.params[keys[i]] = $root.google.bigtable.v2.Value.fromObject(object.params[keys[i]], long + 1); + } + } + if (object.viewParameters) { + if (!$util.isObject(object.viewParameters)) + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.viewParameters: object expected"); + message.viewParameters = {}; + for (var keys = Object.keys(object.viewParameters), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.viewParameters, keys[i]); + if (!$util.isObject(object.viewParameters[keys[i]])) + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.viewParameters: object expected"); + message.viewParameters[keys[i]] = $root.google.bigtable.v2.Value.fromObject(object.viewParameters[keys[i]], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an ExecuteQueryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {google.bigtable.v2.ExecuteQueryRequest} message ExecuteQueryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteQueryRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) { + object.params = {}; + object.viewParameters = {}; + } + if (options.defaults) { + object.instanceName = ""; + object.appProfileId = ""; + object.query = ""; + if (options.bytes === String) + object.resumeToken = ""; + else { + object.resumeToken = []; + if (options.bytes !== Array) + object.resumeToken = $util.newBuffer(object.resumeToken); + } + if (options.bytes === String) + object.preparedQuery = ""; + else { + object.preparedQuery = []; + if (options.bytes !== Array) + object.preparedQuery = $util.newBuffer(object.preparedQuery); + } + } + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + object.instanceName = message.instanceName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + object.query = message.query; + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) { + object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options, q + 1); + if (options.oneofs) + object.dataFormat = "protoFormat"; + } + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.params, keys2[j]); + object.params[keys2[j]] = $root.google.bigtable.v2.Value.toObject(message.params[keys2[j]], options, q + 1); + } + } + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + object.resumeToken = options.bytes === String ? $util.base64.encode(message.resumeToken, 0, message.resumeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.resumeToken) : message.resumeToken; + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) + object.preparedQuery = options.bytes === String ? $util.base64.encode(message.preparedQuery, 0, message.preparedQuery.length) : options.bytes === Array ? Array.prototype.slice.call(message.preparedQuery) : message.preparedQuery; + if (message.viewParameters && (keys2 = Object.keys(message.viewParameters)).length) { + object.viewParameters = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.viewParameters, keys2[j]); + object.viewParameters[keys2[j]] = $root.google.bigtable.v2.Value.toObject(message.viewParameters[keys2[j]], options, q + 1); + } + } + return object; + }; + + /** + * Converts this ExecuteQueryRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @instance + * @returns {Object.} JSON object + */ + ExecuteQueryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteQueryRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.ExecuteQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ExecuteQueryRequest"; + }; + + return ExecuteQueryRequest; + })(); + + v2.ExecuteQueryResponse = (function() { + + /** + * Properties of an ExecuteQueryResponse. + * @memberof google.bigtable.v2 + * @interface IExecuteQueryResponse + * @property {google.bigtable.v2.IResultSetMetadata|null} [metadata] ExecuteQueryResponse metadata + * @property {google.bigtable.v2.IPartialResultSet|null} [results] ExecuteQueryResponse results + */ + + /** + * Constructs a new ExecuteQueryResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents an ExecuteQueryResponse. + * @implements IExecuteQueryResponse + * @constructor + * @param {google.bigtable.v2.IExecuteQueryResponse=} [properties] Properties to set + */ + function ExecuteQueryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteQueryResponse metadata. + * @member {google.bigtable.v2.IResultSetMetadata|null|undefined} metadata + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @instance + */ + ExecuteQueryResponse.prototype.metadata = null; + + /** + * ExecuteQueryResponse results. + * @member {google.bigtable.v2.IPartialResultSet|null|undefined} results + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @instance + */ + ExecuteQueryResponse.prototype.results = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecuteQueryResponse response. + * @member {"metadata"|"results"|undefined} response + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @instance + */ + Object.defineProperty(ExecuteQueryResponse.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["metadata", "results"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecuteQueryResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {google.bigtable.v2.IExecuteQueryResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.ExecuteQueryResponse} ExecuteQueryResponse instance + */ + ExecuteQueryResponse.create = function create(properties) { + return new ExecuteQueryResponse(properties); + }; + + /** + * Encodes the specified ExecuteQueryResponse message. Does not implicitly {@link google.bigtable.v2.ExecuteQueryResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {google.bigtable.v2.IExecuteQueryResponse} message ExecuteQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteQueryResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.bigtable.v2.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.results != null && Object.hasOwnProperty.call(message, "results")) + $root.google.bigtable.v2.PartialResultSet.encode(message.results, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecuteQueryResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ExecuteQueryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {google.bigtable.v2.IExecuteQueryResponse} message ExecuteQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an ExecuteQueryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ExecuteQueryResponse} ExecuteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteQueryResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ExecuteQueryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metadata = $root.google.bigtable.v2.ResultSetMetadata.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.results = $root.google.bigtable.v2.PartialResultSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteQueryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ExecuteQueryResponse} ExecuteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteQueryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteQueryResponse message. + * @function verify + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteQueryResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + properties.response = 1; + { + var error = $root.google.bigtable.v2.ResultSetMetadata.verify(message.metadata, long + 1); + if (error) + return "metadata." + error; + } + } + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (properties.response === 1) + return "response: multiple values"; + properties.response = 1; + { + var error = $root.google.bigtable.v2.PartialResultSet.verify(message.results, long + 1); + if (error) + return "results." + error; + } + } + return null; + }; + + /** + * Creates an ExecuteQueryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ExecuteQueryResponse} ExecuteQueryResponse + */ + ExecuteQueryResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ExecuteQueryResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ExecuteQueryResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ExecuteQueryResponse(); + if (object.metadata != null) { + if (!$util.isObject(object.metadata)) + throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.metadata: object expected"); + message.metadata = $root.google.bigtable.v2.ResultSetMetadata.fromObject(object.metadata, long + 1); + } + if (object.results != null) { + if (!$util.isObject(object.results)) + throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.results: object expected"); + message.results = $root.google.bigtable.v2.PartialResultSet.fromObject(object.results, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ExecuteQueryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {google.bigtable.v2.ExecuteQueryResponse} message ExecuteQueryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteQueryResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options, q + 1); + if (options.oneofs) + object.response = "metadata"; + } + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + object.results = $root.google.bigtable.v2.PartialResultSet.toObject(message.results, options, q + 1); + if (options.oneofs) + object.response = "results"; + } + return object; + }; + + /** + * Converts this ExecuteQueryResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @instance + * @returns {Object.} JSON object + */ + ExecuteQueryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteQueryResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.ExecuteQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ExecuteQueryResponse"; + }; + + return ExecuteQueryResponse; + })(); + + v2.PrepareQueryRequest = (function() { + + /** + * Properties of a PrepareQueryRequest. + * @memberof google.bigtable.v2 + * @interface IPrepareQueryRequest + * @property {string|null} [instanceName] PrepareQueryRequest instanceName + * @property {string|null} [appProfileId] PrepareQueryRequest appProfileId + * @property {string|null} [query] PrepareQueryRequest query + * @property {google.bigtable.v2.IProtoFormat|null} [protoFormat] PrepareQueryRequest protoFormat + * @property {Object.|null} [paramTypes] PrepareQueryRequest paramTypes + */ + + /** + * Constructs a new PrepareQueryRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a PrepareQueryRequest. + * @implements IPrepareQueryRequest + * @constructor + * @param {google.bigtable.v2.IPrepareQueryRequest=} [properties] Properties to set + */ + function PrepareQueryRequest(properties) { + this.paramTypes = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrepareQueryRequest instanceName. + * @member {string} instanceName + * @memberof google.bigtable.v2.PrepareQueryRequest + * @instance + */ + PrepareQueryRequest.prototype.instanceName = ""; + + /** + * PrepareQueryRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.PrepareQueryRequest + * @instance + */ + PrepareQueryRequest.prototype.appProfileId = ""; + + /** + * PrepareQueryRequest query. + * @member {string} query + * @memberof google.bigtable.v2.PrepareQueryRequest + * @instance + */ + PrepareQueryRequest.prototype.query = ""; + + /** + * PrepareQueryRequest protoFormat. + * @member {google.bigtable.v2.IProtoFormat|null|undefined} protoFormat + * @memberof google.bigtable.v2.PrepareQueryRequest + * @instance + */ + PrepareQueryRequest.prototype.protoFormat = null; + + /** + * PrepareQueryRequest paramTypes. + * @member {Object.} paramTypes + * @memberof google.bigtable.v2.PrepareQueryRequest + * @instance + */ + PrepareQueryRequest.prototype.paramTypes = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PrepareQueryRequest dataFormat. + * @member {"protoFormat"|undefined} dataFormat + * @memberof google.bigtable.v2.PrepareQueryRequest + * @instance + */ + Object.defineProperty(PrepareQueryRequest.prototype, "dataFormat", { + get: $util.oneOfGetter($oneOfFields = ["protoFormat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrepareQueryRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {google.bigtable.v2.IPrepareQueryRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.PrepareQueryRequest} PrepareQueryRequest instance + */ + PrepareQueryRequest.create = function create(properties) { + return new PrepareQueryRequest(properties); + }; + + /** + * Encodes the specified PrepareQueryRequest message. Does not implicitly {@link google.bigtable.v2.PrepareQueryRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {google.bigtable.v2.IPrepareQueryRequest} message PrepareQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrepareQueryRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.query); + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) + $root.google.bigtable.v2.ProtoFormat.encode(message.protoFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.paramTypes != null && Object.hasOwnProperty.call(message, "paramTypes")) + for (var keys = Object.keys(message.paramTypes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.v2.Type.encode(message.paramTypes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified PrepareQueryRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.PrepareQueryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {google.bigtable.v2.IPrepareQueryRequest} message PrepareQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrepareQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PrepareQueryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PrepareQueryRequest} PrepareQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrepareQueryRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PrepareQueryRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.instanceName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + case 3: { + message.query = reader.string(); + break; + } + case 4: { + message.protoFormat = $root.google.bigtable.v2.ProtoFormat.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + if (message.paramTypes === $util.emptyObject) + message.paramTypes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.paramTypes, key); + message.paramTypes[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PrepareQueryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PrepareQueryRequest} PrepareQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrepareQueryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrepareQueryRequest message. + * @function verify + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrepareQueryRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + if (!$util.isString(message.instanceName)) + return "instanceName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) { + properties.dataFormat = 1; + { + var error = $root.google.bigtable.v2.ProtoFormat.verify(message.protoFormat, long + 1); + if (error) + return "protoFormat." + error; + } + } + if (message.paramTypes != null && Object.hasOwnProperty.call(message, "paramTypes")) { + if (!$util.isObject(message.paramTypes)) + return "paramTypes: object expected"; + var key = Object.keys(message.paramTypes); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.v2.Type.verify(message.paramTypes[key[i]], long + 1); + if (error) + return "paramTypes." + error; + } + } + return null; + }; + + /** + * Creates a PrepareQueryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PrepareQueryRequest} PrepareQueryRequest + */ + PrepareQueryRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.PrepareQueryRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PrepareQueryRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.PrepareQueryRequest(); + if (object.instanceName != null) + message.instanceName = String(object.instanceName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.query != null) + message.query = String(object.query); + if (object.protoFormat != null) { + if (!$util.isObject(object.protoFormat)) + throw TypeError(".google.bigtable.v2.PrepareQueryRequest.protoFormat: object expected"); + message.protoFormat = $root.google.bigtable.v2.ProtoFormat.fromObject(object.protoFormat, long + 1); + } + if (object.paramTypes) { + if (!$util.isObject(object.paramTypes)) + throw TypeError(".google.bigtable.v2.PrepareQueryRequest.paramTypes: object expected"); + message.paramTypes = {}; + for (var keys = Object.keys(object.paramTypes), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.paramTypes, keys[i]); + if (!$util.isObject(object.paramTypes[keys[i]])) + throw TypeError(".google.bigtable.v2.PrepareQueryRequest.paramTypes: object expected"); + message.paramTypes[keys[i]] = $root.google.bigtable.v2.Type.fromObject(object.paramTypes[keys[i]], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a PrepareQueryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {google.bigtable.v2.PrepareQueryRequest} message PrepareQueryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrepareQueryRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) + object.paramTypes = {}; + if (options.defaults) { + object.instanceName = ""; + object.appProfileId = ""; + object.query = ""; + } + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + object.instanceName = message.instanceName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + object.query = message.query; + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) { + object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options, q + 1); + if (options.oneofs) + object.dataFormat = "protoFormat"; + } + var keys2; + if (message.paramTypes && (keys2 = Object.keys(message.paramTypes)).length) { + object.paramTypes = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.paramTypes, keys2[j]); + object.paramTypes[keys2[j]] = $root.google.bigtable.v2.Type.toObject(message.paramTypes[keys2[j]], options, q + 1); + } + } + return object; + }; + + /** + * Converts this PrepareQueryRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PrepareQueryRequest + * @instance + * @returns {Object.} JSON object + */ + PrepareQueryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrepareQueryRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.PrepareQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrepareQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.PrepareQueryRequest"; + }; + + return PrepareQueryRequest; + })(); + + v2.PrepareQueryResponse = (function() { + + /** + * Properties of a PrepareQueryResponse. + * @memberof google.bigtable.v2 + * @interface IPrepareQueryResponse + * @property {google.bigtable.v2.IResultSetMetadata|null} [metadata] PrepareQueryResponse metadata + * @property {Uint8Array|null} [preparedQuery] PrepareQueryResponse preparedQuery + * @property {google.protobuf.ITimestamp|null} [validUntil] PrepareQueryResponse validUntil + */ + + /** + * Constructs a new PrepareQueryResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a PrepareQueryResponse. + * @implements IPrepareQueryResponse + * @constructor + * @param {google.bigtable.v2.IPrepareQueryResponse=} [properties] Properties to set + */ + function PrepareQueryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrepareQueryResponse metadata. + * @member {google.bigtable.v2.IResultSetMetadata|null|undefined} metadata + * @memberof google.bigtable.v2.PrepareQueryResponse + * @instance + */ + PrepareQueryResponse.prototype.metadata = null; + + /** + * PrepareQueryResponse preparedQuery. + * @member {Uint8Array} preparedQuery + * @memberof google.bigtable.v2.PrepareQueryResponse + * @instance + */ + PrepareQueryResponse.prototype.preparedQuery = $util.newBuffer([]); + + /** + * PrepareQueryResponse validUntil. + * @member {google.protobuf.ITimestamp|null|undefined} validUntil + * @memberof google.bigtable.v2.PrepareQueryResponse + * @instance + */ + PrepareQueryResponse.prototype.validUntil = null; + + /** + * Creates a new PrepareQueryResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {google.bigtable.v2.IPrepareQueryResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.PrepareQueryResponse} PrepareQueryResponse instance + */ + PrepareQueryResponse.create = function create(properties) { + return new PrepareQueryResponse(properties); + }; + + /** + * Encodes the specified PrepareQueryResponse message. Does not implicitly {@link google.bigtable.v2.PrepareQueryResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {google.bigtable.v2.IPrepareQueryResponse} message PrepareQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrepareQueryResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.bigtable.v2.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.preparedQuery); + if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil")) + $root.google.protobuf.Timestamp.encode(message.validUntil, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified PrepareQueryResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.PrepareQueryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {google.bigtable.v2.IPrepareQueryResponse} message PrepareQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrepareQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PrepareQueryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PrepareQueryResponse} PrepareQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrepareQueryResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PrepareQueryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metadata = $root.google.bigtable.v2.ResultSetMetadata.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.preparedQuery = reader.bytes(); + break; + } + case 3: { + message.validUntil = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PrepareQueryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PrepareQueryResponse} PrepareQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrepareQueryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrepareQueryResponse message. + * @function verify + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrepareQueryResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + var error = $root.google.bigtable.v2.ResultSetMetadata.verify(message.metadata, long + 1); + if (error) + return "metadata." + error; + } + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) + if (!(message.preparedQuery && typeof message.preparedQuery.length === "number" || $util.isString(message.preparedQuery))) + return "preparedQuery: buffer expected"; + if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil")) { + var error = $root.google.protobuf.Timestamp.verify(message.validUntil, long + 1); + if (error) + return "validUntil." + error; + } + return null; + }; + + /** + * Creates a PrepareQueryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PrepareQueryResponse} PrepareQueryResponse + */ + PrepareQueryResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.PrepareQueryResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PrepareQueryResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.PrepareQueryResponse(); + if (object.metadata != null) { + if (!$util.isObject(object.metadata)) + throw TypeError(".google.bigtable.v2.PrepareQueryResponse.metadata: object expected"); + message.metadata = $root.google.bigtable.v2.ResultSetMetadata.fromObject(object.metadata, long + 1); + } + if (object.preparedQuery != null) + if (typeof object.preparedQuery === "string") + $util.base64.decode(object.preparedQuery, message.preparedQuery = $util.newBuffer($util.base64.length(object.preparedQuery)), 0); + else if (object.preparedQuery.length >= 0) + message.preparedQuery = object.preparedQuery; + if (object.validUntil != null) { + if (!$util.isObject(object.validUntil)) + throw TypeError(".google.bigtable.v2.PrepareQueryResponse.validUntil: object expected"); + message.validUntil = $root.google.protobuf.Timestamp.fromObject(object.validUntil, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a PrepareQueryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {google.bigtable.v2.PrepareQueryResponse} message PrepareQueryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrepareQueryResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.metadata = null; + if (options.bytes === String) + object.preparedQuery = ""; + else { + object.preparedQuery = []; + if (options.bytes !== Array) + object.preparedQuery = $util.newBuffer(object.preparedQuery); + } + object.validUntil = null; + } + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options, q + 1); + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) + object.preparedQuery = options.bytes === String ? $util.base64.encode(message.preparedQuery, 0, message.preparedQuery.length) : options.bytes === Array ? Array.prototype.slice.call(message.preparedQuery) : message.preparedQuery; + if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil")) + object.validUntil = $root.google.protobuf.Timestamp.toObject(message.validUntil, options, q + 1); + return object; + }; + + /** + * Converts this PrepareQueryResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PrepareQueryResponse + * @instance + * @returns {Object.} JSON object + */ + PrepareQueryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrepareQueryResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.PrepareQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrepareQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.PrepareQueryResponse"; + }; + + return PrepareQueryResponse; + })(); + + v2.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.bigtable.v2 + * @interface IRow + * @property {Uint8Array|null} [key] Row key + * @property {Array.|null} [families] Row families + */ + + /** + * Constructs a new Row. + * @memberof google.bigtable.v2 + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.bigtable.v2.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.families = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Row key. + * @member {Uint8Array} key + * @memberof google.bigtable.v2.Row + * @instance + */ + Row.prototype.key = $util.newBuffer([]); + + /** + * Row families. + * @member {Array.} families + * @memberof google.bigtable.v2.Row + * @instance + */ + Row.prototype.families = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Row + * @static + * @param {google.bigtable.v2.IRow=} [properties] Properties to set + * @returns {google.bigtable.v2.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.bigtable.v2.Row.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Row + * @static + * @param {google.bigtable.v2.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.families != null && message.families.length) + for (var i = 0; i < message.families.length; ++i) + $root.google.bigtable.v2.Family.encode(message.families[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.bigtable.v2.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Row + * @static + * @param {google.bigtable.v2.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.bytes(); + break; + } + case 2: { + if (!(message.families && message.families.length)) + message.families = []; + message.families.push($root.google.bigtable.v2.Family.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.bigtable.v2.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.families != null && Object.hasOwnProperty.call(message, "families")) { + if (!Array.isArray(message.families)) + return "families: array expected"; + for (var i = 0; i < message.families.length; ++i) { + var error = $root.google.bigtable.v2.Family.verify(message.families[i], long + 1); + if (error) + return "families." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Row + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Row} Row + */ + Row.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Row) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Row: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Row(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length >= 0) + message.key = object.key; + if (object.families) { + if (!Array.isArray(object.families)) + throw TypeError(".google.bigtable.v2.Row.families: array expected"); + message.families = []; + for (var i = 0; i < object.families.length; ++i) { + if (!$util.isObject(object.families[i])) + throw TypeError(".google.bigtable.v2.Row.families: object expected"); + message.families[i] = $root.google.bigtable.v2.Family.fromObject(object.families[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Row + * @static + * @param {google.bigtable.v2.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.families = []; + if (options.defaults) + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.families && message.families.length) { + object.families = []; + for (var j = 0; j < message.families.length; ++j) + object.families[j] = $root.google.bigtable.v2.Family.toObject(message.families[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.bigtable.v2.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Row"; + }; + + return Row; + })(); + + v2.Family = (function() { + + /** + * Properties of a Family. + * @memberof google.bigtable.v2 + * @interface IFamily + * @property {string|null} [name] Family name + * @property {Array.|null} [columns] Family columns + */ + + /** + * Constructs a new Family. + * @memberof google.bigtable.v2 + * @classdesc Represents a Family. + * @implements IFamily + * @constructor + * @param {google.bigtable.v2.IFamily=} [properties] Properties to set + */ + function Family(properties) { + this.columns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Family name. + * @member {string} name + * @memberof google.bigtable.v2.Family + * @instance + */ + Family.prototype.name = ""; + + /** + * Family columns. + * @member {Array.} columns + * @memberof google.bigtable.v2.Family + * @instance + */ + Family.prototype.columns = $util.emptyArray; + + /** + * Creates a new Family instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Family + * @static + * @param {google.bigtable.v2.IFamily=} [properties] Properties to set + * @returns {google.bigtable.v2.Family} Family instance + */ + Family.create = function create(properties) { + return new Family(properties); + }; + + /** + * Encodes the specified Family message. Does not implicitly {@link google.bigtable.v2.Family.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Family + * @static + * @param {google.bigtable.v2.IFamily} message Family message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Family.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.bigtable.v2.Column.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Family message, length delimited. Does not implicitly {@link google.bigtable.v2.Family.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Family + * @static + * @param {google.bigtable.v2.IFamily} message Family message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Family.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Family message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Family + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Family} Family + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Family.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Family(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.bigtable.v2.Column.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Family message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Family + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Family} Family + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Family.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Family message. + * @function verify + * @memberof google.bigtable.v2.Family + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Family.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.bigtable.v2.Column.verify(message.columns[i], long + 1); + if (error) + return "columns." + error; + } + } + return null; + }; + + /** + * Creates a Family message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Family + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Family} Family + */ + Family.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Family) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Family: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Family(); + if (object.name != null) + message.name = String(object.name); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.bigtable.v2.Family.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (!$util.isObject(object.columns[i])) + throw TypeError(".google.bigtable.v2.Family.columns: object expected"); + message.columns[i] = $root.google.bigtable.v2.Column.fromObject(object.columns[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Family message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Family + * @static + * @param {google.bigtable.v2.Family} message Family + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Family.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.bigtable.v2.Column.toObject(message.columns[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Family to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Family + * @instance + * @returns {Object.} JSON object + */ + Family.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Family + * @function getTypeUrl + * @memberof google.bigtable.v2.Family + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Family.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Family"; + }; + + return Family; + })(); + + v2.Column = (function() { + + /** + * Properties of a Column. + * @memberof google.bigtable.v2 + * @interface IColumn + * @property {Uint8Array|null} [qualifier] Column qualifier + * @property {Array.|null} [cells] Column cells + */ + + /** + * Constructs a new Column. + * @memberof google.bigtable.v2 + * @classdesc Represents a Column. + * @implements IColumn + * @constructor + * @param {google.bigtable.v2.IColumn=} [properties] Properties to set + */ + function Column(properties) { + this.cells = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Column qualifier. + * @member {Uint8Array} qualifier + * @memberof google.bigtable.v2.Column + * @instance + */ + Column.prototype.qualifier = $util.newBuffer([]); + + /** + * Column cells. + * @member {Array.} cells + * @memberof google.bigtable.v2.Column + * @instance + */ + Column.prototype.cells = $util.emptyArray; + + /** + * Creates a new Column instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Column + * @static + * @param {google.bigtable.v2.IColumn=} [properties] Properties to set + * @returns {google.bigtable.v2.Column} Column instance + */ + Column.create = function create(properties) { + return new Column(properties); + }; + + /** + * Encodes the specified Column message. Does not implicitly {@link google.bigtable.v2.Column.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Column + * @static + * @param {google.bigtable.v2.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifier); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + $root.google.bigtable.v2.Cell.encode(message.cells[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.bigtable.v2.Column.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Column + * @static + * @param {google.bigtable.v2.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Column message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Column(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.qualifier = reader.bytes(); + break; + } + case 2: { + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push($root.google.bigtable.v2.Cell.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Column message. + * @function verify + * @memberof google.bigtable.v2.Column + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Column.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) + if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) + return "qualifier: buffer expected"; + if (message.cells != null && Object.hasOwnProperty.call(message, "cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) { + var error = $root.google.bigtable.v2.Cell.verify(message.cells[i], long + 1); + if (error) + return "cells." + error; + } + } + return null; + }; + + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Column + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Column} Column + */ + Column.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Column) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Column: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Column(); + if (object.qualifier != null) + if (typeof object.qualifier === "string") + $util.base64.decode(object.qualifier, message.qualifier = $util.newBuffer($util.base64.length(object.qualifier)), 0); + else if (object.qualifier.length >= 0) + message.qualifier = object.qualifier; + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".google.bigtable.v2.Column.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) { + if (!$util.isObject(object.cells[i])) + throw TypeError(".google.bigtable.v2.Column.cells: object expected"); + message.cells[i] = $root.google.bigtable.v2.Cell.fromObject(object.cells[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Column + * @static + * @param {google.bigtable.v2.Column} message Column + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Column.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (options.defaults) + if (options.bytes === String) + object.qualifier = ""; + else { + object.qualifier = []; + if (options.bytes !== Array) + object.qualifier = $util.newBuffer(object.qualifier); + } + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) + object.qualifier = options.bytes === String ? $util.base64.encode(message.qualifier, 0, message.qualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifier) : message.qualifier; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = $root.google.bigtable.v2.Cell.toObject(message.cells[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Column to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Column + * @instance + * @returns {Object.} JSON object + */ + Column.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Column + * @function getTypeUrl + * @memberof google.bigtable.v2.Column + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Column.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Column"; + }; + + return Column; + })(); + + v2.Cell = (function() { + + /** + * Properties of a Cell. + * @memberof google.bigtable.v2 + * @interface ICell + * @property {number|Long|null} [timestampMicros] Cell timestampMicros + * @property {Uint8Array|null} [value] Cell value + * @property {Array.|null} [labels] Cell labels + */ + + /** + * Constructs a new Cell. + * @memberof google.bigtable.v2 + * @classdesc Represents a Cell. + * @implements ICell + * @constructor + * @param {google.bigtable.v2.ICell=} [properties] Properties to set + */ + function Cell(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Cell timestampMicros. + * @member {number|Long} timestampMicros + * @memberof google.bigtable.v2.Cell + * @instance + */ + Cell.prototype.timestampMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Cell value. + * @member {Uint8Array} value + * @memberof google.bigtable.v2.Cell + * @instance + */ + Cell.prototype.value = $util.newBuffer([]); + + /** + * Cell labels. + * @member {Array.} labels + * @memberof google.bigtable.v2.Cell + * @instance + */ + Cell.prototype.labels = $util.emptyArray; + + /** + * Creates a new Cell instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Cell + * @static + * @param {google.bigtable.v2.ICell=} [properties] Properties to set + * @returns {google.bigtable.v2.Cell} Cell instance + */ + Cell.create = function create(properties) { + return new Cell(properties); + }; + + /** + * Encodes the specified Cell message. Does not implicitly {@link google.bigtable.v2.Cell.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Cell + * @static + * @param {google.bigtable.v2.ICell} message Cell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cell.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestampMicros); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.labels[i]); + return writer; + }; + + /** + * Encodes the specified Cell message, length delimited. Does not implicitly {@link google.bigtable.v2.Cell.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Cell + * @static + * @param {google.bigtable.v2.ICell} message Cell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cell.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Cell message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Cell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Cell} Cell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cell.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Cell(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.timestampMicros = reader.int64(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + case 3: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Cell message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Cell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Cell} Cell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cell.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cell message. + * @function verify + * @memberof google.bigtable.v2.Cell + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cell.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (!$util.isInteger(message.timestampMicros) && !(message.timestampMicros && $util.isInteger(message.timestampMicros.low) && $util.isInteger(message.timestampMicros.high))) + return "timestampMicros: integer|Long expected"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) + if (!$util.isString(message.labels[i])) + return "labels: string[] expected"; + } + return null; + }; + + /** + * Creates a Cell message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Cell + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Cell} Cell + */ + Cell.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Cell) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Cell: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Cell(); + if (object.timestampMicros != null) + if ($util.Long) + message.timestampMicros = $util.Long.fromValue(object.timestampMicros, false); + else if (typeof object.timestampMicros === "string") + message.timestampMicros = parseInt(object.timestampMicros, 10); + else if (typeof object.timestampMicros === "number") + message.timestampMicros = object.timestampMicros; + else if (typeof object.timestampMicros === "object") + message.timestampMicros = new $util.LongBits(object.timestampMicros.low >>> 0, object.timestampMicros.high >>> 0).toNumber(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.bigtable.v2.Cell.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) + message.labels[i] = String(object.labels[i]); + } + return message; + }; + + /** + * Creates a plain object from a Cell message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Cell + * @static + * @param {google.bigtable.v2.Cell} message Cell + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cell.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.timestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.timestampMicros = typeof message.timestampMicros === "number" ? BigInt(message.timestampMicros) : $util.Long.fromBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.timestampMicros === "number") + object.timestampMicros = options.longs === String ? String(message.timestampMicros) : message.timestampMicros; + else + object.timestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMicros) : options.longs === Number ? new $util.LongBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0).toNumber() : message.timestampMicros; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = message.labels[j]; + } + return object; + }; + + /** + * Converts this Cell to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Cell + * @instance + * @returns {Object.} JSON object + */ + Cell.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cell + * @function getTypeUrl + * @memberof google.bigtable.v2.Cell + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cell.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Cell"; + }; + + return Cell; + })(); + + v2.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.bigtable.v2 + * @interface IValue + * @property {google.bigtable.v2.IType|null} [type] Value type + * @property {Uint8Array|null} [rawValue] Value rawValue + * @property {number|Long|null} [rawTimestampMicros] Value rawTimestampMicros + * @property {Uint8Array|null} [bytesValue] Value bytesValue + * @property {string|null} [stringValue] Value stringValue + * @property {number|Long|null} [intValue] Value intValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {number|null} [floatValue] Value floatValue + * @property {google.protobuf.ITimestamp|null} [timestampValue] Value timestampValue + * @property {google.type.IDate|null} [dateValue] Value dateValue + * @property {google.bigtable.v2.IArrayValue|null} [arrayValue] Value arrayValue + */ + + /** + * Constructs a new Value. + * @memberof google.bigtable.v2 + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.bigtable.v2.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value type. + * @member {google.bigtable.v2.IType|null|undefined} type + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.type = null; + + /** + * Value rawValue. + * @member {Uint8Array|null|undefined} rawValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.rawValue = null; + + /** + * Value rawTimestampMicros. + * @member {number|Long|null|undefined} rawTimestampMicros + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.rawTimestampMicros = null; + + /** + * Value bytesValue. + * @member {Uint8Array|null|undefined} bytesValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.bytesValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value intValue. + * @member {number|Long|null|undefined} intValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.intValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value floatValue. + * @member {number|null|undefined} floatValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.floatValue = null; + + /** + * Value timestampValue. + * @member {google.protobuf.ITimestamp|null|undefined} timestampValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.timestampValue = null; + + /** + * Value dateValue. + * @member {google.type.IDate|null|undefined} dateValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.dateValue = null; + + /** + * Value arrayValue. + * @member {google.bigtable.v2.IArrayValue|null|undefined} arrayValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.arrayValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"rawValue"|"rawTimestampMicros"|"bytesValue"|"stringValue"|"intValue"|"boolValue"|"floatValue"|"timestampValue"|"dateValue"|"arrayValue"|undefined} kind + * @memberof google.bigtable.v2.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["rawValue", "rawTimestampMicros", "bytesValue", "stringValue", "intValue", "boolValue", "floatValue", "timestampValue", "dateValue", "arrayValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Value + * @static + * @param {google.bigtable.v2.IValue=} [properties] Properties to set + * @returns {google.bigtable.v2.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.bigtable.v2.Value.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Value + * @static + * @param {google.bigtable.v2.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bytesValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) + $root.google.bigtable.v2.ArrayValue.encode(message.arrayValue, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.intValue); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.rawValue != null && Object.hasOwnProperty.call(message, "rawValue")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.rawValue); + if (message.rawTimestampMicros != null && Object.hasOwnProperty.call(message, "rawTimestampMicros")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.rawTimestampMicros); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boolValue); + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) + writer.uint32(/* id 11, wireType 1 =*/89).double(message.floatValue); + if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) + $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + if (message.dateValue != null && Object.hasOwnProperty.call(message, "dateValue")) + $root.google.type.Date.encode(message.dateValue, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.bigtable.v2.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Value + * @static + * @param {google.bigtable.v2.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 7: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.rawValue = reader.bytes(); + break; + } + case 9: { + message.rawTimestampMicros = reader.int64(); + break; + } + case 2: { + message.bytesValue = reader.bytes(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 6: { + message.intValue = reader.int64(); + break; + } + case 10: { + message.boolValue = reader.bool(); + break; + } + case 11: { + message.floatValue = reader.double(); + break; + } + case 12: { + message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 13: { + message.dateValue = $root.google.type.Date.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.arrayValue = $root.google.bigtable.v2.ArrayValue.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.bigtable.v2.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type, long + 1); + if (error) + return "type." + error; + } + if (message.rawValue != null && Object.hasOwnProperty.call(message, "rawValue")) { + properties.kind = 1; + if (!(message.rawValue && typeof message.rawValue.length === "number" || $util.isString(message.rawValue))) + return "rawValue: buffer expected"; + } + if (message.rawTimestampMicros != null && Object.hasOwnProperty.call(message, "rawTimestampMicros")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isInteger(message.rawTimestampMicros) && !(message.rawTimestampMicros && $util.isInteger(message.rawTimestampMicros.low) && $util.isInteger(message.rawTimestampMicros.high))) + return "rawTimestampMicros: integer|Long expected"; + } + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) + return "bytesValue: buffer expected"; + } + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.floatValue !== "number") + return "floatValue: number expected"; + } + if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.timestampValue, long + 1); + if (error) + return "timestampValue." + error; + } + } + if (message.dateValue != null && Object.hasOwnProperty.call(message, "dateValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.type.Date.verify(message.dateValue, long + 1); + if (error) + return "dateValue." + error; + } + } + if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.ArrayValue.verify(message.arrayValue, long + 1); + if (error) + return "arrayValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Value + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Value} Value + */ + Value.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Value) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Value: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Value(); + if (object.type != null) { + if (!$util.isObject(object.type)) + throw TypeError(".google.bigtable.v2.Value.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type, long + 1); + } + if (object.rawValue != null) + if (typeof object.rawValue === "string") + $util.base64.decode(object.rawValue, message.rawValue = $util.newBuffer($util.base64.length(object.rawValue)), 0); + else if (object.rawValue.length >= 0) + message.rawValue = object.rawValue; + if (object.rawTimestampMicros != null) + if ($util.Long) + message.rawTimestampMicros = $util.Long.fromValue(object.rawTimestampMicros, false); + else if (typeof object.rawTimestampMicros === "string") + message.rawTimestampMicros = parseInt(object.rawTimestampMicros, 10); + else if (typeof object.rawTimestampMicros === "number") + message.rawTimestampMicros = object.rawTimestampMicros; + else if (typeof object.rawTimestampMicros === "object") + message.rawTimestampMicros = new $util.LongBits(object.rawTimestampMicros.low >>> 0, object.rawTimestampMicros.high >>> 0).toNumber(); + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.intValue != null) + if ($util.Long) + message.intValue = $util.Long.fromValue(object.intValue, false); + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.floatValue != null) + message.floatValue = Number(object.floatValue); + if (object.timestampValue != null) { + if (!$util.isObject(object.timestampValue)) + throw TypeError(".google.bigtable.v2.Value.timestampValue: object expected"); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue, long + 1); + } + if (object.dateValue != null) { + if (!$util.isObject(object.dateValue)) + throw TypeError(".google.bigtable.v2.Value.dateValue: object expected"); + message.dateValue = $root.google.type.Date.fromObject(object.dateValue, long + 1); + } + if (object.arrayValue != null) { + if (!$util.isObject(object.arrayValue)) + throw TypeError(".google.bigtable.v2.Value.arrayValue: object expected"); + message.arrayValue = $root.google.bigtable.v2.ArrayValue.fromObject(object.arrayValue, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Value + * @static + * @param {google.bigtable.v2.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.type = null; + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) { + object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; + if (options.oneofs) + object.kind = "bytesValue"; + } + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) { + object.arrayValue = $root.google.bigtable.v2.ArrayValue.toObject(message.arrayValue, options, q + 1); + if (options.oneofs) + object.kind = "arrayValue"; + } + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.intValue = typeof message.intValue === "number" ? BigInt(message.intValue) : $util.Long.fromBits(message.intValue.low >>> 0, message.intValue.high >>> 0, false).toBigInt(); + else if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; + if (options.oneofs) + object.kind = "intValue"; + } + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options, q + 1); + if (message.rawValue != null && Object.hasOwnProperty.call(message, "rawValue")) { + object.rawValue = options.bytes === String ? $util.base64.encode(message.rawValue, 0, message.rawValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawValue) : message.rawValue; + if (options.oneofs) + object.kind = "rawValue"; + } + if (message.rawTimestampMicros != null && Object.hasOwnProperty.call(message, "rawTimestampMicros")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rawTimestampMicros = typeof message.rawTimestampMicros === "number" ? BigInt(message.rawTimestampMicros) : $util.Long.fromBits(message.rawTimestampMicros.low >>> 0, message.rawTimestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.rawTimestampMicros === "number") + object.rawTimestampMicros = options.longs === String ? String(message.rawTimestampMicros) : message.rawTimestampMicros; + else + object.rawTimestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.rawTimestampMicros) : options.longs === Number ? new $util.LongBits(message.rawTimestampMicros.low >>> 0, message.rawTimestampMicros.high >>> 0).toNumber() : message.rawTimestampMicros; + if (options.oneofs) + object.kind = "rawTimestampMicros"; + } + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) { + object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; + if (options.oneofs) + object.kind = "floatValue"; + } + if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options, q + 1); + if (options.oneofs) + object.kind = "timestampValue"; + } + if (message.dateValue != null && Object.hasOwnProperty.call(message, "dateValue")) { + object.dateValue = $root.google.type.Date.toObject(message.dateValue, options, q + 1); + if (options.oneofs) + object.kind = "dateValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.bigtable.v2.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Value"; + }; + + return Value; + })(); + + v2.ArrayValue = (function() { + + /** + * Properties of an ArrayValue. + * @memberof google.bigtable.v2 + * @interface IArrayValue + * @property {Array.|null} [values] ArrayValue values + */ + + /** + * Constructs a new ArrayValue. + * @memberof google.bigtable.v2 + * @classdesc Represents an ArrayValue. + * @implements IArrayValue + * @constructor + * @param {google.bigtable.v2.IArrayValue=} [properties] Properties to set + */ + function ArrayValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArrayValue values. + * @member {Array.} values + * @memberof google.bigtable.v2.ArrayValue + * @instance + */ + ArrayValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ArrayValue instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {google.bigtable.v2.IArrayValue=} [properties] Properties to set + * @returns {google.bigtable.v2.ArrayValue} ArrayValue instance + */ + ArrayValue.create = function create(properties) { + return new ArrayValue(properties); + }; + + /** + * Encodes the specified ArrayValue message. Does not implicitly {@link google.bigtable.v2.ArrayValue.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {google.bigtable.v2.IArrayValue} message ArrayValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArrayValue.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.bigtable.v2.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ArrayValue message, length delimited. Does not implicitly {@link google.bigtable.v2.ArrayValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {google.bigtable.v2.IArrayValue} message ArrayValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArrayValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an ArrayValue message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ArrayValue} ArrayValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArrayValue.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ArrayValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ArrayValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ArrayValue} ArrayValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArrayValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArrayValue message. + * @function verify + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArrayValue.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.values != null && Object.hasOwnProperty.call(message, "values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.values[i], long + 1); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates an ArrayValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ArrayValue} ArrayValue + */ + ArrayValue.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ArrayValue) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ArrayValue: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ArrayValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.bigtable.v2.ArrayValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (!$util.isObject(object.values[i])) + throw TypeError(".google.bigtable.v2.ArrayValue.values: object expected"); + message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an ArrayValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {google.bigtable.v2.ArrayValue} message ArrayValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArrayValue.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.bigtable.v2.Value.toObject(message.values[j], options, q + 1); + } + return object; + }; + + /** + * Converts this ArrayValue to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ArrayValue + * @instance + * @returns {Object.} JSON object + */ + ArrayValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ArrayValue + * @function getTypeUrl + * @memberof google.bigtable.v2.ArrayValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ArrayValue"; + }; + + return ArrayValue; + })(); + + v2.RowRange = (function() { + + /** + * Properties of a RowRange. + * @memberof google.bigtable.v2 + * @interface IRowRange + * @property {Uint8Array|null} [startKeyClosed] RowRange startKeyClosed + * @property {Uint8Array|null} [startKeyOpen] RowRange startKeyOpen + * @property {Uint8Array|null} [endKeyOpen] RowRange endKeyOpen + * @property {Uint8Array|null} [endKeyClosed] RowRange endKeyClosed + */ + + /** + * Constructs a new RowRange. + * @memberof google.bigtable.v2 + * @classdesc Represents a RowRange. + * @implements IRowRange + * @constructor + * @param {google.bigtable.v2.IRowRange=} [properties] Properties to set + */ + function RowRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RowRange startKeyClosed. + * @member {Uint8Array|null|undefined} startKeyClosed + * @memberof google.bigtable.v2.RowRange + * @instance + */ + RowRange.prototype.startKeyClosed = null; + + /** + * RowRange startKeyOpen. + * @member {Uint8Array|null|undefined} startKeyOpen + * @memberof google.bigtable.v2.RowRange + * @instance + */ + RowRange.prototype.startKeyOpen = null; + + /** + * RowRange endKeyOpen. + * @member {Uint8Array|null|undefined} endKeyOpen + * @memberof google.bigtable.v2.RowRange + * @instance + */ + RowRange.prototype.endKeyOpen = null; + + /** + * RowRange endKeyClosed. + * @member {Uint8Array|null|undefined} endKeyClosed + * @memberof google.bigtable.v2.RowRange + * @instance + */ + RowRange.prototype.endKeyClosed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RowRange startKey. + * @member {"startKeyClosed"|"startKeyOpen"|undefined} startKey + * @memberof google.bigtable.v2.RowRange + * @instance + */ + Object.defineProperty(RowRange.prototype, "startKey", { + get: $util.oneOfGetter($oneOfFields = ["startKeyClosed", "startKeyOpen"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RowRange endKey. + * @member {"endKeyOpen"|"endKeyClosed"|undefined} endKey + * @memberof google.bigtable.v2.RowRange + * @instance + */ + Object.defineProperty(RowRange.prototype, "endKey", { + get: $util.oneOfGetter($oneOfFields = ["endKeyOpen", "endKeyClosed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RowRange instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RowRange + * @static + * @param {google.bigtable.v2.IRowRange=} [properties] Properties to set + * @returns {google.bigtable.v2.RowRange} RowRange instance + */ + RowRange.create = function create(properties) { + return new RowRange(properties); + }; + + /** + * Encodes the specified RowRange message. Does not implicitly {@link google.bigtable.v2.RowRange.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.RowRange + * @static + * @param {google.bigtable.v2.IRowRange} message RowRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowRange.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.startKeyClosed != null && Object.hasOwnProperty.call(message, "startKeyClosed")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.startKeyClosed); + if (message.startKeyOpen != null && Object.hasOwnProperty.call(message, "startKeyOpen")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.startKeyOpen); + if (message.endKeyOpen != null && Object.hasOwnProperty.call(message, "endKeyOpen")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.endKeyOpen); + if (message.endKeyClosed != null && Object.hasOwnProperty.call(message, "endKeyClosed")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.endKeyClosed); + return writer; + }; + + /** + * Encodes the specified RowRange message, length delimited. Does not implicitly {@link google.bigtable.v2.RowRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RowRange + * @static + * @param {google.bigtable.v2.IRowRange} message RowRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RowRange message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RowRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RowRange} RowRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startKeyClosed = reader.bytes(); + break; + } + case 2: { + message.startKeyOpen = reader.bytes(); + break; + } + case 3: { + message.endKeyOpen = reader.bytes(); + break; + } + case 4: { + message.endKeyClosed = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RowRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RowRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RowRange} RowRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RowRange message. + * @function verify + * @memberof google.bigtable.v2.RowRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.startKeyClosed != null && Object.hasOwnProperty.call(message, "startKeyClosed")) { + properties.startKey = 1; + if (!(message.startKeyClosed && typeof message.startKeyClosed.length === "number" || $util.isString(message.startKeyClosed))) + return "startKeyClosed: buffer expected"; + } + if (message.startKeyOpen != null && Object.hasOwnProperty.call(message, "startKeyOpen")) { + if (properties.startKey === 1) + return "startKey: multiple values"; + properties.startKey = 1; + if (!(message.startKeyOpen && typeof message.startKeyOpen.length === "number" || $util.isString(message.startKeyOpen))) + return "startKeyOpen: buffer expected"; + } + if (message.endKeyOpen != null && Object.hasOwnProperty.call(message, "endKeyOpen")) { + properties.endKey = 1; + if (!(message.endKeyOpen && typeof message.endKeyOpen.length === "number" || $util.isString(message.endKeyOpen))) + return "endKeyOpen: buffer expected"; + } + if (message.endKeyClosed != null && Object.hasOwnProperty.call(message, "endKeyClosed")) { + if (properties.endKey === 1) + return "endKey: multiple values"; + properties.endKey = 1; + if (!(message.endKeyClosed && typeof message.endKeyClosed.length === "number" || $util.isString(message.endKeyClosed))) + return "endKeyClosed: buffer expected"; + } + return null; + }; + + /** + * Creates a RowRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RowRange + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RowRange} RowRange + */ + RowRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.RowRange) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowRange: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RowRange(); + if (object.startKeyClosed != null) + if (typeof object.startKeyClosed === "string") + $util.base64.decode(object.startKeyClosed, message.startKeyClosed = $util.newBuffer($util.base64.length(object.startKeyClosed)), 0); + else if (object.startKeyClosed.length >= 0) + message.startKeyClosed = object.startKeyClosed; + if (object.startKeyOpen != null) + if (typeof object.startKeyOpen === "string") + $util.base64.decode(object.startKeyOpen, message.startKeyOpen = $util.newBuffer($util.base64.length(object.startKeyOpen)), 0); + else if (object.startKeyOpen.length >= 0) + message.startKeyOpen = object.startKeyOpen; + if (object.endKeyOpen != null) + if (typeof object.endKeyOpen === "string") + $util.base64.decode(object.endKeyOpen, message.endKeyOpen = $util.newBuffer($util.base64.length(object.endKeyOpen)), 0); + else if (object.endKeyOpen.length >= 0) + message.endKeyOpen = object.endKeyOpen; + if (object.endKeyClosed != null) + if (typeof object.endKeyClosed === "string") + $util.base64.decode(object.endKeyClosed, message.endKeyClosed = $util.newBuffer($util.base64.length(object.endKeyClosed)), 0); + else if (object.endKeyClosed.length >= 0) + message.endKeyClosed = object.endKeyClosed; + return message; + }; + + /** + * Creates a plain object from a RowRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RowRange + * @static + * @param {google.bigtable.v2.RowRange} message RowRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowRange.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.startKeyClosed != null && Object.hasOwnProperty.call(message, "startKeyClosed")) { + object.startKeyClosed = options.bytes === String ? $util.base64.encode(message.startKeyClosed, 0, message.startKeyClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.startKeyClosed) : message.startKeyClosed; + if (options.oneofs) + object.startKey = "startKeyClosed"; + } + if (message.startKeyOpen != null && Object.hasOwnProperty.call(message, "startKeyOpen")) { + object.startKeyOpen = options.bytes === String ? $util.base64.encode(message.startKeyOpen, 0, message.startKeyOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.startKeyOpen) : message.startKeyOpen; + if (options.oneofs) + object.startKey = "startKeyOpen"; + } + if (message.endKeyOpen != null && Object.hasOwnProperty.call(message, "endKeyOpen")) { + object.endKeyOpen = options.bytes === String ? $util.base64.encode(message.endKeyOpen, 0, message.endKeyOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.endKeyOpen) : message.endKeyOpen; + if (options.oneofs) + object.endKey = "endKeyOpen"; + } + if (message.endKeyClosed != null && Object.hasOwnProperty.call(message, "endKeyClosed")) { + object.endKeyClosed = options.bytes === String ? $util.base64.encode(message.endKeyClosed, 0, message.endKeyClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.endKeyClosed) : message.endKeyClosed; + if (options.oneofs) + object.endKey = "endKeyClosed"; + } + return object; + }; + + /** + * Converts this RowRange to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RowRange + * @instance + * @returns {Object.} JSON object + */ + RowRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RowRange + * @function getTypeUrl + * @memberof google.bigtable.v2.RowRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RowRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RowRange"; + }; + + return RowRange; + })(); + + v2.RowSet = (function() { + + /** + * Properties of a RowSet. + * @memberof google.bigtable.v2 + * @interface IRowSet + * @property {Array.|null} [rowKeys] RowSet rowKeys + * @property {Array.|null} [rowRanges] RowSet rowRanges + */ + + /** + * Constructs a new RowSet. + * @memberof google.bigtable.v2 + * @classdesc Represents a RowSet. + * @implements IRowSet + * @constructor + * @param {google.bigtable.v2.IRowSet=} [properties] Properties to set + */ + function RowSet(properties) { + this.rowKeys = []; + this.rowRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RowSet rowKeys. + * @member {Array.} rowKeys + * @memberof google.bigtable.v2.RowSet + * @instance + */ + RowSet.prototype.rowKeys = $util.emptyArray; + + /** + * RowSet rowRanges. + * @member {Array.} rowRanges + * @memberof google.bigtable.v2.RowSet + * @instance + */ + RowSet.prototype.rowRanges = $util.emptyArray; + + /** + * Creates a new RowSet instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RowSet + * @static + * @param {google.bigtable.v2.IRowSet=} [properties] Properties to set + * @returns {google.bigtable.v2.RowSet} RowSet instance + */ + RowSet.create = function create(properties) { + return new RowSet(properties); + }; + + /** + * Encodes the specified RowSet message. Does not implicitly {@link google.bigtable.v2.RowSet.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.RowSet + * @static + * @param {google.bigtable.v2.IRowSet} message RowSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowSet.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rowKeys != null && message.rowKeys.length) + for (var i = 0; i < message.rowKeys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowKeys[i]); + if (message.rowRanges != null && message.rowRanges.length) + for (var i = 0; i < message.rowRanges.length; ++i) + $root.google.bigtable.v2.RowRange.encode(message.rowRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified RowSet message, length delimited. Does not implicitly {@link google.bigtable.v2.RowSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RowSet + * @static + * @param {google.bigtable.v2.IRowSet} message RowSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RowSet message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RowSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RowSet} RowSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rowKeys && message.rowKeys.length)) + message.rowKeys = []; + message.rowKeys.push(reader.bytes()); + break; + } + case 2: { + if (!(message.rowRanges && message.rowRanges.length)) + message.rowRanges = []; + message.rowRanges.push($root.google.bigtable.v2.RowRange.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RowSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RowSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RowSet} RowSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RowSet message. + * @function verify + * @memberof google.bigtable.v2.RowSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rowKeys != null && Object.hasOwnProperty.call(message, "rowKeys")) { + if (!Array.isArray(message.rowKeys)) + return "rowKeys: array expected"; + for (var i = 0; i < message.rowKeys.length; ++i) + if (!(message.rowKeys[i] && typeof message.rowKeys[i].length === "number" || $util.isString(message.rowKeys[i]))) + return "rowKeys: buffer[] expected"; + } + if (message.rowRanges != null && Object.hasOwnProperty.call(message, "rowRanges")) { + if (!Array.isArray(message.rowRanges)) + return "rowRanges: array expected"; + for (var i = 0; i < message.rowRanges.length; ++i) { + var error = $root.google.bigtable.v2.RowRange.verify(message.rowRanges[i], long + 1); + if (error) + return "rowRanges." + error; + } + } + return null; + }; + + /** + * Creates a RowSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RowSet + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RowSet} RowSet + */ + RowSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.RowSet) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowSet: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RowSet(); + if (object.rowKeys) { + if (!Array.isArray(object.rowKeys)) + throw TypeError(".google.bigtable.v2.RowSet.rowKeys: array expected"); + message.rowKeys = []; + for (var i = 0; i < object.rowKeys.length; ++i) + if (typeof object.rowKeys[i] === "string") + $util.base64.decode(object.rowKeys[i], message.rowKeys[i] = $util.newBuffer($util.base64.length(object.rowKeys[i])), 0); + else if (object.rowKeys[i].length >= 0) + message.rowKeys[i] = object.rowKeys[i]; + } + if (object.rowRanges) { + if (!Array.isArray(object.rowRanges)) + throw TypeError(".google.bigtable.v2.RowSet.rowRanges: array expected"); + message.rowRanges = []; + for (var i = 0; i < object.rowRanges.length; ++i) { + if (!$util.isObject(object.rowRanges[i])) + throw TypeError(".google.bigtable.v2.RowSet.rowRanges: object expected"); + message.rowRanges[i] = $root.google.bigtable.v2.RowRange.fromObject(object.rowRanges[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a RowSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RowSet + * @static + * @param {google.bigtable.v2.RowSet} message RowSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowSet.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.rowKeys = []; + object.rowRanges = []; + } + if (message.rowKeys && message.rowKeys.length) { + object.rowKeys = []; + for (var j = 0; j < message.rowKeys.length; ++j) + object.rowKeys[j] = options.bytes === String ? $util.base64.encode(message.rowKeys[j], 0, message.rowKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKeys[j]) : message.rowKeys[j]; + } + if (message.rowRanges && message.rowRanges.length) { + object.rowRanges = []; + for (var j = 0; j < message.rowRanges.length; ++j) + object.rowRanges[j] = $root.google.bigtable.v2.RowRange.toObject(message.rowRanges[j], options, q + 1); + } + return object; + }; + + /** + * Converts this RowSet to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RowSet + * @instance + * @returns {Object.} JSON object + */ + RowSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RowSet + * @function getTypeUrl + * @memberof google.bigtable.v2.RowSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RowSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RowSet"; + }; + + return RowSet; + })(); + + v2.ColumnRange = (function() { + + /** + * Properties of a ColumnRange. + * @memberof google.bigtable.v2 + * @interface IColumnRange + * @property {string|null} [familyName] ColumnRange familyName + * @property {Uint8Array|null} [startQualifierClosed] ColumnRange startQualifierClosed + * @property {Uint8Array|null} [startQualifierOpen] ColumnRange startQualifierOpen + * @property {Uint8Array|null} [endQualifierClosed] ColumnRange endQualifierClosed + * @property {Uint8Array|null} [endQualifierOpen] ColumnRange endQualifierOpen + */ + + /** + * Constructs a new ColumnRange. + * @memberof google.bigtable.v2 + * @classdesc Represents a ColumnRange. + * @implements IColumnRange + * @constructor + * @param {google.bigtable.v2.IColumnRange=} [properties] Properties to set + */ + function ColumnRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnRange familyName. + * @member {string} familyName + * @memberof google.bigtable.v2.ColumnRange + * @instance + */ + ColumnRange.prototype.familyName = ""; + + /** + * ColumnRange startQualifierClosed. + * @member {Uint8Array|null|undefined} startQualifierClosed + * @memberof google.bigtable.v2.ColumnRange + * @instance + */ + ColumnRange.prototype.startQualifierClosed = null; + + /** + * ColumnRange startQualifierOpen. + * @member {Uint8Array|null|undefined} startQualifierOpen + * @memberof google.bigtable.v2.ColumnRange + * @instance + */ + ColumnRange.prototype.startQualifierOpen = null; + + /** + * ColumnRange endQualifierClosed. + * @member {Uint8Array|null|undefined} endQualifierClosed + * @memberof google.bigtable.v2.ColumnRange + * @instance + */ + ColumnRange.prototype.endQualifierClosed = null; + + /** + * ColumnRange endQualifierOpen. + * @member {Uint8Array|null|undefined} endQualifierOpen + * @memberof google.bigtable.v2.ColumnRange + * @instance + */ + ColumnRange.prototype.endQualifierOpen = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ColumnRange startQualifier. + * @member {"startQualifierClosed"|"startQualifierOpen"|undefined} startQualifier + * @memberof google.bigtable.v2.ColumnRange + * @instance + */ + Object.defineProperty(ColumnRange.prototype, "startQualifier", { + get: $util.oneOfGetter($oneOfFields = ["startQualifierClosed", "startQualifierOpen"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ColumnRange endQualifier. + * @member {"endQualifierClosed"|"endQualifierOpen"|undefined} endQualifier + * @memberof google.bigtable.v2.ColumnRange + * @instance + */ + Object.defineProperty(ColumnRange.prototype, "endQualifier", { + get: $util.oneOfGetter($oneOfFields = ["endQualifierClosed", "endQualifierOpen"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ColumnRange instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {google.bigtable.v2.IColumnRange=} [properties] Properties to set + * @returns {google.bigtable.v2.ColumnRange} ColumnRange instance + */ + ColumnRange.create = function create(properties) { + return new ColumnRange(properties); + }; + + /** + * Encodes the specified ColumnRange message. Does not implicitly {@link google.bigtable.v2.ColumnRange.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {google.bigtable.v2.IColumnRange} message ColumnRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnRange.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + if (message.startQualifierClosed != null && Object.hasOwnProperty.call(message, "startQualifierClosed")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.startQualifierClosed); + if (message.startQualifierOpen != null && Object.hasOwnProperty.call(message, "startQualifierOpen")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.startQualifierOpen); + if (message.endQualifierClosed != null && Object.hasOwnProperty.call(message, "endQualifierClosed")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.endQualifierClosed); + if (message.endQualifierOpen != null && Object.hasOwnProperty.call(message, "endQualifierOpen")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.endQualifierOpen); + return writer; + }; + + /** + * Encodes the specified ColumnRange message, length delimited. Does not implicitly {@link google.bigtable.v2.ColumnRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {google.bigtable.v2.IColumnRange} message ColumnRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ColumnRange message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ColumnRange} ColumnRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.startQualifierClosed = reader.bytes(); + break; + } + case 3: { + message.startQualifierOpen = reader.bytes(); + break; + } + case 4: { + message.endQualifierClosed = reader.bytes(); + break; + } + case 5: { + message.endQualifierOpen = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ColumnRange} ColumnRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnRange message. + * @function verify + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.startQualifierClosed != null && Object.hasOwnProperty.call(message, "startQualifierClosed")) { + properties.startQualifier = 1; + if (!(message.startQualifierClosed && typeof message.startQualifierClosed.length === "number" || $util.isString(message.startQualifierClosed))) + return "startQualifierClosed: buffer expected"; + } + if (message.startQualifierOpen != null && Object.hasOwnProperty.call(message, "startQualifierOpen")) { + if (properties.startQualifier === 1) + return "startQualifier: multiple values"; + properties.startQualifier = 1; + if (!(message.startQualifierOpen && typeof message.startQualifierOpen.length === "number" || $util.isString(message.startQualifierOpen))) + return "startQualifierOpen: buffer expected"; + } + if (message.endQualifierClosed != null && Object.hasOwnProperty.call(message, "endQualifierClosed")) { + properties.endQualifier = 1; + if (!(message.endQualifierClosed && typeof message.endQualifierClosed.length === "number" || $util.isString(message.endQualifierClosed))) + return "endQualifierClosed: buffer expected"; + } + if (message.endQualifierOpen != null && Object.hasOwnProperty.call(message, "endQualifierOpen")) { + if (properties.endQualifier === 1) + return "endQualifier: multiple values"; + properties.endQualifier = 1; + if (!(message.endQualifierOpen && typeof message.endQualifierOpen.length === "number" || $util.isString(message.endQualifierOpen))) + return "endQualifierOpen: buffer expected"; + } + return null; + }; + + /** + * Creates a ColumnRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ColumnRange} ColumnRange + */ + ColumnRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ColumnRange) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ColumnRange: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ColumnRange(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.startQualifierClosed != null) + if (typeof object.startQualifierClosed === "string") + $util.base64.decode(object.startQualifierClosed, message.startQualifierClosed = $util.newBuffer($util.base64.length(object.startQualifierClosed)), 0); + else if (object.startQualifierClosed.length >= 0) + message.startQualifierClosed = object.startQualifierClosed; + if (object.startQualifierOpen != null) + if (typeof object.startQualifierOpen === "string") + $util.base64.decode(object.startQualifierOpen, message.startQualifierOpen = $util.newBuffer($util.base64.length(object.startQualifierOpen)), 0); + else if (object.startQualifierOpen.length >= 0) + message.startQualifierOpen = object.startQualifierOpen; + if (object.endQualifierClosed != null) + if (typeof object.endQualifierClosed === "string") + $util.base64.decode(object.endQualifierClosed, message.endQualifierClosed = $util.newBuffer($util.base64.length(object.endQualifierClosed)), 0); + else if (object.endQualifierClosed.length >= 0) + message.endQualifierClosed = object.endQualifierClosed; + if (object.endQualifierOpen != null) + if (typeof object.endQualifierOpen === "string") + $util.base64.decode(object.endQualifierOpen, message.endQualifierOpen = $util.newBuffer($util.base64.length(object.endQualifierOpen)), 0); + else if (object.endQualifierOpen.length >= 0) + message.endQualifierOpen = object.endQualifierOpen; + return message; + }; + + /** + * Creates a plain object from a ColumnRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {google.bigtable.v2.ColumnRange} message ColumnRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnRange.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.familyName = ""; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = message.familyName; + if (message.startQualifierClosed != null && Object.hasOwnProperty.call(message, "startQualifierClosed")) { + object.startQualifierClosed = options.bytes === String ? $util.base64.encode(message.startQualifierClosed, 0, message.startQualifierClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.startQualifierClosed) : message.startQualifierClosed; + if (options.oneofs) + object.startQualifier = "startQualifierClosed"; + } + if (message.startQualifierOpen != null && Object.hasOwnProperty.call(message, "startQualifierOpen")) { + object.startQualifierOpen = options.bytes === String ? $util.base64.encode(message.startQualifierOpen, 0, message.startQualifierOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.startQualifierOpen) : message.startQualifierOpen; + if (options.oneofs) + object.startQualifier = "startQualifierOpen"; + } + if (message.endQualifierClosed != null && Object.hasOwnProperty.call(message, "endQualifierClosed")) { + object.endQualifierClosed = options.bytes === String ? $util.base64.encode(message.endQualifierClosed, 0, message.endQualifierClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.endQualifierClosed) : message.endQualifierClosed; + if (options.oneofs) + object.endQualifier = "endQualifierClosed"; + } + if (message.endQualifierOpen != null && Object.hasOwnProperty.call(message, "endQualifierOpen")) { + object.endQualifierOpen = options.bytes === String ? $util.base64.encode(message.endQualifierOpen, 0, message.endQualifierOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.endQualifierOpen) : message.endQualifierOpen; + if (options.oneofs) + object.endQualifier = "endQualifierOpen"; + } + return object; + }; + + /** + * Converts this ColumnRange to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ColumnRange + * @instance + * @returns {Object.} JSON object + */ + ColumnRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ColumnRange + * @function getTypeUrl + * @memberof google.bigtable.v2.ColumnRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ColumnRange"; + }; + + return ColumnRange; + })(); + + v2.TimestampRange = (function() { + + /** + * Properties of a TimestampRange. + * @memberof google.bigtable.v2 + * @interface ITimestampRange + * @property {number|Long|null} [startTimestampMicros] TimestampRange startTimestampMicros + * @property {number|Long|null} [endTimestampMicros] TimestampRange endTimestampMicros + */ + + /** + * Constructs a new TimestampRange. + * @memberof google.bigtable.v2 + * @classdesc Represents a TimestampRange. + * @implements ITimestampRange + * @constructor + * @param {google.bigtable.v2.ITimestampRange=} [properties] Properties to set + */ + function TimestampRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimestampRange startTimestampMicros. + * @member {number|Long} startTimestampMicros + * @memberof google.bigtable.v2.TimestampRange + * @instance + */ + TimestampRange.prototype.startTimestampMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TimestampRange endTimestampMicros. + * @member {number|Long} endTimestampMicros + * @memberof google.bigtable.v2.TimestampRange + * @instance + */ + TimestampRange.prototype.endTimestampMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new TimestampRange instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {google.bigtable.v2.ITimestampRange=} [properties] Properties to set + * @returns {google.bigtable.v2.TimestampRange} TimestampRange instance + */ + TimestampRange.create = function create(properties) { + return new TimestampRange(properties); + }; + + /** + * Encodes the specified TimestampRange message. Does not implicitly {@link google.bigtable.v2.TimestampRange.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {google.bigtable.v2.ITimestampRange} message TimestampRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimestampRange.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.startTimestampMicros != null && Object.hasOwnProperty.call(message, "startTimestampMicros")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.startTimestampMicros); + if (message.endTimestampMicros != null && Object.hasOwnProperty.call(message, "endTimestampMicros")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.endTimestampMicros); + return writer; + }; + + /** + * Encodes the specified TimestampRange message, length delimited. Does not implicitly {@link google.bigtable.v2.TimestampRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {google.bigtable.v2.ITimestampRange} message TimestampRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimestampRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TimestampRange message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.TimestampRange} TimestampRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimestampRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.TimestampRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startTimestampMicros = reader.int64(); + break; + } + case 2: { + message.endTimestampMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TimestampRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.TimestampRange} TimestampRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimestampRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimestampRange message. + * @function verify + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimestampRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.startTimestampMicros != null && Object.hasOwnProperty.call(message, "startTimestampMicros")) + if (!$util.isInteger(message.startTimestampMicros) && !(message.startTimestampMicros && $util.isInteger(message.startTimestampMicros.low) && $util.isInteger(message.startTimestampMicros.high))) + return "startTimestampMicros: integer|Long expected"; + if (message.endTimestampMicros != null && Object.hasOwnProperty.call(message, "endTimestampMicros")) + if (!$util.isInteger(message.endTimestampMicros) && !(message.endTimestampMicros && $util.isInteger(message.endTimestampMicros.low) && $util.isInteger(message.endTimestampMicros.high))) + return "endTimestampMicros: integer|Long expected"; + return null; + }; + + /** + * Creates a TimestampRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.TimestampRange} TimestampRange + */ + TimestampRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.TimestampRange) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.TimestampRange: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.TimestampRange(); + if (object.startTimestampMicros != null) + if ($util.Long) + message.startTimestampMicros = $util.Long.fromValue(object.startTimestampMicros, false); + else if (typeof object.startTimestampMicros === "string") + message.startTimestampMicros = parseInt(object.startTimestampMicros, 10); + else if (typeof object.startTimestampMicros === "number") + message.startTimestampMicros = object.startTimestampMicros; + else if (typeof object.startTimestampMicros === "object") + message.startTimestampMicros = new $util.LongBits(object.startTimestampMicros.low >>> 0, object.startTimestampMicros.high >>> 0).toNumber(); + if (object.endTimestampMicros != null) + if ($util.Long) + message.endTimestampMicros = $util.Long.fromValue(object.endTimestampMicros, false); + else if (typeof object.endTimestampMicros === "string") + message.endTimestampMicros = parseInt(object.endTimestampMicros, 10); + else if (typeof object.endTimestampMicros === "number") + message.endTimestampMicros = object.endTimestampMicros; + else if (typeof object.endTimestampMicros === "object") + message.endTimestampMicros = new $util.LongBits(object.endTimestampMicros.low >>> 0, object.endTimestampMicros.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a TimestampRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {google.bigtable.v2.TimestampRange} message TimestampRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimestampRange.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.startTimestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endTimestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.endTimestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + } + if (message.startTimestampMicros != null && Object.hasOwnProperty.call(message, "startTimestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.startTimestampMicros = typeof message.startTimestampMicros === "number" ? BigInt(message.startTimestampMicros) : $util.Long.fromBits(message.startTimestampMicros.low >>> 0, message.startTimestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.startTimestampMicros === "number") + object.startTimestampMicros = options.longs === String ? String(message.startTimestampMicros) : message.startTimestampMicros; + else + object.startTimestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.startTimestampMicros) : options.longs === Number ? new $util.LongBits(message.startTimestampMicros.low >>> 0, message.startTimestampMicros.high >>> 0).toNumber() : message.startTimestampMicros; + if (message.endTimestampMicros != null && Object.hasOwnProperty.call(message, "endTimestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.endTimestampMicros = typeof message.endTimestampMicros === "number" ? BigInt(message.endTimestampMicros) : $util.Long.fromBits(message.endTimestampMicros.low >>> 0, message.endTimestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.endTimestampMicros === "number") + object.endTimestampMicros = options.longs === String ? String(message.endTimestampMicros) : message.endTimestampMicros; + else + object.endTimestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.endTimestampMicros) : options.longs === Number ? new $util.LongBits(message.endTimestampMicros.low >>> 0, message.endTimestampMicros.high >>> 0).toNumber() : message.endTimestampMicros; + return object; + }; + + /** + * Converts this TimestampRange to JSON. + * @function toJSON + * @memberof google.bigtable.v2.TimestampRange + * @instance + * @returns {Object.} JSON object + */ + TimestampRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimestampRange + * @function getTypeUrl + * @memberof google.bigtable.v2.TimestampRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimestampRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.TimestampRange"; + }; + + return TimestampRange; + })(); + + v2.ValueRange = (function() { + + /** + * Properties of a ValueRange. + * @memberof google.bigtable.v2 + * @interface IValueRange + * @property {Uint8Array|null} [startValueClosed] ValueRange startValueClosed + * @property {Uint8Array|null} [startValueOpen] ValueRange startValueOpen + * @property {Uint8Array|null} [endValueClosed] ValueRange endValueClosed + * @property {Uint8Array|null} [endValueOpen] ValueRange endValueOpen + */ + + /** + * Constructs a new ValueRange. + * @memberof google.bigtable.v2 + * @classdesc Represents a ValueRange. + * @implements IValueRange + * @constructor + * @param {google.bigtable.v2.IValueRange=} [properties] Properties to set + */ + function ValueRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValueRange startValueClosed. + * @member {Uint8Array|null|undefined} startValueClosed + * @memberof google.bigtable.v2.ValueRange + * @instance + */ + ValueRange.prototype.startValueClosed = null; + + /** + * ValueRange startValueOpen. + * @member {Uint8Array|null|undefined} startValueOpen + * @memberof google.bigtable.v2.ValueRange + * @instance + */ + ValueRange.prototype.startValueOpen = null; + + /** + * ValueRange endValueClosed. + * @member {Uint8Array|null|undefined} endValueClosed + * @memberof google.bigtable.v2.ValueRange + * @instance + */ + ValueRange.prototype.endValueClosed = null; + + /** + * ValueRange endValueOpen. + * @member {Uint8Array|null|undefined} endValueOpen + * @memberof google.bigtable.v2.ValueRange + * @instance + */ + ValueRange.prototype.endValueOpen = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ValueRange startValue. + * @member {"startValueClosed"|"startValueOpen"|undefined} startValue + * @memberof google.bigtable.v2.ValueRange + * @instance + */ + Object.defineProperty(ValueRange.prototype, "startValue", { + get: $util.oneOfGetter($oneOfFields = ["startValueClosed", "startValueOpen"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ValueRange endValue. + * @member {"endValueClosed"|"endValueOpen"|undefined} endValue + * @memberof google.bigtable.v2.ValueRange + * @instance + */ + Object.defineProperty(ValueRange.prototype, "endValue", { + get: $util.oneOfGetter($oneOfFields = ["endValueClosed", "endValueOpen"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ValueRange instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {google.bigtable.v2.IValueRange=} [properties] Properties to set + * @returns {google.bigtable.v2.ValueRange} ValueRange instance + */ + ValueRange.create = function create(properties) { + return new ValueRange(properties); + }; + + /** + * Encodes the specified ValueRange message. Does not implicitly {@link google.bigtable.v2.ValueRange.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {google.bigtable.v2.IValueRange} message ValueRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueRange.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.startValueClosed != null && Object.hasOwnProperty.call(message, "startValueClosed")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.startValueClosed); + if (message.startValueOpen != null && Object.hasOwnProperty.call(message, "startValueOpen")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.startValueOpen); + if (message.endValueClosed != null && Object.hasOwnProperty.call(message, "endValueClosed")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.endValueClosed); + if (message.endValueOpen != null && Object.hasOwnProperty.call(message, "endValueOpen")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.endValueOpen); + return writer; + }; + + /** + * Encodes the specified ValueRange message, length delimited. Does not implicitly {@link google.bigtable.v2.ValueRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {google.bigtable.v2.IValueRange} message ValueRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ValueRange message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ValueRange} ValueRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ValueRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startValueClosed = reader.bytes(); + break; + } + case 2: { + message.startValueOpen = reader.bytes(); + break; + } + case 3: { + message.endValueClosed = reader.bytes(); + break; + } + case 4: { + message.endValueOpen = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ValueRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ValueRange} ValueRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueRange message. + * @function verify + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.startValueClosed != null && Object.hasOwnProperty.call(message, "startValueClosed")) { + properties.startValue = 1; + if (!(message.startValueClosed && typeof message.startValueClosed.length === "number" || $util.isString(message.startValueClosed))) + return "startValueClosed: buffer expected"; + } + if (message.startValueOpen != null && Object.hasOwnProperty.call(message, "startValueOpen")) { + if (properties.startValue === 1) + return "startValue: multiple values"; + properties.startValue = 1; + if (!(message.startValueOpen && typeof message.startValueOpen.length === "number" || $util.isString(message.startValueOpen))) + return "startValueOpen: buffer expected"; + } + if (message.endValueClosed != null && Object.hasOwnProperty.call(message, "endValueClosed")) { + properties.endValue = 1; + if (!(message.endValueClosed && typeof message.endValueClosed.length === "number" || $util.isString(message.endValueClosed))) + return "endValueClosed: buffer expected"; + } + if (message.endValueOpen != null && Object.hasOwnProperty.call(message, "endValueOpen")) { + if (properties.endValue === 1) + return "endValue: multiple values"; + properties.endValue = 1; + if (!(message.endValueOpen && typeof message.endValueOpen.length === "number" || $util.isString(message.endValueOpen))) + return "endValueOpen: buffer expected"; + } + return null; + }; + + /** + * Creates a ValueRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ValueRange} ValueRange + */ + ValueRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ValueRange) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ValueRange: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ValueRange(); + if (object.startValueClosed != null) + if (typeof object.startValueClosed === "string") + $util.base64.decode(object.startValueClosed, message.startValueClosed = $util.newBuffer($util.base64.length(object.startValueClosed)), 0); + else if (object.startValueClosed.length >= 0) + message.startValueClosed = object.startValueClosed; + if (object.startValueOpen != null) + if (typeof object.startValueOpen === "string") + $util.base64.decode(object.startValueOpen, message.startValueOpen = $util.newBuffer($util.base64.length(object.startValueOpen)), 0); + else if (object.startValueOpen.length >= 0) + message.startValueOpen = object.startValueOpen; + if (object.endValueClosed != null) + if (typeof object.endValueClosed === "string") + $util.base64.decode(object.endValueClosed, message.endValueClosed = $util.newBuffer($util.base64.length(object.endValueClosed)), 0); + else if (object.endValueClosed.length >= 0) + message.endValueClosed = object.endValueClosed; + if (object.endValueOpen != null) + if (typeof object.endValueOpen === "string") + $util.base64.decode(object.endValueOpen, message.endValueOpen = $util.newBuffer($util.base64.length(object.endValueOpen)), 0); + else if (object.endValueOpen.length >= 0) + message.endValueOpen = object.endValueOpen; + return message; + }; + + /** + * Creates a plain object from a ValueRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {google.bigtable.v2.ValueRange} message ValueRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueRange.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.startValueClosed != null && Object.hasOwnProperty.call(message, "startValueClosed")) { + object.startValueClosed = options.bytes === String ? $util.base64.encode(message.startValueClosed, 0, message.startValueClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.startValueClosed) : message.startValueClosed; + if (options.oneofs) + object.startValue = "startValueClosed"; + } + if (message.startValueOpen != null && Object.hasOwnProperty.call(message, "startValueOpen")) { + object.startValueOpen = options.bytes === String ? $util.base64.encode(message.startValueOpen, 0, message.startValueOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.startValueOpen) : message.startValueOpen; + if (options.oneofs) + object.startValue = "startValueOpen"; + } + if (message.endValueClosed != null && Object.hasOwnProperty.call(message, "endValueClosed")) { + object.endValueClosed = options.bytes === String ? $util.base64.encode(message.endValueClosed, 0, message.endValueClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.endValueClosed) : message.endValueClosed; + if (options.oneofs) + object.endValue = "endValueClosed"; + } + if (message.endValueOpen != null && Object.hasOwnProperty.call(message, "endValueOpen")) { + object.endValueOpen = options.bytes === String ? $util.base64.encode(message.endValueOpen, 0, message.endValueOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.endValueOpen) : message.endValueOpen; + if (options.oneofs) + object.endValue = "endValueOpen"; + } + return object; + }; + + /** + * Converts this ValueRange to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ValueRange + * @instance + * @returns {Object.} JSON object + */ + ValueRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ValueRange + * @function getTypeUrl + * @memberof google.bigtable.v2.ValueRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValueRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ValueRange"; + }; + + return ValueRange; + })(); + + v2.ValueBitmask = (function() { + + /** + * Properties of a ValueBitmask. + * @memberof google.bigtable.v2 + * @interface IValueBitmask + * @property {Uint8Array|null} [mask] ValueBitmask mask + */ + + /** + * Constructs a new ValueBitmask. + * @memberof google.bigtable.v2 + * @classdesc Represents a ValueBitmask. + * @implements IValueBitmask + * @constructor + * @param {google.bigtable.v2.IValueBitmask=} [properties] Properties to set + */ + function ValueBitmask(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValueBitmask mask. + * @member {Uint8Array} mask + * @memberof google.bigtable.v2.ValueBitmask + * @instance + */ + ValueBitmask.prototype.mask = $util.newBuffer([]); + + /** + * Creates a new ValueBitmask instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {google.bigtable.v2.IValueBitmask=} [properties] Properties to set + * @returns {google.bigtable.v2.ValueBitmask} ValueBitmask instance + */ + ValueBitmask.create = function create(properties) { + return new ValueBitmask(properties); + }; + + /** + * Encodes the specified ValueBitmask message. Does not implicitly {@link google.bigtable.v2.ValueBitmask.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {google.bigtable.v2.IValueBitmask} message ValueBitmask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueBitmask.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.mask != null && Object.hasOwnProperty.call(message, "mask")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.mask); + return writer; + }; + + /** + * Encodes the specified ValueBitmask message, length delimited. Does not implicitly {@link google.bigtable.v2.ValueBitmask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {google.bigtable.v2.IValueBitmask} message ValueBitmask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueBitmask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ValueBitmask message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ValueBitmask} ValueBitmask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueBitmask.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ValueBitmask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mask = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ValueBitmask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ValueBitmask} ValueBitmask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueBitmask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueBitmask message. + * @function verify + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueBitmask.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.mask != null && Object.hasOwnProperty.call(message, "mask")) + if (!(message.mask && typeof message.mask.length === "number" || $util.isString(message.mask))) + return "mask: buffer expected"; + return null; + }; + + /** + * Creates a ValueBitmask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ValueBitmask} ValueBitmask + */ + ValueBitmask.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ValueBitmask) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ValueBitmask: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ValueBitmask(); + if (object.mask != null) + if (typeof object.mask === "string") + $util.base64.decode(object.mask, message.mask = $util.newBuffer($util.base64.length(object.mask)), 0); + else if (object.mask.length >= 0) + message.mask = object.mask; + return message; + }; + + /** + * Creates a plain object from a ValueBitmask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {google.bigtable.v2.ValueBitmask} message ValueBitmask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueBitmask.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.mask = ""; + else { + object.mask = []; + if (options.bytes !== Array) + object.mask = $util.newBuffer(object.mask); + } + if (message.mask != null && Object.hasOwnProperty.call(message, "mask")) + object.mask = options.bytes === String ? $util.base64.encode(message.mask, 0, message.mask.length) : options.bytes === Array ? Array.prototype.slice.call(message.mask) : message.mask; + return object; + }; + + /** + * Converts this ValueBitmask to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ValueBitmask + * @instance + * @returns {Object.} JSON object + */ + ValueBitmask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ValueBitmask + * @function getTypeUrl + * @memberof google.bigtable.v2.ValueBitmask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValueBitmask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ValueBitmask"; + }; + + return ValueBitmask; + })(); + + v2.RowFilter = (function() { + + /** + * Properties of a RowFilter. + * @memberof google.bigtable.v2 + * @interface IRowFilter + * @property {google.bigtable.v2.RowFilter.IChain|null} [chain] RowFilter chain + * @property {google.bigtable.v2.RowFilter.IInterleave|null} [interleave] RowFilter interleave + * @property {google.bigtable.v2.RowFilter.ICondition|null} [condition] RowFilter condition + * @property {boolean|null} [sink] RowFilter sink + * @property {boolean|null} [passAllFilter] RowFilter passAllFilter + * @property {boolean|null} [blockAllFilter] RowFilter blockAllFilter + * @property {Uint8Array|null} [rowKeyRegexFilter] RowFilter rowKeyRegexFilter + * @property {number|null} [rowSampleFilter] RowFilter rowSampleFilter + * @property {string|null} [familyNameRegexFilter] RowFilter familyNameRegexFilter + * @property {Uint8Array|null} [columnQualifierRegexFilter] RowFilter columnQualifierRegexFilter + * @property {google.bigtable.v2.IColumnRange|null} [columnRangeFilter] RowFilter columnRangeFilter + * @property {google.bigtable.v2.ITimestampRange|null} [timestampRangeFilter] RowFilter timestampRangeFilter + * @property {Uint8Array|null} [valueRegexFilter] RowFilter valueRegexFilter + * @property {google.bigtable.v2.IValueRange|null} [valueRangeFilter] RowFilter valueRangeFilter + * @property {number|null} [cellsPerRowOffsetFilter] RowFilter cellsPerRowOffsetFilter + * @property {number|null} [cellsPerRowLimitFilter] RowFilter cellsPerRowLimitFilter + * @property {number|null} [cellsPerColumnLimitFilter] RowFilter cellsPerColumnLimitFilter + * @property {boolean|null} [stripValueTransformer] RowFilter stripValueTransformer + * @property {string|null} [applyLabelTransformer] RowFilter applyLabelTransformer + * @property {google.bigtable.v2.IValueBitmask|null} [valueBitmaskFilter] RowFilter valueBitmaskFilter + */ + + /** + * Constructs a new RowFilter. + * @memberof google.bigtable.v2 + * @classdesc Represents a RowFilter. + * @implements IRowFilter + * @constructor + * @param {google.bigtable.v2.IRowFilter=} [properties] Properties to set + */ + function RowFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RowFilter chain. + * @member {google.bigtable.v2.RowFilter.IChain|null|undefined} chain + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.chain = null; + + /** + * RowFilter interleave. + * @member {google.bigtable.v2.RowFilter.IInterleave|null|undefined} interleave + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.interleave = null; + + /** + * RowFilter condition. + * @member {google.bigtable.v2.RowFilter.ICondition|null|undefined} condition + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.condition = null; + + /** + * RowFilter sink. + * @member {boolean|null|undefined} sink + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.sink = null; + + /** + * RowFilter passAllFilter. + * @member {boolean|null|undefined} passAllFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.passAllFilter = null; + + /** + * RowFilter blockAllFilter. + * @member {boolean|null|undefined} blockAllFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.blockAllFilter = null; + + /** + * RowFilter rowKeyRegexFilter. + * @member {Uint8Array|null|undefined} rowKeyRegexFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.rowKeyRegexFilter = null; + + /** + * RowFilter rowSampleFilter. + * @member {number|null|undefined} rowSampleFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.rowSampleFilter = null; + + /** + * RowFilter familyNameRegexFilter. + * @member {string|null|undefined} familyNameRegexFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.familyNameRegexFilter = null; + + /** + * RowFilter columnQualifierRegexFilter. + * @member {Uint8Array|null|undefined} columnQualifierRegexFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.columnQualifierRegexFilter = null; + + /** + * RowFilter columnRangeFilter. + * @member {google.bigtable.v2.IColumnRange|null|undefined} columnRangeFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.columnRangeFilter = null; + + /** + * RowFilter timestampRangeFilter. + * @member {google.bigtable.v2.ITimestampRange|null|undefined} timestampRangeFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.timestampRangeFilter = null; + + /** + * RowFilter valueRegexFilter. + * @member {Uint8Array|null|undefined} valueRegexFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.valueRegexFilter = null; + + /** + * RowFilter valueRangeFilter. + * @member {google.bigtable.v2.IValueRange|null|undefined} valueRangeFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.valueRangeFilter = null; + + /** + * RowFilter cellsPerRowOffsetFilter. + * @member {number|null|undefined} cellsPerRowOffsetFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.cellsPerRowOffsetFilter = null; + + /** + * RowFilter cellsPerRowLimitFilter. + * @member {number|null|undefined} cellsPerRowLimitFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.cellsPerRowLimitFilter = null; + + /** + * RowFilter cellsPerColumnLimitFilter. + * @member {number|null|undefined} cellsPerColumnLimitFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.cellsPerColumnLimitFilter = null; + + /** + * RowFilter stripValueTransformer. + * @member {boolean|null|undefined} stripValueTransformer + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.stripValueTransformer = null; + + /** + * RowFilter applyLabelTransformer. + * @member {string|null|undefined} applyLabelTransformer + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.applyLabelTransformer = null; + + /** + * RowFilter valueBitmaskFilter. + * @member {google.bigtable.v2.IValueBitmask|null|undefined} valueBitmaskFilter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + RowFilter.prototype.valueBitmaskFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RowFilter filter. + * @member {"chain"|"interleave"|"condition"|"sink"|"passAllFilter"|"blockAllFilter"|"rowKeyRegexFilter"|"rowSampleFilter"|"familyNameRegexFilter"|"columnQualifierRegexFilter"|"columnRangeFilter"|"timestampRangeFilter"|"valueRegexFilter"|"valueRangeFilter"|"cellsPerRowOffsetFilter"|"cellsPerRowLimitFilter"|"cellsPerColumnLimitFilter"|"stripValueTransformer"|"applyLabelTransformer"|"valueBitmaskFilter"|undefined} filter + * @memberof google.bigtable.v2.RowFilter + * @instance + */ + Object.defineProperty(RowFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["chain", "interleave", "condition", "sink", "passAllFilter", "blockAllFilter", "rowKeyRegexFilter", "rowSampleFilter", "familyNameRegexFilter", "columnQualifierRegexFilter", "columnRangeFilter", "timestampRangeFilter", "valueRegexFilter", "valueRangeFilter", "cellsPerRowOffsetFilter", "cellsPerRowLimitFilter", "cellsPerColumnLimitFilter", "stripValueTransformer", "applyLabelTransformer", "valueBitmaskFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RowFilter instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {google.bigtable.v2.IRowFilter=} [properties] Properties to set + * @returns {google.bigtable.v2.RowFilter} RowFilter instance + */ + RowFilter.create = function create(properties) { + return new RowFilter(properties); + }; + + /** + * Encodes the specified RowFilter message. Does not implicitly {@link google.bigtable.v2.RowFilter.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {google.bigtable.v2.IRowFilter} message RowFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowFilter.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.chain != null && Object.hasOwnProperty.call(message, "chain")) + $root.google.bigtable.v2.RowFilter.Chain.encode(message.chain, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.interleave != null && Object.hasOwnProperty.call(message, "interleave")) + $root.google.bigtable.v2.RowFilter.Interleave.encode(message.interleave, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.bigtable.v2.RowFilter.Condition.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.rowKeyRegexFilter != null && Object.hasOwnProperty.call(message, "rowKeyRegexFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.rowKeyRegexFilter); + if (message.familyNameRegexFilter != null && Object.hasOwnProperty.call(message, "familyNameRegexFilter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.familyNameRegexFilter); + if (message.columnQualifierRegexFilter != null && Object.hasOwnProperty.call(message, "columnQualifierRegexFilter")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.columnQualifierRegexFilter); + if (message.columnRangeFilter != null && Object.hasOwnProperty.call(message, "columnRangeFilter")) + $root.google.bigtable.v2.ColumnRange.encode(message.columnRangeFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.timestampRangeFilter != null && Object.hasOwnProperty.call(message, "timestampRangeFilter")) + $root.google.bigtable.v2.TimestampRange.encode(message.timestampRangeFilter, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + if (message.valueRegexFilter != null && Object.hasOwnProperty.call(message, "valueRegexFilter")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.valueRegexFilter); + if (message.cellsPerRowOffsetFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowOffsetFilter")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.cellsPerRowOffsetFilter); + if (message.cellsPerRowLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowLimitFilter")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.cellsPerRowLimitFilter); + if (message.cellsPerColumnLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerColumnLimitFilter")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.cellsPerColumnLimitFilter); + if (message.stripValueTransformer != null && Object.hasOwnProperty.call(message, "stripValueTransformer")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.stripValueTransformer); + if (message.rowSampleFilter != null && Object.hasOwnProperty.call(message, "rowSampleFilter")) + writer.uint32(/* id 14, wireType 1 =*/113).double(message.rowSampleFilter); + if (message.valueRangeFilter != null && Object.hasOwnProperty.call(message, "valueRangeFilter")) + $root.google.bigtable.v2.ValueRange.encode(message.valueRangeFilter, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim(); + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.sink); + if (message.passAllFilter != null && Object.hasOwnProperty.call(message, "passAllFilter")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.passAllFilter); + if (message.blockAllFilter != null && Object.hasOwnProperty.call(message, "blockAllFilter")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.blockAllFilter); + if (message.applyLabelTransformer != null && Object.hasOwnProperty.call(message, "applyLabelTransformer")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.applyLabelTransformer); + if (message.valueBitmaskFilter != null && Object.hasOwnProperty.call(message, "valueBitmaskFilter")) + $root.google.bigtable.v2.ValueBitmask.encode(message.valueBitmaskFilter, writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified RowFilter message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {google.bigtable.v2.IRowFilter} message RowFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RowFilter message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RowFilter} RowFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowFilter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.chain = $root.google.bigtable.v2.RowFilter.Chain.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.condition = $root.google.bigtable.v2.RowFilter.Condition.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 16: { + message.sink = reader.bool(); + break; + } + case 17: { + message.passAllFilter = reader.bool(); + break; + } + case 18: { + message.blockAllFilter = reader.bool(); + break; + } + case 4: { + message.rowKeyRegexFilter = reader.bytes(); + break; + } + case 14: { + message.rowSampleFilter = reader.double(); + break; + } + case 5: { + message.familyNameRegexFilter = reader.string(); + break; + } + case 6: { + message.columnQualifierRegexFilter = reader.bytes(); + break; + } + case 7: { + message.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.valueRegexFilter = reader.bytes(); + break; + } + case 15: { + message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.cellsPerRowOffsetFilter = reader.int32(); + break; + } + case 11: { + message.cellsPerRowLimitFilter = reader.int32(); + break; + } + case 12: { + message.cellsPerColumnLimitFilter = reader.int32(); + break; + } + case 13: { + message.stripValueTransformer = reader.bool(); + break; + } + case 19: { + message.applyLabelTransformer = reader.string(); + break; + } + case 20: { + message.valueBitmaskFilter = $root.google.bigtable.v2.ValueBitmask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RowFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RowFilter} RowFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RowFilter message. + * @function verify + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowFilter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.chain != null && Object.hasOwnProperty.call(message, "chain")) { + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Chain.verify(message.chain, long + 1); + if (error) + return "chain." + error; + } + } + if (message.interleave != null && Object.hasOwnProperty.call(message, "interleave")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Interleave.verify(message.interleave, long + 1); + if (error) + return "interleave." + error; + } + } + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.RowFilter.Condition.verify(message.condition, long + 1); + if (error) + return "condition." + error; + } + } + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (typeof message.sink !== "boolean") + return "sink: boolean expected"; + } + if (message.passAllFilter != null && Object.hasOwnProperty.call(message, "passAllFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (typeof message.passAllFilter !== "boolean") + return "passAllFilter: boolean expected"; + } + if (message.blockAllFilter != null && Object.hasOwnProperty.call(message, "blockAllFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (typeof message.blockAllFilter !== "boolean") + return "blockAllFilter: boolean expected"; + } + if (message.rowKeyRegexFilter != null && Object.hasOwnProperty.call(message, "rowKeyRegexFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!(message.rowKeyRegexFilter && typeof message.rowKeyRegexFilter.length === "number" || $util.isString(message.rowKeyRegexFilter))) + return "rowKeyRegexFilter: buffer expected"; + } + if (message.rowSampleFilter != null && Object.hasOwnProperty.call(message, "rowSampleFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (typeof message.rowSampleFilter !== "number") + return "rowSampleFilter: number expected"; + } + if (message.familyNameRegexFilter != null && Object.hasOwnProperty.call(message, "familyNameRegexFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.familyNameRegexFilter)) + return "familyNameRegexFilter: string expected"; + } + if (message.columnQualifierRegexFilter != null && Object.hasOwnProperty.call(message, "columnQualifierRegexFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!(message.columnQualifierRegexFilter && typeof message.columnQualifierRegexFilter.length === "number" || $util.isString(message.columnQualifierRegexFilter))) + return "columnQualifierRegexFilter: buffer expected"; + } + if (message.columnRangeFilter != null && Object.hasOwnProperty.call(message, "columnRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.ColumnRange.verify(message.columnRangeFilter, long + 1); + if (error) + return "columnRangeFilter." + error; + } + } + if (message.timestampRangeFilter != null && Object.hasOwnProperty.call(message, "timestampRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.TimestampRange.verify(message.timestampRangeFilter, long + 1); + if (error) + return "timestampRangeFilter." + error; + } + } + if (message.valueRegexFilter != null && Object.hasOwnProperty.call(message, "valueRegexFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!(message.valueRegexFilter && typeof message.valueRegexFilter.length === "number" || $util.isString(message.valueRegexFilter))) + return "valueRegexFilter: buffer expected"; + } + if (message.valueRangeFilter != null && Object.hasOwnProperty.call(message, "valueRangeFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.ValueRange.verify(message.valueRangeFilter, long + 1); + if (error) + return "valueRangeFilter." + error; + } + } + if (message.cellsPerRowOffsetFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowOffsetFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isInteger(message.cellsPerRowOffsetFilter)) + return "cellsPerRowOffsetFilter: integer expected"; + } + if (message.cellsPerRowLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowLimitFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isInteger(message.cellsPerRowLimitFilter)) + return "cellsPerRowLimitFilter: integer expected"; + } + if (message.cellsPerColumnLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerColumnLimitFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isInteger(message.cellsPerColumnLimitFilter)) + return "cellsPerColumnLimitFilter: integer expected"; + } + if (message.stripValueTransformer != null && Object.hasOwnProperty.call(message, "stripValueTransformer")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (typeof message.stripValueTransformer !== "boolean") + return "stripValueTransformer: boolean expected"; + } + if (message.applyLabelTransformer != null && Object.hasOwnProperty.call(message, "applyLabelTransformer")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.applyLabelTransformer)) + return "applyLabelTransformer: string expected"; + } + if (message.valueBitmaskFilter != null && Object.hasOwnProperty.call(message, "valueBitmaskFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.bigtable.v2.ValueBitmask.verify(message.valueBitmaskFilter, long + 1); + if (error) + return "valueBitmaskFilter." + error; + } + } + return null; + }; + + /** + * Creates a RowFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RowFilter} RowFilter + */ + RowFilter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.RowFilter) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowFilter: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RowFilter(); + if (object.chain != null) { + if (!$util.isObject(object.chain)) + throw TypeError(".google.bigtable.v2.RowFilter.chain: object expected"); + message.chain = $root.google.bigtable.v2.RowFilter.Chain.fromObject(object.chain, long + 1); + } + if (object.interleave != null) { + if (!$util.isObject(object.interleave)) + throw TypeError(".google.bigtable.v2.RowFilter.interleave: object expected"); + message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.fromObject(object.interleave, long + 1); + } + if (object.condition != null) { + if (!$util.isObject(object.condition)) + throw TypeError(".google.bigtable.v2.RowFilter.condition: object expected"); + message.condition = $root.google.bigtable.v2.RowFilter.Condition.fromObject(object.condition, long + 1); + } + if (object.sink != null) + message.sink = Boolean(object.sink); + if (object.passAllFilter != null) + message.passAllFilter = Boolean(object.passAllFilter); + if (object.blockAllFilter != null) + message.blockAllFilter = Boolean(object.blockAllFilter); + if (object.rowKeyRegexFilter != null) + if (typeof object.rowKeyRegexFilter === "string") + $util.base64.decode(object.rowKeyRegexFilter, message.rowKeyRegexFilter = $util.newBuffer($util.base64.length(object.rowKeyRegexFilter)), 0); + else if (object.rowKeyRegexFilter.length >= 0) + message.rowKeyRegexFilter = object.rowKeyRegexFilter; + if (object.rowSampleFilter != null) + message.rowSampleFilter = Number(object.rowSampleFilter); + if (object.familyNameRegexFilter != null) + message.familyNameRegexFilter = String(object.familyNameRegexFilter); + if (object.columnQualifierRegexFilter != null) + if (typeof object.columnQualifierRegexFilter === "string") + $util.base64.decode(object.columnQualifierRegexFilter, message.columnQualifierRegexFilter = $util.newBuffer($util.base64.length(object.columnQualifierRegexFilter)), 0); + else if (object.columnQualifierRegexFilter.length >= 0) + message.columnQualifierRegexFilter = object.columnQualifierRegexFilter; + if (object.columnRangeFilter != null) { + if (!$util.isObject(object.columnRangeFilter)) + throw TypeError(".google.bigtable.v2.RowFilter.columnRangeFilter: object expected"); + message.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.fromObject(object.columnRangeFilter, long + 1); + } + if (object.timestampRangeFilter != null) { + if (!$util.isObject(object.timestampRangeFilter)) + throw TypeError(".google.bigtable.v2.RowFilter.timestampRangeFilter: object expected"); + message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.fromObject(object.timestampRangeFilter, long + 1); + } + if (object.valueRegexFilter != null) + if (typeof object.valueRegexFilter === "string") + $util.base64.decode(object.valueRegexFilter, message.valueRegexFilter = $util.newBuffer($util.base64.length(object.valueRegexFilter)), 0); + else if (object.valueRegexFilter.length >= 0) + message.valueRegexFilter = object.valueRegexFilter; + if (object.valueRangeFilter != null) { + if (!$util.isObject(object.valueRangeFilter)) + throw TypeError(".google.bigtable.v2.RowFilter.valueRangeFilter: object expected"); + message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.fromObject(object.valueRangeFilter, long + 1); + } + if (object.cellsPerRowOffsetFilter != null) + message.cellsPerRowOffsetFilter = object.cellsPerRowOffsetFilter | 0; + if (object.cellsPerRowLimitFilter != null) + message.cellsPerRowLimitFilter = object.cellsPerRowLimitFilter | 0; + if (object.cellsPerColumnLimitFilter != null) + message.cellsPerColumnLimitFilter = object.cellsPerColumnLimitFilter | 0; + if (object.stripValueTransformer != null) + message.stripValueTransformer = Boolean(object.stripValueTransformer); + if (object.applyLabelTransformer != null) + message.applyLabelTransformer = String(object.applyLabelTransformer); + if (object.valueBitmaskFilter != null) { + if (!$util.isObject(object.valueBitmaskFilter)) + throw TypeError(".google.bigtable.v2.RowFilter.valueBitmaskFilter: object expected"); + message.valueBitmaskFilter = $root.google.bigtable.v2.ValueBitmask.fromObject(object.valueBitmaskFilter, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RowFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {google.bigtable.v2.RowFilter} message RowFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowFilter.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.chain != null && Object.hasOwnProperty.call(message, "chain")) { + object.chain = $root.google.bigtable.v2.RowFilter.Chain.toObject(message.chain, options, q + 1); + if (options.oneofs) + object.filter = "chain"; + } + if (message.interleave != null && Object.hasOwnProperty.call(message, "interleave")) { + object.interleave = $root.google.bigtable.v2.RowFilter.Interleave.toObject(message.interleave, options, q + 1); + if (options.oneofs) + object.filter = "interleave"; + } + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) { + object.condition = $root.google.bigtable.v2.RowFilter.Condition.toObject(message.condition, options, q + 1); + if (options.oneofs) + object.filter = "condition"; + } + if (message.rowKeyRegexFilter != null && Object.hasOwnProperty.call(message, "rowKeyRegexFilter")) { + object.rowKeyRegexFilter = options.bytes === String ? $util.base64.encode(message.rowKeyRegexFilter, 0, message.rowKeyRegexFilter.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKeyRegexFilter) : message.rowKeyRegexFilter; + if (options.oneofs) + object.filter = "rowKeyRegexFilter"; + } + if (message.familyNameRegexFilter != null && Object.hasOwnProperty.call(message, "familyNameRegexFilter")) { + object.familyNameRegexFilter = message.familyNameRegexFilter; + if (options.oneofs) + object.filter = "familyNameRegexFilter"; + } + if (message.columnQualifierRegexFilter != null && Object.hasOwnProperty.call(message, "columnQualifierRegexFilter")) { + object.columnQualifierRegexFilter = options.bytes === String ? $util.base64.encode(message.columnQualifierRegexFilter, 0, message.columnQualifierRegexFilter.length) : options.bytes === Array ? Array.prototype.slice.call(message.columnQualifierRegexFilter) : message.columnQualifierRegexFilter; + if (options.oneofs) + object.filter = "columnQualifierRegexFilter"; + } + if (message.columnRangeFilter != null && Object.hasOwnProperty.call(message, "columnRangeFilter")) { + object.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.toObject(message.columnRangeFilter, options, q + 1); + if (options.oneofs) + object.filter = "columnRangeFilter"; + } + if (message.timestampRangeFilter != null && Object.hasOwnProperty.call(message, "timestampRangeFilter")) { + object.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.toObject(message.timestampRangeFilter, options, q + 1); + if (options.oneofs) + object.filter = "timestampRangeFilter"; + } + if (message.valueRegexFilter != null && Object.hasOwnProperty.call(message, "valueRegexFilter")) { + object.valueRegexFilter = options.bytes === String ? $util.base64.encode(message.valueRegexFilter, 0, message.valueRegexFilter.length) : options.bytes === Array ? Array.prototype.slice.call(message.valueRegexFilter) : message.valueRegexFilter; + if (options.oneofs) + object.filter = "valueRegexFilter"; + } + if (message.cellsPerRowOffsetFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowOffsetFilter")) { + object.cellsPerRowOffsetFilter = message.cellsPerRowOffsetFilter; + if (options.oneofs) + object.filter = "cellsPerRowOffsetFilter"; + } + if (message.cellsPerRowLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowLimitFilter")) { + object.cellsPerRowLimitFilter = message.cellsPerRowLimitFilter; + if (options.oneofs) + object.filter = "cellsPerRowLimitFilter"; + } + if (message.cellsPerColumnLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerColumnLimitFilter")) { + object.cellsPerColumnLimitFilter = message.cellsPerColumnLimitFilter; + if (options.oneofs) + object.filter = "cellsPerColumnLimitFilter"; + } + if (message.stripValueTransformer != null && Object.hasOwnProperty.call(message, "stripValueTransformer")) { + object.stripValueTransformer = message.stripValueTransformer; + if (options.oneofs) + object.filter = "stripValueTransformer"; + } + if (message.rowSampleFilter != null && Object.hasOwnProperty.call(message, "rowSampleFilter")) { + object.rowSampleFilter = options.json && !isFinite(message.rowSampleFilter) ? String(message.rowSampleFilter) : message.rowSampleFilter; + if (options.oneofs) + object.filter = "rowSampleFilter"; + } + if (message.valueRangeFilter != null && Object.hasOwnProperty.call(message, "valueRangeFilter")) { + object.valueRangeFilter = $root.google.bigtable.v2.ValueRange.toObject(message.valueRangeFilter, options, q + 1); + if (options.oneofs) + object.filter = "valueRangeFilter"; + } + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) { + object.sink = message.sink; + if (options.oneofs) + object.filter = "sink"; + } + if (message.passAllFilter != null && Object.hasOwnProperty.call(message, "passAllFilter")) { + object.passAllFilter = message.passAllFilter; + if (options.oneofs) + object.filter = "passAllFilter"; + } + if (message.blockAllFilter != null && Object.hasOwnProperty.call(message, "blockAllFilter")) { + object.blockAllFilter = message.blockAllFilter; + if (options.oneofs) + object.filter = "blockAllFilter"; + } + if (message.applyLabelTransformer != null && Object.hasOwnProperty.call(message, "applyLabelTransformer")) { + object.applyLabelTransformer = message.applyLabelTransformer; + if (options.oneofs) + object.filter = "applyLabelTransformer"; + } + if (message.valueBitmaskFilter != null && Object.hasOwnProperty.call(message, "valueBitmaskFilter")) { + object.valueBitmaskFilter = $root.google.bigtable.v2.ValueBitmask.toObject(message.valueBitmaskFilter, options, q + 1); + if (options.oneofs) + object.filter = "valueBitmaskFilter"; + } + return object; + }; + + /** + * Converts this RowFilter to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RowFilter + * @instance + * @returns {Object.} JSON object + */ + RowFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RowFilter + * @function getTypeUrl + * @memberof google.bigtable.v2.RowFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RowFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RowFilter"; + }; + + RowFilter.Chain = (function() { + + /** + * Properties of a Chain. + * @memberof google.bigtable.v2.RowFilter + * @interface IChain + * @property {Array.|null} [filters] Chain filters + */ + + /** + * Constructs a new Chain. + * @memberof google.bigtable.v2.RowFilter + * @classdesc Represents a Chain. + * @implements IChain + * @constructor + * @param {google.bigtable.v2.RowFilter.IChain=} [properties] Properties to set + */ + function Chain(properties) { + this.filters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Chain filters. + * @member {Array.} filters + * @memberof google.bigtable.v2.RowFilter.Chain + * @instance + */ + Chain.prototype.filters = $util.emptyArray; + + /** + * Creates a new Chain instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {google.bigtable.v2.RowFilter.IChain=} [properties] Properties to set + * @returns {google.bigtable.v2.RowFilter.Chain} Chain instance + */ + Chain.create = function create(properties) { + return new Chain(properties); + }; + + /** + * Encodes the specified Chain message. Does not implicitly {@link google.bigtable.v2.RowFilter.Chain.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {google.bigtable.v2.RowFilter.IChain} message Chain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Chain.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.bigtable.v2.RowFilter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Chain message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Chain.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {google.bigtable.v2.RowFilter.IChain} message Chain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Chain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Chain message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RowFilter.Chain} Chain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Chain.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter.Chain(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Chain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RowFilter.Chain} Chain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Chain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Chain message. + * @function verify + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Chain.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.filters != null && Object.hasOwnProperty.call(message, "filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i], long + 1); + if (error) + return "filters." + error; + } + } + return null; + }; + + /** + * Creates a Chain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RowFilter.Chain} Chain + */ + Chain.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Chain) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowFilter.Chain: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RowFilter.Chain(); + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.bigtable.v2.RowFilter.Chain.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (!$util.isObject(object.filters[i])) + throw TypeError(".google.bigtable.v2.RowFilter.Chain.filters: object expected"); + message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Chain message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {google.bigtable.v2.RowFilter.Chain} message Chain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Chain.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.filters = []; + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.bigtable.v2.RowFilter.toObject(message.filters[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Chain to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RowFilter.Chain + * @instance + * @returns {Object.} JSON object + */ + Chain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Chain + * @function getTypeUrl + * @memberof google.bigtable.v2.RowFilter.Chain + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Chain.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RowFilter.Chain"; + }; + + return Chain; + })(); + + RowFilter.Interleave = (function() { + + /** + * Properties of an Interleave. + * @memberof google.bigtable.v2.RowFilter + * @interface IInterleave + * @property {Array.|null} [filters] Interleave filters + */ + + /** + * Constructs a new Interleave. + * @memberof google.bigtable.v2.RowFilter + * @classdesc Represents an Interleave. + * @implements IInterleave + * @constructor + * @param {google.bigtable.v2.RowFilter.IInterleave=} [properties] Properties to set + */ + function Interleave(properties) { + this.filters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Interleave filters. + * @member {Array.} filters + * @memberof google.bigtable.v2.RowFilter.Interleave + * @instance + */ + Interleave.prototype.filters = $util.emptyArray; + + /** + * Creates a new Interleave instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {google.bigtable.v2.RowFilter.IInterleave=} [properties] Properties to set + * @returns {google.bigtable.v2.RowFilter.Interleave} Interleave instance + */ + Interleave.create = function create(properties) { + return new Interleave(properties); + }; + + /** + * Encodes the specified Interleave message. Does not implicitly {@link google.bigtable.v2.RowFilter.Interleave.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {google.bigtable.v2.RowFilter.IInterleave} message Interleave message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interleave.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.bigtable.v2.RowFilter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Interleave message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Interleave.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {google.bigtable.v2.RowFilter.IInterleave} message Interleave message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interleave.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Interleave message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RowFilter.Interleave} Interleave + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interleave.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter.Interleave(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Interleave message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RowFilter.Interleave} Interleave + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interleave.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interleave message. + * @function verify + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interleave.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.filters != null && Object.hasOwnProperty.call(message, "filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filters[i], long + 1); + if (error) + return "filters." + error; + } + } + return null; + }; + + /** + * Creates an Interleave message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RowFilter.Interleave} Interleave + */ + Interleave.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Interleave) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowFilter.Interleave: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RowFilter.Interleave(); + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.bigtable.v2.RowFilter.Interleave.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (!$util.isObject(object.filters[i])) + throw TypeError(".google.bigtable.v2.RowFilter.Interleave.filters: object expected"); + message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an Interleave message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {google.bigtable.v2.RowFilter.Interleave} message Interleave + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interleave.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.filters = []; + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.bigtable.v2.RowFilter.toObject(message.filters[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Interleave to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RowFilter.Interleave + * @instance + * @returns {Object.} JSON object + */ + Interleave.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interleave + * @function getTypeUrl + * @memberof google.bigtable.v2.RowFilter.Interleave + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interleave.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RowFilter.Interleave"; + }; + + return Interleave; + })(); + + RowFilter.Condition = (function() { + + /** + * Properties of a Condition. + * @memberof google.bigtable.v2.RowFilter + * @interface ICondition + * @property {google.bigtable.v2.IRowFilter|null} [predicateFilter] Condition predicateFilter + * @property {google.bigtable.v2.IRowFilter|null} [trueFilter] Condition trueFilter + * @property {google.bigtable.v2.IRowFilter|null} [falseFilter] Condition falseFilter + */ + + /** + * Constructs a new Condition. + * @memberof google.bigtable.v2.RowFilter + * @classdesc Represents a Condition. + * @implements ICondition + * @constructor + * @param {google.bigtable.v2.RowFilter.ICondition=} [properties] Properties to set + */ + function Condition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Condition predicateFilter. + * @member {google.bigtable.v2.IRowFilter|null|undefined} predicateFilter + * @memberof google.bigtable.v2.RowFilter.Condition + * @instance + */ + Condition.prototype.predicateFilter = null; + + /** + * Condition trueFilter. + * @member {google.bigtable.v2.IRowFilter|null|undefined} trueFilter + * @memberof google.bigtable.v2.RowFilter.Condition + * @instance + */ + Condition.prototype.trueFilter = null; + + /** + * Condition falseFilter. + * @member {google.bigtable.v2.IRowFilter|null|undefined} falseFilter + * @memberof google.bigtable.v2.RowFilter.Condition + * @instance + */ + Condition.prototype.falseFilter = null; + + /** + * Creates a new Condition instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {google.bigtable.v2.RowFilter.ICondition=} [properties] Properties to set + * @returns {google.bigtable.v2.RowFilter.Condition} Condition instance + */ + Condition.create = function create(properties) { + return new Condition(properties); + }; + + /** + * Encodes the specified Condition message. Does not implicitly {@link google.bigtable.v2.RowFilter.Condition.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {google.bigtable.v2.RowFilter.ICondition} message Condition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Condition.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) + $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.trueFilter != null && Object.hasOwnProperty.call(message, "trueFilter")) + $root.google.bigtable.v2.RowFilter.encode(message.trueFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.falseFilter != null && Object.hasOwnProperty.call(message, "falseFilter")) + $root.google.bigtable.v2.RowFilter.encode(message.falseFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.bigtable.v2.RowFilter.Condition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {google.bigtable.v2.RowFilter.ICondition} message Condition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Condition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Condition message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RowFilter.Condition} Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Condition.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RowFilter.Condition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.predicateFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.trueFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.falseFilter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Condition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RowFilter.Condition} Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Condition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Condition message. + * @function verify + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Condition.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter, long + 1); + if (error) + return "predicateFilter." + error; + } + if (message.trueFilter != null && Object.hasOwnProperty.call(message, "trueFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.trueFilter, long + 1); + if (error) + return "trueFilter." + error; + } + if (message.falseFilter != null && Object.hasOwnProperty.call(message, "falseFilter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.falseFilter, long + 1); + if (error) + return "falseFilter." + error; + } + return null; + }; + + /** + * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RowFilter.Condition} Condition + */ + Condition.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.RowFilter.Condition) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowFilter.Condition: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RowFilter.Condition(); + if (object.predicateFilter != null) { + if (!$util.isObject(object.predicateFilter)) + throw TypeError(".google.bigtable.v2.RowFilter.Condition.predicateFilter: object expected"); + message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter, long + 1); + } + if (object.trueFilter != null) { + if (!$util.isObject(object.trueFilter)) + throw TypeError(".google.bigtable.v2.RowFilter.Condition.trueFilter: object expected"); + message.trueFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.trueFilter, long + 1); + } + if (object.falseFilter != null) { + if (!$util.isObject(object.falseFilter)) + throw TypeError(".google.bigtable.v2.RowFilter.Condition.falseFilter: object expected"); + message.falseFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.falseFilter, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Condition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {google.bigtable.v2.RowFilter.Condition} message Condition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Condition.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.predicateFilter = null; + object.trueFilter = null; + object.falseFilter = null; + } + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) + object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options, q + 1); + if (message.trueFilter != null && Object.hasOwnProperty.call(message, "trueFilter")) + object.trueFilter = $root.google.bigtable.v2.RowFilter.toObject(message.trueFilter, options, q + 1); + if (message.falseFilter != null && Object.hasOwnProperty.call(message, "falseFilter")) + object.falseFilter = $root.google.bigtable.v2.RowFilter.toObject(message.falseFilter, options, q + 1); + return object; + }; + + /** + * Converts this Condition to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RowFilter.Condition + * @instance + * @returns {Object.} JSON object + */ + Condition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Condition + * @function getTypeUrl + * @memberof google.bigtable.v2.RowFilter.Condition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Condition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RowFilter.Condition"; + }; + + return Condition; + })(); + + return RowFilter; + })(); + + v2.Mutation = (function() { + + /** + * Properties of a Mutation. + * @memberof google.bigtable.v2 + * @interface IMutation + * @property {google.bigtable.v2.Mutation.ISetCell|null} [setCell] Mutation setCell + * @property {google.bigtable.v2.Mutation.IAddToCell|null} [addToCell] Mutation addToCell + * @property {google.bigtable.v2.Mutation.IMergeToCell|null} [mergeToCell] Mutation mergeToCell + * @property {google.bigtable.v2.Mutation.IDeleteFromColumn|null} [deleteFromColumn] Mutation deleteFromColumn + * @property {google.bigtable.v2.Mutation.IDeleteFromFamily|null} [deleteFromFamily] Mutation deleteFromFamily + * @property {google.bigtable.v2.Mutation.IDeleteFromRow|null} [deleteFromRow] Mutation deleteFromRow + */ + + /** + * Constructs a new Mutation. + * @memberof google.bigtable.v2 + * @classdesc Represents a Mutation. + * @implements IMutation + * @constructor + * @param {google.bigtable.v2.IMutation=} [properties] Properties to set + */ + function Mutation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Mutation setCell. + * @member {google.bigtable.v2.Mutation.ISetCell|null|undefined} setCell + * @memberof google.bigtable.v2.Mutation + * @instance + */ + Mutation.prototype.setCell = null; + + /** + * Mutation addToCell. + * @member {google.bigtable.v2.Mutation.IAddToCell|null|undefined} addToCell + * @memberof google.bigtable.v2.Mutation + * @instance + */ + Mutation.prototype.addToCell = null; + + /** + * Mutation mergeToCell. + * @member {google.bigtable.v2.Mutation.IMergeToCell|null|undefined} mergeToCell + * @memberof google.bigtable.v2.Mutation + * @instance + */ + Mutation.prototype.mergeToCell = null; + + /** + * Mutation deleteFromColumn. + * @member {google.bigtable.v2.Mutation.IDeleteFromColumn|null|undefined} deleteFromColumn + * @memberof google.bigtable.v2.Mutation + * @instance + */ + Mutation.prototype.deleteFromColumn = null; + + /** + * Mutation deleteFromFamily. + * @member {google.bigtable.v2.Mutation.IDeleteFromFamily|null|undefined} deleteFromFamily + * @memberof google.bigtable.v2.Mutation + * @instance + */ + Mutation.prototype.deleteFromFamily = null; + + /** + * Mutation deleteFromRow. + * @member {google.bigtable.v2.Mutation.IDeleteFromRow|null|undefined} deleteFromRow + * @memberof google.bigtable.v2.Mutation + * @instance + */ + Mutation.prototype.deleteFromRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Mutation mutation. + * @member {"setCell"|"addToCell"|"mergeToCell"|"deleteFromColumn"|"deleteFromFamily"|"deleteFromRow"|undefined} mutation + * @memberof google.bigtable.v2.Mutation + * @instance + */ + Object.defineProperty(Mutation.prototype, "mutation", { + get: $util.oneOfGetter($oneOfFields = ["setCell", "addToCell", "mergeToCell", "deleteFromColumn", "deleteFromFamily", "deleteFromRow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Mutation instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Mutation + * @static + * @param {google.bigtable.v2.IMutation=} [properties] Properties to set + * @returns {google.bigtable.v2.Mutation} Mutation instance + */ + Mutation.create = function create(properties) { + return new Mutation(properties); + }; + + /** + * Encodes the specified Mutation message. Does not implicitly {@link google.bigtable.v2.Mutation.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Mutation + * @static + * @param {google.bigtable.v2.IMutation} message Mutation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Mutation.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.setCell != null && Object.hasOwnProperty.call(message, "setCell")) + $root.google.bigtable.v2.Mutation.SetCell.encode(message.setCell, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.deleteFromColumn != null && Object.hasOwnProperty.call(message, "deleteFromColumn")) + $root.google.bigtable.v2.Mutation.DeleteFromColumn.encode(message.deleteFromColumn, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.deleteFromFamily != null && Object.hasOwnProperty.call(message, "deleteFromFamily")) + $root.google.bigtable.v2.Mutation.DeleteFromFamily.encode(message.deleteFromFamily, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.deleteFromRow != null && Object.hasOwnProperty.call(message, "deleteFromRow")) + $root.google.bigtable.v2.Mutation.DeleteFromRow.encode(message.deleteFromRow, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.addToCell != null && Object.hasOwnProperty.call(message, "addToCell")) + $root.google.bigtable.v2.Mutation.AddToCell.encode(message.addToCell, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.mergeToCell != null && Object.hasOwnProperty.call(message, "mergeToCell")) + $root.google.bigtable.v2.Mutation.MergeToCell.encode(message.mergeToCell, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Mutation message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Mutation + * @static + * @param {google.bigtable.v2.IMutation} message Mutation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Mutation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Mutation message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Mutation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Mutation} Mutation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Mutation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.setCell = $root.google.bigtable.v2.Mutation.SetCell.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Mutation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Mutation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Mutation} Mutation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Mutation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Mutation message. + * @function verify + * @memberof google.bigtable.v2.Mutation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Mutation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.setCell != null && Object.hasOwnProperty.call(message, "setCell")) { + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.SetCell.verify(message.setCell, long + 1); + if (error) + return "setCell." + error; + } + } + if (message.addToCell != null && Object.hasOwnProperty.call(message, "addToCell")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.AddToCell.verify(message.addToCell, long + 1); + if (error) + return "addToCell." + error; + } + } + if (message.mergeToCell != null && Object.hasOwnProperty.call(message, "mergeToCell")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.MergeToCell.verify(message.mergeToCell, long + 1); + if (error) + return "mergeToCell." + error; + } + } + if (message.deleteFromColumn != null && Object.hasOwnProperty.call(message, "deleteFromColumn")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromColumn.verify(message.deleteFromColumn, long + 1); + if (error) + return "deleteFromColumn." + error; + } + } + if (message.deleteFromFamily != null && Object.hasOwnProperty.call(message, "deleteFromFamily")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromFamily.verify(message.deleteFromFamily, long + 1); + if (error) + return "deleteFromFamily." + error; + } + } + if (message.deleteFromRow != null && Object.hasOwnProperty.call(message, "deleteFromRow")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.DeleteFromRow.verify(message.deleteFromRow, long + 1); + if (error) + return "deleteFromRow." + error; + } + } + return null; + }; + + /** + * Creates a Mutation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Mutation + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Mutation} Mutation + */ + Mutation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Mutation) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Mutation(); + if (object.setCell != null) { + if (!$util.isObject(object.setCell)) + throw TypeError(".google.bigtable.v2.Mutation.setCell: object expected"); + message.setCell = $root.google.bigtable.v2.Mutation.SetCell.fromObject(object.setCell, long + 1); + } + if (object.addToCell != null) { + if (!$util.isObject(object.addToCell)) + throw TypeError(".google.bigtable.v2.Mutation.addToCell: object expected"); + message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.fromObject(object.addToCell, long + 1); + } + if (object.mergeToCell != null) { + if (!$util.isObject(object.mergeToCell)) + throw TypeError(".google.bigtable.v2.Mutation.mergeToCell: object expected"); + message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.fromObject(object.mergeToCell, long + 1); + } + if (object.deleteFromColumn != null) { + if (!$util.isObject(object.deleteFromColumn)) + throw TypeError(".google.bigtable.v2.Mutation.deleteFromColumn: object expected"); + message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.fromObject(object.deleteFromColumn, long + 1); + } + if (object.deleteFromFamily != null) { + if (!$util.isObject(object.deleteFromFamily)) + throw TypeError(".google.bigtable.v2.Mutation.deleteFromFamily: object expected"); + message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.fromObject(object.deleteFromFamily, long + 1); + } + if (object.deleteFromRow != null) { + if (!$util.isObject(object.deleteFromRow)) + throw TypeError(".google.bigtable.v2.Mutation.deleteFromRow: object expected"); + message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.fromObject(object.deleteFromRow, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Mutation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Mutation + * @static + * @param {google.bigtable.v2.Mutation} message Mutation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Mutation.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.setCell != null && Object.hasOwnProperty.call(message, "setCell")) { + object.setCell = $root.google.bigtable.v2.Mutation.SetCell.toObject(message.setCell, options, q + 1); + if (options.oneofs) + object.mutation = "setCell"; + } + if (message.deleteFromColumn != null && Object.hasOwnProperty.call(message, "deleteFromColumn")) { + object.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.toObject(message.deleteFromColumn, options, q + 1); + if (options.oneofs) + object.mutation = "deleteFromColumn"; + } + if (message.deleteFromFamily != null && Object.hasOwnProperty.call(message, "deleteFromFamily")) { + object.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.toObject(message.deleteFromFamily, options, q + 1); + if (options.oneofs) + object.mutation = "deleteFromFamily"; + } + if (message.deleteFromRow != null && Object.hasOwnProperty.call(message, "deleteFromRow")) { + object.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.toObject(message.deleteFromRow, options, q + 1); + if (options.oneofs) + object.mutation = "deleteFromRow"; + } + if (message.addToCell != null && Object.hasOwnProperty.call(message, "addToCell")) { + object.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.toObject(message.addToCell, options, q + 1); + if (options.oneofs) + object.mutation = "addToCell"; + } + if (message.mergeToCell != null && Object.hasOwnProperty.call(message, "mergeToCell")) { + object.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.toObject(message.mergeToCell, options, q + 1); + if (options.oneofs) + object.mutation = "mergeToCell"; + } + return object; + }; + + /** + * Converts this Mutation to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Mutation + * @instance + * @returns {Object.} JSON object + */ + Mutation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Mutation + * @function getTypeUrl + * @memberof google.bigtable.v2.Mutation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Mutation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Mutation"; + }; + + Mutation.SetCell = (function() { + + /** + * Properties of a SetCell. + * @memberof google.bigtable.v2.Mutation + * @interface ISetCell + * @property {string|null} [familyName] SetCell familyName + * @property {Uint8Array|null} [columnQualifier] SetCell columnQualifier + * @property {number|Long|null} [timestampMicros] SetCell timestampMicros + * @property {Uint8Array|null} [value] SetCell value + */ + + /** + * Constructs a new SetCell. + * @memberof google.bigtable.v2.Mutation + * @classdesc Represents a SetCell. + * @implements ISetCell + * @constructor + * @param {google.bigtable.v2.Mutation.ISetCell=} [properties] Properties to set + */ + function SetCell(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetCell familyName. + * @member {string} familyName + * @memberof google.bigtable.v2.Mutation.SetCell + * @instance + */ + SetCell.prototype.familyName = ""; + + /** + * SetCell columnQualifier. + * @member {Uint8Array} columnQualifier + * @memberof google.bigtable.v2.Mutation.SetCell + * @instance + */ + SetCell.prototype.columnQualifier = $util.newBuffer([]); + + /** + * SetCell timestampMicros. + * @member {number|Long} timestampMicros + * @memberof google.bigtable.v2.Mutation.SetCell + * @instance + */ + SetCell.prototype.timestampMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SetCell value. + * @member {Uint8Array} value + * @memberof google.bigtable.v2.Mutation.SetCell + * @instance + */ + SetCell.prototype.value = $util.newBuffer([]); + + /** + * Creates a new SetCell instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {google.bigtable.v2.Mutation.ISetCell=} [properties] Properties to set + * @returns {google.bigtable.v2.Mutation.SetCell} SetCell instance + */ + SetCell.create = function create(properties) { + return new SetCell(properties); + }; + + /** + * Encodes the specified SetCell message. Does not implicitly {@link google.bigtable.v2.Mutation.SetCell.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {google.bigtable.v2.Mutation.ISetCell} message SetCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetCell.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.columnQualifier); + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestampMicros); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified SetCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.SetCell.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {google.bigtable.v2.Mutation.ISetCell} message SetCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetCell.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SetCell message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Mutation.SetCell} SetCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetCell.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.SetCell(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = reader.bytes(); + break; + } + case 3: { + message.timestampMicros = reader.int64(); + break; + } + case 4: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SetCell message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Mutation.SetCell} SetCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetCell.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetCell message. + * @function verify + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetCell.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (!$util.isInteger(message.timestampMicros) && !(message.timestampMicros && $util.isInteger(message.timestampMicros.low) && $util.isInteger(message.timestampMicros.high))) + return "timestampMicros: integer|Long expected"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a SetCell message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Mutation.SetCell} SetCell + */ + SetCell.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Mutation.SetCell) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.SetCell: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Mutation.SetCell(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) + if (typeof object.columnQualifier === "string") + $util.base64.decode(object.columnQualifier, message.columnQualifier = $util.newBuffer($util.base64.length(object.columnQualifier)), 0); + else if (object.columnQualifier.length >= 0) + message.columnQualifier = object.columnQualifier; + if (object.timestampMicros != null) + if ($util.Long) + message.timestampMicros = $util.Long.fromValue(object.timestampMicros, false); + else if (typeof object.timestampMicros === "string") + message.timestampMicros = parseInt(object.timestampMicros, 10); + else if (typeof object.timestampMicros === "number") + message.timestampMicros = object.timestampMicros; + else if (typeof object.timestampMicros === "object") + message.timestampMicros = new $util.LongBits(object.timestampMicros.low >>> 0, object.timestampMicros.high >>> 0).toNumber(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a SetCell message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {google.bigtable.v2.Mutation.SetCell} message SetCell + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetCell.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.familyName = ""; + if (options.bytes === String) + object.columnQualifier = ""; + else { + object.columnQualifier = []; + if (options.bytes !== Array) + object.columnQualifier = $util.newBuffer(object.columnQualifier); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.timestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + object.columnQualifier = options.bytes === String ? $util.base64.encode(message.columnQualifier, 0, message.columnQualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.columnQualifier) : message.columnQualifier; + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.timestampMicros = typeof message.timestampMicros === "number" ? BigInt(message.timestampMicros) : $util.Long.fromBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.timestampMicros === "number") + object.timestampMicros = options.longs === String ? String(message.timestampMicros) : message.timestampMicros; + else + object.timestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMicros) : options.longs === Number ? new $util.LongBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0).toNumber() : message.timestampMicros; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this SetCell to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Mutation.SetCell + * @instance + * @returns {Object.} JSON object + */ + SetCell.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetCell + * @function getTypeUrl + * @memberof google.bigtable.v2.Mutation.SetCell + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetCell.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Mutation.SetCell"; + }; + + return SetCell; + })(); + + Mutation.AddToCell = (function() { + + /** + * Properties of an AddToCell. + * @memberof google.bigtable.v2.Mutation + * @interface IAddToCell + * @property {string|null} [familyName] AddToCell familyName + * @property {google.bigtable.v2.IValue|null} [columnQualifier] AddToCell columnQualifier + * @property {google.bigtable.v2.IValue|null} [timestamp] AddToCell timestamp + * @property {google.bigtable.v2.IValue|null} [input] AddToCell input + */ + + /** + * Constructs a new AddToCell. + * @memberof google.bigtable.v2.Mutation + * @classdesc Represents an AddToCell. + * @implements IAddToCell + * @constructor + * @param {google.bigtable.v2.Mutation.IAddToCell=} [properties] Properties to set + */ + function AddToCell(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddToCell familyName. + * @member {string} familyName + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + */ + AddToCell.prototype.familyName = ""; + + /** + * AddToCell columnQualifier. + * @member {google.bigtable.v2.IValue|null|undefined} columnQualifier + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + */ + AddToCell.prototype.columnQualifier = null; + + /** + * AddToCell timestamp. + * @member {google.bigtable.v2.IValue|null|undefined} timestamp + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + */ + AddToCell.prototype.timestamp = null; + + /** + * AddToCell input. + * @member {google.bigtable.v2.IValue|null|undefined} input + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + */ + AddToCell.prototype.input = null; + + /** + * Creates a new AddToCell instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {google.bigtable.v2.Mutation.IAddToCell=} [properties] Properties to set + * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell instance + */ + AddToCell.create = function create(properties) { + return new AddToCell(properties); + }; + + /** + * Encodes the specified AddToCell message. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {google.bigtable.v2.Mutation.IAddToCell} message AddToCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddToCell.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + $root.google.bigtable.v2.Value.encode(message.columnQualifier, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.bigtable.v2.Value.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + $root.google.bigtable.v2.Value.encode(message.input, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddToCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {google.bigtable.v2.Mutation.IAddToCell} message AddToCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddToCell.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AddToCell message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddToCell.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.AddToCell(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AddToCell message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddToCell.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddToCell message. + * @function verify + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddToCell.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) { + var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier, long + 1); + if (error) + return "columnQualifier." + error; + } + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) { + var error = $root.google.bigtable.v2.Value.verify(message.timestamp, long + 1); + if (error) + return "timestamp." + error; + } + if (message.input != null && Object.hasOwnProperty.call(message, "input")) { + var error = $root.google.bigtable.v2.Value.verify(message.input, long + 1); + if (error) + return "input." + error; + } + return null; + }; + + /** + * Creates an AddToCell message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell + */ + AddToCell.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Mutation.AddToCell) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.AddToCell: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Mutation.AddToCell(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) { + if (!$util.isObject(object.columnQualifier)) + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.columnQualifier: object expected"); + message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier, long + 1); + } + if (object.timestamp != null) { + if (!$util.isObject(object.timestamp)) + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.timestamp: object expected"); + message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp, long + 1); + } + if (object.input != null) { + if (!$util.isObject(object.input)) + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.input: object expected"); + message.input = $root.google.bigtable.v2.Value.fromObject(object.input, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an AddToCell message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {google.bigtable.v2.Mutation.AddToCell} message AddToCell + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddToCell.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.familyName = ""; + object.columnQualifier = null; + object.timestamp = null; + object.input = null; + } + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options, q + 1); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options, q + 1); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options, q + 1); + return object; + }; + + /** + * Converts this AddToCell to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + * @returns {Object.} JSON object + */ + AddToCell.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddToCell + * @function getTypeUrl + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddToCell.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Mutation.AddToCell"; + }; + + return AddToCell; + })(); + + Mutation.MergeToCell = (function() { + + /** + * Properties of a MergeToCell. + * @memberof google.bigtable.v2.Mutation + * @interface IMergeToCell + * @property {string|null} [familyName] MergeToCell familyName + * @property {google.bigtable.v2.IValue|null} [columnQualifier] MergeToCell columnQualifier + * @property {google.bigtable.v2.IValue|null} [timestamp] MergeToCell timestamp + * @property {google.bigtable.v2.IValue|null} [input] MergeToCell input + */ + + /** + * Constructs a new MergeToCell. + * @memberof google.bigtable.v2.Mutation + * @classdesc Represents a MergeToCell. + * @implements IMergeToCell + * @constructor + * @param {google.bigtable.v2.Mutation.IMergeToCell=} [properties] Properties to set + */ + function MergeToCell(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MergeToCell familyName. + * @member {string} familyName + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @instance + */ + MergeToCell.prototype.familyName = ""; + + /** + * MergeToCell columnQualifier. + * @member {google.bigtable.v2.IValue|null|undefined} columnQualifier + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @instance + */ + MergeToCell.prototype.columnQualifier = null; + + /** + * MergeToCell timestamp. + * @member {google.bigtable.v2.IValue|null|undefined} timestamp + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @instance + */ + MergeToCell.prototype.timestamp = null; + + /** + * MergeToCell input. + * @member {google.bigtable.v2.IValue|null|undefined} input + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @instance + */ + MergeToCell.prototype.input = null; + + /** + * Creates a new MergeToCell instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {google.bigtable.v2.Mutation.IMergeToCell=} [properties] Properties to set + * @returns {google.bigtable.v2.Mutation.MergeToCell} MergeToCell instance + */ + MergeToCell.create = function create(properties) { + return new MergeToCell(properties); + }; + + /** + * Encodes the specified MergeToCell message. Does not implicitly {@link google.bigtable.v2.Mutation.MergeToCell.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {google.bigtable.v2.Mutation.IMergeToCell} message MergeToCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MergeToCell.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + $root.google.bigtable.v2.Value.encode(message.columnQualifier, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.bigtable.v2.Value.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + $root.google.bigtable.v2.Value.encode(message.input, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified MergeToCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.MergeToCell.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {google.bigtable.v2.Mutation.IMergeToCell} message MergeToCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MergeToCell.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MergeToCell message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Mutation.MergeToCell} MergeToCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MergeToCell.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.MergeToCell(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MergeToCell message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Mutation.MergeToCell} MergeToCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MergeToCell.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MergeToCell message. + * @function verify + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MergeToCell.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) { + var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier, long + 1); + if (error) + return "columnQualifier." + error; + } + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) { + var error = $root.google.bigtable.v2.Value.verify(message.timestamp, long + 1); + if (error) + return "timestamp." + error; + } + if (message.input != null && Object.hasOwnProperty.call(message, "input")) { + var error = $root.google.bigtable.v2.Value.verify(message.input, long + 1); + if (error) + return "input." + error; + } + return null; + }; + + /** + * Creates a MergeToCell message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Mutation.MergeToCell} MergeToCell + */ + MergeToCell.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Mutation.MergeToCell) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Mutation.MergeToCell(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) { + if (!$util.isObject(object.columnQualifier)) + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.columnQualifier: object expected"); + message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier, long + 1); + } + if (object.timestamp != null) { + if (!$util.isObject(object.timestamp)) + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.timestamp: object expected"); + message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp, long + 1); + } + if (object.input != null) { + if (!$util.isObject(object.input)) + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.input: object expected"); + message.input = $root.google.bigtable.v2.Value.fromObject(object.input, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MergeToCell message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {google.bigtable.v2.Mutation.MergeToCell} message MergeToCell + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MergeToCell.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.familyName = ""; + object.columnQualifier = null; + object.timestamp = null; + object.input = null; + } + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options, q + 1); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options, q + 1); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options, q + 1); + return object; + }; + + /** + * Converts this MergeToCell to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @instance + * @returns {Object.} JSON object + */ + MergeToCell.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MergeToCell + * @function getTypeUrl + * @memberof google.bigtable.v2.Mutation.MergeToCell + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MergeToCell.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Mutation.MergeToCell"; + }; + + return MergeToCell; + })(); + + Mutation.DeleteFromColumn = (function() { + + /** + * Properties of a DeleteFromColumn. + * @memberof google.bigtable.v2.Mutation + * @interface IDeleteFromColumn + * @property {string|null} [familyName] DeleteFromColumn familyName + * @property {Uint8Array|null} [columnQualifier] DeleteFromColumn columnQualifier + * @property {google.bigtable.v2.ITimestampRange|null} [timeRange] DeleteFromColumn timeRange + */ + + /** + * Constructs a new DeleteFromColumn. + * @memberof google.bigtable.v2.Mutation + * @classdesc Represents a DeleteFromColumn. + * @implements IDeleteFromColumn + * @constructor + * @param {google.bigtable.v2.Mutation.IDeleteFromColumn=} [properties] Properties to set + */ + function DeleteFromColumn(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFromColumn familyName. + * @member {string} familyName + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @instance + */ + DeleteFromColumn.prototype.familyName = ""; + + /** + * DeleteFromColumn columnQualifier. + * @member {Uint8Array} columnQualifier + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @instance + */ + DeleteFromColumn.prototype.columnQualifier = $util.newBuffer([]); + + /** + * DeleteFromColumn timeRange. + * @member {google.bigtable.v2.ITimestampRange|null|undefined} timeRange + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @instance + */ + DeleteFromColumn.prototype.timeRange = null; + + /** + * Creates a new DeleteFromColumn instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromColumn=} [properties] Properties to set + * @returns {google.bigtable.v2.Mutation.DeleteFromColumn} DeleteFromColumn instance + */ + DeleteFromColumn.create = function create(properties) { + return new DeleteFromColumn(properties); + }; + + /** + * Encodes the specified DeleteFromColumn message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromColumn.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromColumn} message DeleteFromColumn message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFromColumn.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.columnQualifier); + if (message.timeRange != null && Object.hasOwnProperty.call(message, "timeRange")) + $root.google.bigtable.v2.TimestampRange.encode(message.timeRange, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteFromColumn message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromColumn.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromColumn} message DeleteFromColumn message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFromColumn.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteFromColumn message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Mutation.DeleteFromColumn} DeleteFromColumn + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFromColumn.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.DeleteFromColumn(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = reader.bytes(); + break; + } + case 3: { + message.timeRange = $root.google.bigtable.v2.TimestampRange.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFromColumn message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Mutation.DeleteFromColumn} DeleteFromColumn + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFromColumn.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFromColumn message. + * @function verify + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFromColumn.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.timeRange != null && Object.hasOwnProperty.call(message, "timeRange")) { + var error = $root.google.bigtable.v2.TimestampRange.verify(message.timeRange, long + 1); + if (error) + return "timeRange." + error; + } + return null; + }; + + /** + * Creates a DeleteFromColumn message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Mutation.DeleteFromColumn} DeleteFromColumn + */ + DeleteFromColumn.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromColumn) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.DeleteFromColumn: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Mutation.DeleteFromColumn(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) + if (typeof object.columnQualifier === "string") + $util.base64.decode(object.columnQualifier, message.columnQualifier = $util.newBuffer($util.base64.length(object.columnQualifier)), 0); + else if (object.columnQualifier.length >= 0) + message.columnQualifier = object.columnQualifier; + if (object.timeRange != null) { + if (!$util.isObject(object.timeRange)) + throw TypeError(".google.bigtable.v2.Mutation.DeleteFromColumn.timeRange: object expected"); + message.timeRange = $root.google.bigtable.v2.TimestampRange.fromObject(object.timeRange, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DeleteFromColumn message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {google.bigtable.v2.Mutation.DeleteFromColumn} message DeleteFromColumn + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFromColumn.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.familyName = ""; + if (options.bytes === String) + object.columnQualifier = ""; + else { + object.columnQualifier = []; + if (options.bytes !== Array) + object.columnQualifier = $util.newBuffer(object.columnQualifier); + } + object.timeRange = null; + } + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + object.columnQualifier = options.bytes === String ? $util.base64.encode(message.columnQualifier, 0, message.columnQualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.columnQualifier) : message.columnQualifier; + if (message.timeRange != null && Object.hasOwnProperty.call(message, "timeRange")) + object.timeRange = $root.google.bigtable.v2.TimestampRange.toObject(message.timeRange, options, q + 1); + return object; + }; + + /** + * Converts this DeleteFromColumn to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @instance + * @returns {Object.} JSON object + */ + DeleteFromColumn.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFromColumn + * @function getTypeUrl + * @memberof google.bigtable.v2.Mutation.DeleteFromColumn + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFromColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Mutation.DeleteFromColumn"; + }; + + return DeleteFromColumn; + })(); + + Mutation.DeleteFromFamily = (function() { + + /** + * Properties of a DeleteFromFamily. + * @memberof google.bigtable.v2.Mutation + * @interface IDeleteFromFamily + * @property {string|null} [familyName] DeleteFromFamily familyName + */ + + /** + * Constructs a new DeleteFromFamily. + * @memberof google.bigtable.v2.Mutation + * @classdesc Represents a DeleteFromFamily. + * @implements IDeleteFromFamily + * @constructor + * @param {google.bigtable.v2.Mutation.IDeleteFromFamily=} [properties] Properties to set + */ + function DeleteFromFamily(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFromFamily familyName. + * @member {string} familyName + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @instance + */ + DeleteFromFamily.prototype.familyName = ""; + + /** + * Creates a new DeleteFromFamily instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromFamily=} [properties] Properties to set + * @returns {google.bigtable.v2.Mutation.DeleteFromFamily} DeleteFromFamily instance + */ + DeleteFromFamily.create = function create(properties) { + return new DeleteFromFamily(properties); + }; + + /** + * Encodes the specified DeleteFromFamily message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromFamily.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromFamily} message DeleteFromFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFromFamily.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + return writer; + }; + + /** + * Encodes the specified DeleteFromFamily message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromFamily.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromFamily} message DeleteFromFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFromFamily.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteFromFamily message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Mutation.DeleteFromFamily} DeleteFromFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFromFamily.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.DeleteFromFamily(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFromFamily message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Mutation.DeleteFromFamily} DeleteFromFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFromFamily.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFromFamily message. + * @function verify + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFromFamily.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + return null; + }; + + /** + * Creates a DeleteFromFamily message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Mutation.DeleteFromFamily} DeleteFromFamily + */ + DeleteFromFamily.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromFamily) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.DeleteFromFamily: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Mutation.DeleteFromFamily(); + if (object.familyName != null) + message.familyName = String(object.familyName); + return message; + }; + + /** + * Creates a plain object from a DeleteFromFamily message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {google.bigtable.v2.Mutation.DeleteFromFamily} message DeleteFromFamily + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFromFamily.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.familyName = ""; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = message.familyName; + return object; + }; + + /** + * Converts this DeleteFromFamily to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @instance + * @returns {Object.} JSON object + */ + DeleteFromFamily.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFromFamily + * @function getTypeUrl + * @memberof google.bigtable.v2.Mutation.DeleteFromFamily + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFromFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Mutation.DeleteFromFamily"; + }; + + return DeleteFromFamily; + })(); + + Mutation.DeleteFromRow = (function() { + + /** + * Properties of a DeleteFromRow. + * @memberof google.bigtable.v2.Mutation + * @interface IDeleteFromRow + */ + + /** + * Constructs a new DeleteFromRow. + * @memberof google.bigtable.v2.Mutation + * @classdesc Represents a DeleteFromRow. + * @implements IDeleteFromRow + * @constructor + * @param {google.bigtable.v2.Mutation.IDeleteFromRow=} [properties] Properties to set + */ + function DeleteFromRow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new DeleteFromRow instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromRow=} [properties] Properties to set + * @returns {google.bigtable.v2.Mutation.DeleteFromRow} DeleteFromRow instance + */ + DeleteFromRow.create = function create(properties) { + return new DeleteFromRow(properties); + }; + + /** + * Encodes the specified DeleteFromRow message. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromRow.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromRow} message DeleteFromRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFromRow.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified DeleteFromRow message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.DeleteFromRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {google.bigtable.v2.Mutation.IDeleteFromRow} message DeleteFromRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFromRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteFromRow message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Mutation.DeleteFromRow} DeleteFromRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFromRow.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Mutation.DeleteFromRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFromRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Mutation.DeleteFromRow} DeleteFromRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFromRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFromRow message. + * @function verify + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFromRow.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a DeleteFromRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Mutation.DeleteFromRow} DeleteFromRow + */ + DeleteFromRow.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromRow) + return object; + return new $root.google.bigtable.v2.Mutation.DeleteFromRow(); + }; + + /** + * Creates a plain object from a DeleteFromRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {google.bigtable.v2.Mutation.DeleteFromRow} message DeleteFromRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFromRow.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DeleteFromRow to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @instance + * @returns {Object.} JSON object + */ + DeleteFromRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFromRow + * @function getTypeUrl + * @memberof google.bigtable.v2.Mutation.DeleteFromRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFromRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Mutation.DeleteFromRow"; + }; + + return DeleteFromRow; + })(); + + return Mutation; + })(); + + v2.ReadModifyWriteRule = (function() { + + /** + * Properties of a ReadModifyWriteRule. + * @memberof google.bigtable.v2 + * @interface IReadModifyWriteRule + * @property {string|null} [familyName] ReadModifyWriteRule familyName + * @property {Uint8Array|null} [columnQualifier] ReadModifyWriteRule columnQualifier + * @property {Uint8Array|null} [appendValue] ReadModifyWriteRule appendValue + * @property {number|Long|null} [incrementAmount] ReadModifyWriteRule incrementAmount + */ + + /** + * Constructs a new ReadModifyWriteRule. + * @memberof google.bigtable.v2 + * @classdesc Represents a ReadModifyWriteRule. + * @implements IReadModifyWriteRule + * @constructor + * @param {google.bigtable.v2.IReadModifyWriteRule=} [properties] Properties to set + */ + function ReadModifyWriteRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadModifyWriteRule familyName. + * @member {string} familyName + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @instance + */ + ReadModifyWriteRule.prototype.familyName = ""; + + /** + * ReadModifyWriteRule columnQualifier. + * @member {Uint8Array} columnQualifier + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @instance + */ + ReadModifyWriteRule.prototype.columnQualifier = $util.newBuffer([]); + + /** + * ReadModifyWriteRule appendValue. + * @member {Uint8Array|null|undefined} appendValue + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @instance + */ + ReadModifyWriteRule.prototype.appendValue = null; + + /** + * ReadModifyWriteRule incrementAmount. + * @member {number|Long|null|undefined} incrementAmount + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @instance + */ + ReadModifyWriteRule.prototype.incrementAmount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReadModifyWriteRule rule. + * @member {"appendValue"|"incrementAmount"|undefined} rule + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @instance + */ + Object.defineProperty(ReadModifyWriteRule.prototype, "rule", { + get: $util.oneOfGetter($oneOfFields = ["appendValue", "incrementAmount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReadModifyWriteRule instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {google.bigtable.v2.IReadModifyWriteRule=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadModifyWriteRule} ReadModifyWriteRule instance + */ + ReadModifyWriteRule.create = function create(properties) { + return new ReadModifyWriteRule(properties); + }; + + /** + * Encodes the specified ReadModifyWriteRule message. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRule.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {google.bigtable.v2.IReadModifyWriteRule} message ReadModifyWriteRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadModifyWriteRule.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.columnQualifier); + if (message.appendValue != null && Object.hasOwnProperty.call(message, "appendValue")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.appendValue); + if (message.incrementAmount != null && Object.hasOwnProperty.call(message, "incrementAmount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.incrementAmount); + return writer; + }; + + /** + * Encodes the specified ReadModifyWriteRule message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadModifyWriteRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {google.bigtable.v2.IReadModifyWriteRule} message ReadModifyWriteRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadModifyWriteRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReadModifyWriteRule message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadModifyWriteRule} ReadModifyWriteRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadModifyWriteRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadModifyWriteRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = reader.bytes(); + break; + } + case 3: { + message.appendValue = reader.bytes(); + break; + } + case 4: { + message.incrementAmount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReadModifyWriteRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadModifyWriteRule} ReadModifyWriteRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadModifyWriteRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadModifyWriteRule message. + * @function verify + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadModifyWriteRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) + return "columnQualifier: buffer expected"; + if (message.appendValue != null && Object.hasOwnProperty.call(message, "appendValue")) { + properties.rule = 1; + if (!(message.appendValue && typeof message.appendValue.length === "number" || $util.isString(message.appendValue))) + return "appendValue: buffer expected"; + } + if (message.incrementAmount != null && Object.hasOwnProperty.call(message, "incrementAmount")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + if (!$util.isInteger(message.incrementAmount) && !(message.incrementAmount && $util.isInteger(message.incrementAmount.low) && $util.isInteger(message.incrementAmount.high))) + return "incrementAmount: integer|Long expected"; + } + return null; + }; + + /** + * Creates a ReadModifyWriteRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadModifyWriteRule} ReadModifyWriteRule + */ + ReadModifyWriteRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRule) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRule: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadModifyWriteRule(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) + if (typeof object.columnQualifier === "string") + $util.base64.decode(object.columnQualifier, message.columnQualifier = $util.newBuffer($util.base64.length(object.columnQualifier)), 0); + else if (object.columnQualifier.length >= 0) + message.columnQualifier = object.columnQualifier; + if (object.appendValue != null) + if (typeof object.appendValue === "string") + $util.base64.decode(object.appendValue, message.appendValue = $util.newBuffer($util.base64.length(object.appendValue)), 0); + else if (object.appendValue.length >= 0) + message.appendValue = object.appendValue; + if (object.incrementAmount != null) + if ($util.Long) + message.incrementAmount = $util.Long.fromValue(object.incrementAmount, false); + else if (typeof object.incrementAmount === "string") + message.incrementAmount = parseInt(object.incrementAmount, 10); + else if (typeof object.incrementAmount === "number") + message.incrementAmount = object.incrementAmount; + else if (typeof object.incrementAmount === "object") + message.incrementAmount = new $util.LongBits(object.incrementAmount.low >>> 0, object.incrementAmount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ReadModifyWriteRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {google.bigtable.v2.ReadModifyWriteRule} message ReadModifyWriteRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadModifyWriteRule.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.familyName = ""; + if (options.bytes === String) + object.columnQualifier = ""; + else { + object.columnQualifier = []; + if (options.bytes !== Array) + object.columnQualifier = $util.newBuffer(object.columnQualifier); + } + } + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + object.columnQualifier = options.bytes === String ? $util.base64.encode(message.columnQualifier, 0, message.columnQualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.columnQualifier) : message.columnQualifier; + if (message.appendValue != null && Object.hasOwnProperty.call(message, "appendValue")) { + object.appendValue = options.bytes === String ? $util.base64.encode(message.appendValue, 0, message.appendValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.appendValue) : message.appendValue; + if (options.oneofs) + object.rule = "appendValue"; + } + if (message.incrementAmount != null && Object.hasOwnProperty.call(message, "incrementAmount")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.incrementAmount = typeof message.incrementAmount === "number" ? BigInt(message.incrementAmount) : $util.Long.fromBits(message.incrementAmount.low >>> 0, message.incrementAmount.high >>> 0, false).toBigInt(); + else if (typeof message.incrementAmount === "number") + object.incrementAmount = options.longs === String ? String(message.incrementAmount) : message.incrementAmount; + else + object.incrementAmount = options.longs === String ? $util.Long.prototype.toString.call(message.incrementAmount) : options.longs === Number ? new $util.LongBits(message.incrementAmount.low >>> 0, message.incrementAmount.high >>> 0).toNumber() : message.incrementAmount; + if (options.oneofs) + object.rule = "incrementAmount"; + } + return object; + }; + + /** + * Converts this ReadModifyWriteRule to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @instance + * @returns {Object.} JSON object + */ + ReadModifyWriteRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadModifyWriteRule + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadModifyWriteRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadModifyWriteRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadModifyWriteRule"; + }; + + return ReadModifyWriteRule; + })(); + + v2.StreamPartition = (function() { + + /** + * Properties of a StreamPartition. + * @memberof google.bigtable.v2 + * @interface IStreamPartition + * @property {google.bigtable.v2.IRowRange|null} [rowRange] StreamPartition rowRange + */ + + /** + * Constructs a new StreamPartition. + * @memberof google.bigtable.v2 + * @classdesc Represents a StreamPartition. + * @implements IStreamPartition + * @constructor + * @param {google.bigtable.v2.IStreamPartition=} [properties] Properties to set + */ + function StreamPartition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StreamPartition rowRange. + * @member {google.bigtable.v2.IRowRange|null|undefined} rowRange + * @memberof google.bigtable.v2.StreamPartition + * @instance + */ + StreamPartition.prototype.rowRange = null; + + /** + * Creates a new StreamPartition instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {google.bigtable.v2.IStreamPartition=} [properties] Properties to set + * @returns {google.bigtable.v2.StreamPartition} StreamPartition instance + */ + StreamPartition.create = function create(properties) { + return new StreamPartition(properties); + }; + + /** + * Encodes the specified StreamPartition message. Does not implicitly {@link google.bigtable.v2.StreamPartition.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {google.bigtable.v2.IStreamPartition} message StreamPartition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamPartition.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) + $root.google.bigtable.v2.RowRange.encode(message.rowRange, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified StreamPartition message, length delimited. Does not implicitly {@link google.bigtable.v2.StreamPartition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {google.bigtable.v2.IStreamPartition} message StreamPartition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamPartition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a StreamPartition message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.StreamPartition} StreamPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamPartition.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamPartition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rowRange = $root.google.bigtable.v2.RowRange.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StreamPartition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.StreamPartition} StreamPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamPartition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StreamPartition message. + * @function verify + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamPartition.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) { + var error = $root.google.bigtable.v2.RowRange.verify(message.rowRange, long + 1); + if (error) + return "rowRange." + error; + } + return null; + }; + + /** + * Creates a StreamPartition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.StreamPartition} StreamPartition + */ + StreamPartition.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.StreamPartition) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.StreamPartition: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.StreamPartition(); + if (object.rowRange != null) { + if (!$util.isObject(object.rowRange)) + throw TypeError(".google.bigtable.v2.StreamPartition.rowRange: object expected"); + message.rowRange = $root.google.bigtable.v2.RowRange.fromObject(object.rowRange, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a StreamPartition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {google.bigtable.v2.StreamPartition} message StreamPartition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamPartition.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.rowRange = null; + if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) + object.rowRange = $root.google.bigtable.v2.RowRange.toObject(message.rowRange, options, q + 1); + return object; + }; + + /** + * Converts this StreamPartition to JSON. + * @function toJSON + * @memberof google.bigtable.v2.StreamPartition + * @instance + * @returns {Object.} JSON object + */ + StreamPartition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StreamPartition + * @function getTypeUrl + * @memberof google.bigtable.v2.StreamPartition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamPartition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.StreamPartition"; + }; + + return StreamPartition; + })(); + + v2.StreamContinuationTokens = (function() { + + /** + * Properties of a StreamContinuationTokens. + * @memberof google.bigtable.v2 + * @interface IStreamContinuationTokens + * @property {Array.|null} [tokens] StreamContinuationTokens tokens + */ + + /** + * Constructs a new StreamContinuationTokens. + * @memberof google.bigtable.v2 + * @classdesc Represents a StreamContinuationTokens. + * @implements IStreamContinuationTokens + * @constructor + * @param {google.bigtable.v2.IStreamContinuationTokens=} [properties] Properties to set + */ + function StreamContinuationTokens(properties) { + this.tokens = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StreamContinuationTokens tokens. + * @member {Array.} tokens + * @memberof google.bigtable.v2.StreamContinuationTokens + * @instance + */ + StreamContinuationTokens.prototype.tokens = $util.emptyArray; + + /** + * Creates a new StreamContinuationTokens instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {google.bigtable.v2.IStreamContinuationTokens=} [properties] Properties to set + * @returns {google.bigtable.v2.StreamContinuationTokens} StreamContinuationTokens instance + */ + StreamContinuationTokens.create = function create(properties) { + return new StreamContinuationTokens(properties); + }; + + /** + * Encodes the specified StreamContinuationTokens message. Does not implicitly {@link google.bigtable.v2.StreamContinuationTokens.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {google.bigtable.v2.IStreamContinuationTokens} message StreamContinuationTokens message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamContinuationTokens.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.tokens != null && message.tokens.length) + for (var i = 0; i < message.tokens.length; ++i) + $root.google.bigtable.v2.StreamContinuationToken.encode(message.tokens[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified StreamContinuationTokens message, length delimited. Does not implicitly {@link google.bigtable.v2.StreamContinuationTokens.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {google.bigtable.v2.IStreamContinuationTokens} message StreamContinuationTokens message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamContinuationTokens.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a StreamContinuationTokens message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.StreamContinuationTokens} StreamContinuationTokens + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamContinuationTokens.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationTokens(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.bigtable.v2.StreamContinuationToken.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StreamContinuationTokens message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.StreamContinuationTokens} StreamContinuationTokens + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamContinuationTokens.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StreamContinuationTokens message. + * @function verify + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamContinuationTokens.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tokens != null && Object.hasOwnProperty.call(message, "tokens")) { + if (!Array.isArray(message.tokens)) + return "tokens: array expected"; + for (var i = 0; i < message.tokens.length; ++i) { + var error = $root.google.bigtable.v2.StreamContinuationToken.verify(message.tokens[i], long + 1); + if (error) + return "tokens." + error; + } + } + return null; + }; + + /** + * Creates a StreamContinuationTokens message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.StreamContinuationTokens} StreamContinuationTokens + */ + StreamContinuationTokens.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.StreamContinuationTokens) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.StreamContinuationTokens: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.StreamContinuationTokens(); + if (object.tokens) { + if (!Array.isArray(object.tokens)) + throw TypeError(".google.bigtable.v2.StreamContinuationTokens.tokens: array expected"); + message.tokens = []; + for (var i = 0; i < object.tokens.length; ++i) { + if (!$util.isObject(object.tokens[i])) + throw TypeError(".google.bigtable.v2.StreamContinuationTokens.tokens: object expected"); + message.tokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.tokens[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a StreamContinuationTokens message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {google.bigtable.v2.StreamContinuationTokens} message StreamContinuationTokens + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamContinuationTokens.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.tokens = []; + if (message.tokens && message.tokens.length) { + object.tokens = []; + for (var j = 0; j < message.tokens.length; ++j) + object.tokens[j] = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.tokens[j], options, q + 1); + } + return object; + }; + + /** + * Converts this StreamContinuationTokens to JSON. + * @function toJSON + * @memberof google.bigtable.v2.StreamContinuationTokens + * @instance + * @returns {Object.} JSON object + */ + StreamContinuationTokens.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StreamContinuationTokens + * @function getTypeUrl + * @memberof google.bigtable.v2.StreamContinuationTokens + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamContinuationTokens.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.StreamContinuationTokens"; + }; + + return StreamContinuationTokens; + })(); + + v2.StreamContinuationToken = (function() { + + /** + * Properties of a StreamContinuationToken. + * @memberof google.bigtable.v2 + * @interface IStreamContinuationToken + * @property {google.bigtable.v2.IStreamPartition|null} [partition] StreamContinuationToken partition + * @property {string|null} [token] StreamContinuationToken token + */ + + /** + * Constructs a new StreamContinuationToken. + * @memberof google.bigtable.v2 + * @classdesc Represents a StreamContinuationToken. + * @implements IStreamContinuationToken + * @constructor + * @param {google.bigtable.v2.IStreamContinuationToken=} [properties] Properties to set + */ + function StreamContinuationToken(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StreamContinuationToken partition. + * @member {google.bigtable.v2.IStreamPartition|null|undefined} partition + * @memberof google.bigtable.v2.StreamContinuationToken + * @instance + */ + StreamContinuationToken.prototype.partition = null; + + /** + * StreamContinuationToken token. + * @member {string} token + * @memberof google.bigtable.v2.StreamContinuationToken + * @instance + */ + StreamContinuationToken.prototype.token = ""; + + /** + * Creates a new StreamContinuationToken instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {google.bigtable.v2.IStreamContinuationToken=} [properties] Properties to set + * @returns {google.bigtable.v2.StreamContinuationToken} StreamContinuationToken instance + */ + StreamContinuationToken.create = function create(properties) { + return new StreamContinuationToken(properties); + }; + + /** + * Encodes the specified StreamContinuationToken message. Does not implicitly {@link google.bigtable.v2.StreamContinuationToken.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {google.bigtable.v2.IStreamContinuationToken} message StreamContinuationToken message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamContinuationToken.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.token); + return writer; + }; + + /** + * Encodes the specified StreamContinuationToken message, length delimited. Does not implicitly {@link google.bigtable.v2.StreamContinuationToken.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {google.bigtable.v2.IStreamContinuationToken} message StreamContinuationToken message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamContinuationToken.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a StreamContinuationToken message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.StreamContinuationToken} StreamContinuationToken + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamContinuationToken.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.StreamContinuationToken(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.partition = $root.google.bigtable.v2.StreamPartition.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.token = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StreamContinuationToken message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.StreamContinuationToken} StreamContinuationToken + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamContinuationToken.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StreamContinuationToken message. + * @function verify + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamContinuationToken.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) { + var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition, long + 1); + if (error) + return "partition." + error; + } + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + if (!$util.isString(message.token)) + return "token: string expected"; + return null; + }; + + /** + * Creates a StreamContinuationToken message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.StreamContinuationToken} StreamContinuationToken + */ + StreamContinuationToken.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.StreamContinuationToken) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.StreamContinuationToken: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.StreamContinuationToken(); + if (object.partition != null) { + if (!$util.isObject(object.partition)) + throw TypeError(".google.bigtable.v2.StreamContinuationToken.partition: object expected"); + message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition, long + 1); + } + if (object.token != null) + message.token = String(object.token); + return message; + }; + + /** + * Creates a plain object from a StreamContinuationToken message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {google.bigtable.v2.StreamContinuationToken} message StreamContinuationToken + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamContinuationToken.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.partition = null; + object.token = ""; + } + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options, q + 1); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + object.token = message.token; + return object; + }; + + /** + * Converts this StreamContinuationToken to JSON. + * @function toJSON + * @memberof google.bigtable.v2.StreamContinuationToken + * @instance + * @returns {Object.} JSON object + */ + StreamContinuationToken.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StreamContinuationToken + * @function getTypeUrl + * @memberof google.bigtable.v2.StreamContinuationToken + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamContinuationToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.StreamContinuationToken"; + }; + + return StreamContinuationToken; + })(); + + v2.ProtoFormat = (function() { + + /** + * Properties of a ProtoFormat. + * @memberof google.bigtable.v2 + * @interface IProtoFormat + */ + + /** + * Constructs a new ProtoFormat. + * @memberof google.bigtable.v2 + * @classdesc Represents a ProtoFormat. + * @implements IProtoFormat + * @constructor + * @param {google.bigtable.v2.IProtoFormat=} [properties] Properties to set + */ + function ProtoFormat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ProtoFormat instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {google.bigtable.v2.IProtoFormat=} [properties] Properties to set + * @returns {google.bigtable.v2.ProtoFormat} ProtoFormat instance + */ + ProtoFormat.create = function create(properties) { + return new ProtoFormat(properties); + }; + + /** + * Encodes the specified ProtoFormat message. Does not implicitly {@link google.bigtable.v2.ProtoFormat.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {google.bigtable.v2.IProtoFormat} message ProtoFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoFormat.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified ProtoFormat message, length delimited. Does not implicitly {@link google.bigtable.v2.ProtoFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {google.bigtable.v2.IProtoFormat} message ProtoFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ProtoFormat message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ProtoFormat} ProtoFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoFormat.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ProtoFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ProtoFormat} ProtoFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtoFormat message. + * @function verify + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtoFormat.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a ProtoFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ProtoFormat} ProtoFormat + */ + ProtoFormat.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ProtoFormat) + return object; + return new $root.google.bigtable.v2.ProtoFormat(); + }; + + /** + * Creates a plain object from a ProtoFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {google.bigtable.v2.ProtoFormat} message ProtoFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtoFormat.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ProtoFormat to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ProtoFormat + * @instance + * @returns {Object.} JSON object + */ + ProtoFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtoFormat + * @function getTypeUrl + * @memberof google.bigtable.v2.ProtoFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtoFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ProtoFormat"; + }; + + return ProtoFormat; + })(); + + v2.ColumnMetadata = (function() { + + /** + * Properties of a ColumnMetadata. + * @memberof google.bigtable.v2 + * @interface IColumnMetadata + * @property {string|null} [name] ColumnMetadata name + * @property {google.bigtable.v2.IType|null} [type] ColumnMetadata type + */ + + /** + * Constructs a new ColumnMetadata. + * @memberof google.bigtable.v2 + * @classdesc Represents a ColumnMetadata. + * @implements IColumnMetadata + * @constructor + * @param {google.bigtable.v2.IColumnMetadata=} [properties] Properties to set + */ + function ColumnMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnMetadata name. + * @member {string} name + * @memberof google.bigtable.v2.ColumnMetadata + * @instance + */ + ColumnMetadata.prototype.name = ""; + + /** + * ColumnMetadata type. + * @member {google.bigtable.v2.IType|null|undefined} type + * @memberof google.bigtable.v2.ColumnMetadata + * @instance + */ + ColumnMetadata.prototype.type = null; + + /** + * Creates a new ColumnMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {google.bigtable.v2.IColumnMetadata=} [properties] Properties to set + * @returns {google.bigtable.v2.ColumnMetadata} ColumnMetadata instance + */ + ColumnMetadata.create = function create(properties) { + return new ColumnMetadata(properties); + }; + + /** + * Encodes the specified ColumnMetadata message. Does not implicitly {@link google.bigtable.v2.ColumnMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {google.bigtable.v2.IColumnMetadata} message ColumnMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ColumnMetadata message, length delimited. Does not implicitly {@link google.bigtable.v2.ColumnMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {google.bigtable.v2.IColumnMetadata} message ColumnMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ColumnMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ColumnMetadata} ColumnMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ColumnMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ColumnMetadata} ColumnMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnMetadata message. + * @function verify + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type, long + 1); + if (error) + return "type." + error; + } + return null; + }; + + /** + * Creates a ColumnMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ColumnMetadata} ColumnMetadata + */ + ColumnMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ColumnMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ColumnMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ColumnMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) { + if (!$util.isObject(object.type)) + throw TypeError(".google.bigtable.v2.ColumnMetadata.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ColumnMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {google.bigtable.v2.ColumnMetadata} message ColumnMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options, q + 1); + return object; + }; + + /** + * Converts this ColumnMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ColumnMetadata + * @instance + * @returns {Object.} JSON object + */ + ColumnMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ColumnMetadata + * @function getTypeUrl + * @memberof google.bigtable.v2.ColumnMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ColumnMetadata"; + }; + + return ColumnMetadata; + })(); + + v2.ProtoSchema = (function() { + + /** + * Properties of a ProtoSchema. + * @memberof google.bigtable.v2 + * @interface IProtoSchema + * @property {Array.|null} [columns] ProtoSchema columns + */ + + /** + * Constructs a new ProtoSchema. + * @memberof google.bigtable.v2 + * @classdesc Represents a ProtoSchema. + * @implements IProtoSchema + * @constructor + * @param {google.bigtable.v2.IProtoSchema=} [properties] Properties to set + */ + function ProtoSchema(properties) { + this.columns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtoSchema columns. + * @member {Array.} columns + * @memberof google.bigtable.v2.ProtoSchema + * @instance + */ + ProtoSchema.prototype.columns = $util.emptyArray; + + /** + * Creates a new ProtoSchema instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {google.bigtable.v2.IProtoSchema=} [properties] Properties to set + * @returns {google.bigtable.v2.ProtoSchema} ProtoSchema instance + */ + ProtoSchema.create = function create(properties) { + return new ProtoSchema(properties); + }; + + /** + * Encodes the specified ProtoSchema message. Does not implicitly {@link google.bigtable.v2.ProtoSchema.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {google.bigtable.v2.IProtoSchema} message ProtoSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoSchema.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.bigtable.v2.ColumnMetadata.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProtoSchema message, length delimited. Does not implicitly {@link google.bigtable.v2.ProtoSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {google.bigtable.v2.IProtoSchema} message ProtoSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ProtoSchema message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ProtoSchema} ProtoSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoSchema.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.bigtable.v2.ColumnMetadata.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ProtoSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ProtoSchema} ProtoSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtoSchema message. + * @function verify + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtoSchema.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.bigtable.v2.ColumnMetadata.verify(message.columns[i], long + 1); + if (error) + return "columns." + error; + } + } + return null; + }; + + /** + * Creates a ProtoSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ProtoSchema} ProtoSchema + */ + ProtoSchema.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ProtoSchema) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ProtoSchema: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ProtoSchema(); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.bigtable.v2.ProtoSchema.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (!$util.isObject(object.columns[i])) + throw TypeError(".google.bigtable.v2.ProtoSchema.columns: object expected"); + message.columns[i] = $root.google.bigtable.v2.ColumnMetadata.fromObject(object.columns[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ProtoSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {google.bigtable.v2.ProtoSchema} message ProtoSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtoSchema.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.bigtable.v2.ColumnMetadata.toObject(message.columns[j], options, q + 1); + } + return object; + }; + + /** + * Converts this ProtoSchema to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ProtoSchema + * @instance + * @returns {Object.} JSON object + */ + ProtoSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtoSchema + * @function getTypeUrl + * @memberof google.bigtable.v2.ProtoSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtoSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ProtoSchema"; + }; + + return ProtoSchema; + })(); + + v2.ResultSetMetadata = (function() { + + /** + * Properties of a ResultSetMetadata. + * @memberof google.bigtable.v2 + * @interface IResultSetMetadata + * @property {google.bigtable.v2.IProtoSchema|null} [protoSchema] ResultSetMetadata protoSchema + */ + + /** + * Constructs a new ResultSetMetadata. + * @memberof google.bigtable.v2 + * @classdesc Represents a ResultSetMetadata. + * @implements IResultSetMetadata + * @constructor + * @param {google.bigtable.v2.IResultSetMetadata=} [properties] Properties to set + */ + function ResultSetMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResultSetMetadata protoSchema. + * @member {google.bigtable.v2.IProtoSchema|null|undefined} protoSchema + * @memberof google.bigtable.v2.ResultSetMetadata + * @instance + */ + ResultSetMetadata.prototype.protoSchema = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResultSetMetadata schema. + * @member {"protoSchema"|undefined} schema + * @memberof google.bigtable.v2.ResultSetMetadata + * @instance + */ + Object.defineProperty(ResultSetMetadata.prototype, "schema", { + get: $util.oneOfGetter($oneOfFields = ["protoSchema"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResultSetMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {google.bigtable.v2.IResultSetMetadata=} [properties] Properties to set + * @returns {google.bigtable.v2.ResultSetMetadata} ResultSetMetadata instance + */ + ResultSetMetadata.create = function create(properties) { + return new ResultSetMetadata(properties); + }; + + /** + * Encodes the specified ResultSetMetadata message. Does not implicitly {@link google.bigtable.v2.ResultSetMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {google.bigtable.v2.IResultSetMetadata} message ResultSetMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResultSetMetadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) + $root.google.bigtable.v2.ProtoSchema.encode(message.protoSchema, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResultSetMetadata message, length delimited. Does not implicitly {@link google.bigtable.v2.ResultSetMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {google.bigtable.v2.IResultSetMetadata} message ResultSetMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResultSetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ResultSetMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ResultSetMetadata} ResultSetMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResultSetMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ResultSetMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.protoSchema = $root.google.bigtable.v2.ProtoSchema.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ResultSetMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ResultSetMetadata} ResultSetMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResultSetMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResultSetMetadata message. + * @function verify + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResultSetMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) { + properties.schema = 1; + { + var error = $root.google.bigtable.v2.ProtoSchema.verify(message.protoSchema, long + 1); + if (error) + return "protoSchema." + error; + } + } + return null; + }; + + /** + * Creates a ResultSetMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ResultSetMetadata} ResultSetMetadata + */ + ResultSetMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ResultSetMetadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ResultSetMetadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ResultSetMetadata(); + if (object.protoSchema != null) { + if (!$util.isObject(object.protoSchema)) + throw TypeError(".google.bigtable.v2.ResultSetMetadata.protoSchema: object expected"); + message.protoSchema = $root.google.bigtable.v2.ProtoSchema.fromObject(object.protoSchema, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ResultSetMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {google.bigtable.v2.ResultSetMetadata} message ResultSetMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResultSetMetadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) { + object.protoSchema = $root.google.bigtable.v2.ProtoSchema.toObject(message.protoSchema, options, q + 1); + if (options.oneofs) + object.schema = "protoSchema"; + } + return object; + }; + + /** + * Converts this ResultSetMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ResultSetMetadata + * @instance + * @returns {Object.} JSON object + */ + ResultSetMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResultSetMetadata + * @function getTypeUrl + * @memberof google.bigtable.v2.ResultSetMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResultSetMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ResultSetMetadata"; + }; + + return ResultSetMetadata; + })(); + + v2.ProtoRows = (function() { + + /** + * Properties of a ProtoRows. + * @memberof google.bigtable.v2 + * @interface IProtoRows + * @property {Array.|null} [values] ProtoRows values + */ + + /** + * Constructs a new ProtoRows. + * @memberof google.bigtable.v2 + * @classdesc Represents a ProtoRows. + * @implements IProtoRows + * @constructor + * @param {google.bigtable.v2.IProtoRows=} [properties] Properties to set + */ + function ProtoRows(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtoRows values. + * @member {Array.} values + * @memberof google.bigtable.v2.ProtoRows + * @instance + */ + ProtoRows.prototype.values = $util.emptyArray; + + /** + * Creates a new ProtoRows instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {google.bigtable.v2.IProtoRows=} [properties] Properties to set + * @returns {google.bigtable.v2.ProtoRows} ProtoRows instance + */ + ProtoRows.create = function create(properties) { + return new ProtoRows(properties); + }; + + /** + * Encodes the specified ProtoRows message. Does not implicitly {@link google.bigtable.v2.ProtoRows.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {google.bigtable.v2.IProtoRows} message ProtoRows message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoRows.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.bigtable.v2.Value.encode(message.values[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProtoRows message, length delimited. Does not implicitly {@link google.bigtable.v2.ProtoRows.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {google.bigtable.v2.IProtoRows} message ProtoRows message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoRows.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ProtoRows message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ProtoRows} ProtoRows + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoRows.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoRows(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.bigtable.v2.Value.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ProtoRows message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ProtoRows} ProtoRows + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoRows.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtoRows message. + * @function verify + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtoRows.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.values != null && Object.hasOwnProperty.call(message, "values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.bigtable.v2.Value.verify(message.values[i], long + 1); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ProtoRows message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ProtoRows} ProtoRows + */ + ProtoRows.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ProtoRows) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ProtoRows: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ProtoRows(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.bigtable.v2.ProtoRows.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (!$util.isObject(object.values[i])) + throw TypeError(".google.bigtable.v2.ProtoRows.values: object expected"); + message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ProtoRows message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {google.bigtable.v2.ProtoRows} message ProtoRows + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtoRows.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.bigtable.v2.Value.toObject(message.values[j], options, q + 1); + } + return object; + }; + + /** + * Converts this ProtoRows to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ProtoRows + * @instance + * @returns {Object.} JSON object + */ + ProtoRows.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtoRows + * @function getTypeUrl + * @memberof google.bigtable.v2.ProtoRows + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtoRows.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ProtoRows"; + }; + + return ProtoRows; + })(); + + v2.ProtoRowsBatch = (function() { + + /** + * Properties of a ProtoRowsBatch. + * @memberof google.bigtable.v2 + * @interface IProtoRowsBatch + * @property {Uint8Array|null} [batchData] ProtoRowsBatch batchData + */ + + /** + * Constructs a new ProtoRowsBatch. + * @memberof google.bigtable.v2 + * @classdesc Represents a ProtoRowsBatch. + * @implements IProtoRowsBatch + * @constructor + * @param {google.bigtable.v2.IProtoRowsBatch=} [properties] Properties to set + */ + function ProtoRowsBatch(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtoRowsBatch batchData. + * @member {Uint8Array} batchData + * @memberof google.bigtable.v2.ProtoRowsBatch + * @instance + */ + ProtoRowsBatch.prototype.batchData = $util.newBuffer([]); + + /** + * Creates a new ProtoRowsBatch instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {google.bigtable.v2.IProtoRowsBatch=} [properties] Properties to set + * @returns {google.bigtable.v2.ProtoRowsBatch} ProtoRowsBatch instance + */ + ProtoRowsBatch.create = function create(properties) { + return new ProtoRowsBatch(properties); + }; + + /** + * Encodes the specified ProtoRowsBatch message. Does not implicitly {@link google.bigtable.v2.ProtoRowsBatch.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {google.bigtable.v2.IProtoRowsBatch} message ProtoRowsBatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoRowsBatch.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.batchData != null && Object.hasOwnProperty.call(message, "batchData")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.batchData); + return writer; + }; + + /** + * Encodes the specified ProtoRowsBatch message, length delimited. Does not implicitly {@link google.bigtable.v2.ProtoRowsBatch.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {google.bigtable.v2.IProtoRowsBatch} message ProtoRowsBatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtoRowsBatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ProtoRowsBatch message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ProtoRowsBatch} ProtoRowsBatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoRowsBatch.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ProtoRowsBatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.batchData = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ProtoRowsBatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ProtoRowsBatch} ProtoRowsBatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtoRowsBatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtoRowsBatch message. + * @function verify + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtoRowsBatch.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.batchData != null && Object.hasOwnProperty.call(message, "batchData")) + if (!(message.batchData && typeof message.batchData.length === "number" || $util.isString(message.batchData))) + return "batchData: buffer expected"; + return null; + }; + + /** + * Creates a ProtoRowsBatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ProtoRowsBatch} ProtoRowsBatch + */ + ProtoRowsBatch.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ProtoRowsBatch) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ProtoRowsBatch: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ProtoRowsBatch(); + if (object.batchData != null) + if (typeof object.batchData === "string") + $util.base64.decode(object.batchData, message.batchData = $util.newBuffer($util.base64.length(object.batchData)), 0); + else if (object.batchData.length >= 0) + message.batchData = object.batchData; + return message; + }; + + /** + * Creates a plain object from a ProtoRowsBatch message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {google.bigtable.v2.ProtoRowsBatch} message ProtoRowsBatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtoRowsBatch.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.batchData = ""; + else { + object.batchData = []; + if (options.bytes !== Array) + object.batchData = $util.newBuffer(object.batchData); + } + if (message.batchData != null && Object.hasOwnProperty.call(message, "batchData")) + object.batchData = options.bytes === String ? $util.base64.encode(message.batchData, 0, message.batchData.length) : options.bytes === Array ? Array.prototype.slice.call(message.batchData) : message.batchData; + return object; + }; + + /** + * Converts this ProtoRowsBatch to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ProtoRowsBatch + * @instance + * @returns {Object.} JSON object + */ + ProtoRowsBatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtoRowsBatch + * @function getTypeUrl + * @memberof google.bigtable.v2.ProtoRowsBatch + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtoRowsBatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ProtoRowsBatch"; + }; + + return ProtoRowsBatch; + })(); + + v2.PartialResultSet = (function() { + + /** + * Properties of a PartialResultSet. + * @memberof google.bigtable.v2 + * @interface IPartialResultSet + * @property {google.bigtable.v2.IProtoRowsBatch|null} [protoRowsBatch] PartialResultSet protoRowsBatch + * @property {number|null} [batchChecksum] PartialResultSet batchChecksum + * @property {Uint8Array|null} [resumeToken] PartialResultSet resumeToken + * @property {boolean|null} [reset] PartialResultSet reset + * @property {number|null} [estimatedBatchSize] PartialResultSet estimatedBatchSize + */ + + /** + * Constructs a new PartialResultSet. + * @memberof google.bigtable.v2 + * @classdesc Represents a PartialResultSet. + * @implements IPartialResultSet + * @constructor + * @param {google.bigtable.v2.IPartialResultSet=} [properties] Properties to set + */ + function PartialResultSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartialResultSet protoRowsBatch. + * @member {google.bigtable.v2.IProtoRowsBatch|null|undefined} protoRowsBatch + * @memberof google.bigtable.v2.PartialResultSet + * @instance + */ + PartialResultSet.prototype.protoRowsBatch = null; + + /** + * PartialResultSet batchChecksum. + * @member {number|null|undefined} batchChecksum + * @memberof google.bigtable.v2.PartialResultSet + * @instance + */ + PartialResultSet.prototype.batchChecksum = null; + + /** + * PartialResultSet resumeToken. + * @member {Uint8Array} resumeToken + * @memberof google.bigtable.v2.PartialResultSet + * @instance + */ + PartialResultSet.prototype.resumeToken = $util.newBuffer([]); + + /** + * PartialResultSet reset. + * @member {boolean} reset + * @memberof google.bigtable.v2.PartialResultSet + * @instance + */ + PartialResultSet.prototype.reset = false; + + /** + * PartialResultSet estimatedBatchSize. + * @member {number} estimatedBatchSize + * @memberof google.bigtable.v2.PartialResultSet + * @instance + */ + PartialResultSet.prototype.estimatedBatchSize = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PartialResultSet partialRows. + * @member {"protoRowsBatch"|undefined} partialRows + * @memberof google.bigtable.v2.PartialResultSet + * @instance + */ + Object.defineProperty(PartialResultSet.prototype, "partialRows", { + get: $util.oneOfGetter($oneOfFields = ["protoRowsBatch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PartialResultSet.prototype, "_batchChecksum", { + get: $util.oneOfGetter($oneOfFields = ["batchChecksum"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PartialResultSet instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {google.bigtable.v2.IPartialResultSet=} [properties] Properties to set + * @returns {google.bigtable.v2.PartialResultSet} PartialResultSet instance + */ + PartialResultSet.create = function create(properties) { + return new PartialResultSet(properties); + }; + + /** + * Encodes the specified PartialResultSet message. Does not implicitly {@link google.bigtable.v2.PartialResultSet.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {google.bigtable.v2.IPartialResultSet} message PartialResultSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialResultSet.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.protoRowsBatch != null && Object.hasOwnProperty.call(message, "protoRowsBatch")) + $root.google.bigtable.v2.ProtoRowsBatch.encode(message.protoRowsBatch, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.estimatedBatchSize != null && Object.hasOwnProperty.call(message, "estimatedBatchSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.estimatedBatchSize); + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.resumeToken); + if (message.batchChecksum != null && Object.hasOwnProperty.call(message, "batchChecksum")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.batchChecksum); + if (message.reset != null && Object.hasOwnProperty.call(message, "reset")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.reset); + return writer; + }; + + /** + * Encodes the specified PartialResultSet message, length delimited. Does not implicitly {@link google.bigtable.v2.PartialResultSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {google.bigtable.v2.IPartialResultSet} message PartialResultSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialResultSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PartialResultSet message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PartialResultSet} PartialResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialResultSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PartialResultSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.batchChecksum = reader.uint32(); + break; + } + case 5: { + message.resumeToken = reader.bytes(); + break; + } + case 7: { + message.reset = reader.bool(); + break; + } + case 4: { + message.estimatedBatchSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PartialResultSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PartialResultSet} PartialResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialResultSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartialResultSet message. + * @function verify + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartialResultSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.protoRowsBatch != null && Object.hasOwnProperty.call(message, "protoRowsBatch")) { + properties.partialRows = 1; + { + var error = $root.google.bigtable.v2.ProtoRowsBatch.verify(message.protoRowsBatch, long + 1); + if (error) + return "protoRowsBatch." + error; + } + } + if (message.batchChecksum != null && Object.hasOwnProperty.call(message, "batchChecksum")) { + properties._batchChecksum = 1; + if (!$util.isInteger(message.batchChecksum)) + return "batchChecksum: integer expected"; + } + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) + return "resumeToken: buffer expected"; + if (message.reset != null && Object.hasOwnProperty.call(message, "reset")) + if (typeof message.reset !== "boolean") + return "reset: boolean expected"; + if (message.estimatedBatchSize != null && Object.hasOwnProperty.call(message, "estimatedBatchSize")) + if (!$util.isInteger(message.estimatedBatchSize)) + return "estimatedBatchSize: integer expected"; + return null; + }; + + /** + * Creates a PartialResultSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PartialResultSet} PartialResultSet + */ + PartialResultSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.PartialResultSet) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PartialResultSet: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.PartialResultSet(); + if (object.protoRowsBatch != null) { + if (!$util.isObject(object.protoRowsBatch)) + throw TypeError(".google.bigtable.v2.PartialResultSet.protoRowsBatch: object expected"); + message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.fromObject(object.protoRowsBatch, long + 1); + } + if (object.batchChecksum != null) + message.batchChecksum = object.batchChecksum >>> 0; + if (object.resumeToken != null) + if (typeof object.resumeToken === "string") + $util.base64.decode(object.resumeToken, message.resumeToken = $util.newBuffer($util.base64.length(object.resumeToken)), 0); + else if (object.resumeToken.length >= 0) + message.resumeToken = object.resumeToken; + if (object.reset != null) + message.reset = Boolean(object.reset); + if (object.estimatedBatchSize != null) + message.estimatedBatchSize = object.estimatedBatchSize | 0; + return message; + }; + + /** + * Creates a plain object from a PartialResultSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {google.bigtable.v2.PartialResultSet} message PartialResultSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartialResultSet.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.estimatedBatchSize = 0; + if (options.bytes === String) + object.resumeToken = ""; + else { + object.resumeToken = []; + if (options.bytes !== Array) + object.resumeToken = $util.newBuffer(object.resumeToken); + } + object.reset = false; + } + if (message.protoRowsBatch != null && Object.hasOwnProperty.call(message, "protoRowsBatch")) { + object.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.toObject(message.protoRowsBatch, options, q + 1); + if (options.oneofs) + object.partialRows = "protoRowsBatch"; + } + if (message.estimatedBatchSize != null && Object.hasOwnProperty.call(message, "estimatedBatchSize")) + object.estimatedBatchSize = message.estimatedBatchSize; + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + object.resumeToken = options.bytes === String ? $util.base64.encode(message.resumeToken, 0, message.resumeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.resumeToken) : message.resumeToken; + if (message.batchChecksum != null && Object.hasOwnProperty.call(message, "batchChecksum")) { + object.batchChecksum = message.batchChecksum; + if (options.oneofs) + object._batchChecksum = "batchChecksum"; + } + if (message.reset != null && Object.hasOwnProperty.call(message, "reset")) + object.reset = message.reset; + return object; + }; + + /** + * Converts this PartialResultSet to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PartialResultSet + * @instance + * @returns {Object.} JSON object + */ + PartialResultSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartialResultSet + * @function getTypeUrl + * @memberof google.bigtable.v2.PartialResultSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartialResultSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.PartialResultSet"; + }; + + return PartialResultSet; + })(); + + v2.Idempotency = (function() { + + /** + * Properties of an Idempotency. + * @memberof google.bigtable.v2 + * @interface IIdempotency + * @property {Uint8Array|null} [token] Idempotency token + * @property {google.protobuf.ITimestamp|null} [startTime] Idempotency startTime + */ + + /** + * Constructs a new Idempotency. + * @memberof google.bigtable.v2 + * @classdesc Represents an Idempotency. + * @implements IIdempotency + * @constructor + * @param {google.bigtable.v2.IIdempotency=} [properties] Properties to set + */ + function Idempotency(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Idempotency token. + * @member {Uint8Array} token + * @memberof google.bigtable.v2.Idempotency + * @instance + */ + Idempotency.prototype.token = $util.newBuffer([]); + + /** + * Idempotency startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.v2.Idempotency + * @instance + */ + Idempotency.prototype.startTime = null; + + /** + * Creates a new Idempotency instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {google.bigtable.v2.IIdempotency=} [properties] Properties to set + * @returns {google.bigtable.v2.Idempotency} Idempotency instance + */ + Idempotency.create = function create(properties) { + return new Idempotency(properties); + }; + + /** + * Encodes the specified Idempotency message. Does not implicitly {@link google.bigtable.v2.Idempotency.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {google.bigtable.v2.IIdempotency} message Idempotency message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Idempotency.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.token); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Idempotency message, length delimited. Does not implicitly {@link google.bigtable.v2.Idempotency.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {google.bigtable.v2.IIdempotency} message Idempotency message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Idempotency.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Idempotency message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Idempotency} Idempotency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Idempotency.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Idempotency(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.token = reader.bytes(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Idempotency message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Idempotency} Idempotency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Idempotency.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Idempotency message. + * @function verify + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Idempotency.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + if (!(message.token && typeof message.token.length === "number" || $util.isString(message.token))) + return "token: buffer expected"; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + return null; + }; + + /** + * Creates an Idempotency message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Idempotency} Idempotency + */ + Idempotency.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Idempotency) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Idempotency: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Idempotency(); + if (object.token != null) + if (typeof object.token === "string") + $util.base64.decode(object.token, message.token = $util.newBuffer($util.base64.length(object.token)), 0); + else if (object.token.length >= 0) + message.token = object.token; + if (object.startTime != null) { + if (!$util.isObject(object.startTime)) + throw TypeError(".google.bigtable.v2.Idempotency.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Idempotency message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {google.bigtable.v2.Idempotency} message Idempotency + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Idempotency.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.token = ""; + else { + object.token = []; + if (options.bytes !== Array) + object.token = $util.newBuffer(object.token); + } + object.startTime = null; + } + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + object.token = options.bytes === String ? $util.base64.encode(message.token, 0, message.token.length) : options.bytes === Array ? Array.prototype.slice.call(message.token) : message.token; + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + return object; + }; + + /** + * Converts this Idempotency to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Idempotency + * @instance + * @returns {Object.} JSON object + */ + Idempotency.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Idempotency + * @function getTypeUrl + * @memberof google.bigtable.v2.Idempotency + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Idempotency.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Idempotency"; + }; + + return Idempotency; + })(); + + v2.Type = (function() { + + /** + * Properties of a Type. + * @memberof google.bigtable.v2 + * @interface IType + * @property {google.bigtable.v2.Type.IBytes|null} [bytesType] Type bytesType + * @property {google.bigtable.v2.Type.IString|null} [stringType] Type stringType + * @property {google.bigtable.v2.Type.IInt64|null} [int64Type] Type int64Type + * @property {google.bigtable.v2.Type.IFloat32|null} [float32Type] Type float32Type + * @property {google.bigtable.v2.Type.IFloat64|null} [float64Type] Type float64Type + * @property {google.bigtable.v2.Type.IBool|null} [boolType] Type boolType + * @property {google.bigtable.v2.Type.ITimestamp|null} [timestampType] Type timestampType + * @property {google.bigtable.v2.Type.IDate|null} [dateType] Type dateType + * @property {google.bigtable.v2.Type.IAggregate|null} [aggregateType] Type aggregateType + * @property {google.bigtable.v2.Type.IStruct|null} [structType] Type structType + * @property {google.bigtable.v2.Type.IArray|null} [arrayType] Type arrayType + * @property {google.bigtable.v2.Type.IMap|null} [mapType] Type mapType + * @property {google.bigtable.v2.Type.IProto|null} [protoType] Type protoType + * @property {google.bigtable.v2.Type.IEnum|null} [enumType] Type enumType + */ + + /** + * Constructs a new Type. + * @memberof google.bigtable.v2 + * @classdesc Represents a Type. + * @implements IType + * @constructor + * @param {google.bigtable.v2.IType=} [properties] Properties to set + */ + function Type(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Type bytesType. + * @member {google.bigtable.v2.Type.IBytes|null|undefined} bytesType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.bytesType = null; + + /** + * Type stringType. + * @member {google.bigtable.v2.Type.IString|null|undefined} stringType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.stringType = null; + + /** + * Type int64Type. + * @member {google.bigtable.v2.Type.IInt64|null|undefined} int64Type + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.int64Type = null; + + /** + * Type float32Type. + * @member {google.bigtable.v2.Type.IFloat32|null|undefined} float32Type + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.float32Type = null; + + /** + * Type float64Type. + * @member {google.bigtable.v2.Type.IFloat64|null|undefined} float64Type + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.float64Type = null; + + /** + * Type boolType. + * @member {google.bigtable.v2.Type.IBool|null|undefined} boolType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.boolType = null; + + /** + * Type timestampType. + * @member {google.bigtable.v2.Type.ITimestamp|null|undefined} timestampType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.timestampType = null; + + /** + * Type dateType. + * @member {google.bigtable.v2.Type.IDate|null|undefined} dateType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.dateType = null; + + /** + * Type aggregateType. + * @member {google.bigtable.v2.Type.IAggregate|null|undefined} aggregateType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.aggregateType = null; + + /** + * Type structType. + * @member {google.bigtable.v2.Type.IStruct|null|undefined} structType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.structType = null; + + /** + * Type arrayType. + * @member {google.bigtable.v2.Type.IArray|null|undefined} arrayType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.arrayType = null; + + /** + * Type mapType. + * @member {google.bigtable.v2.Type.IMap|null|undefined} mapType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.mapType = null; + + /** + * Type protoType. + * @member {google.bigtable.v2.Type.IProto|null|undefined} protoType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.protoType = null; + + /** + * Type enumType. + * @member {google.bigtable.v2.Type.IEnum|null|undefined} enumType + * @memberof google.bigtable.v2.Type + * @instance + */ + Type.prototype.enumType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Type kind. + * @member {"bytesType"|"stringType"|"int64Type"|"float32Type"|"float64Type"|"boolType"|"timestampType"|"dateType"|"aggregateType"|"structType"|"arrayType"|"mapType"|"protoType"|"enumType"|undefined} kind + * @memberof google.bigtable.v2.Type + * @instance + */ + Object.defineProperty(Type.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["bytesType", "stringType", "int64Type", "float32Type", "float64Type", "boolType", "timestampType", "dateType", "aggregateType", "structType", "arrayType", "mapType", "protoType", "enumType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Type instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type + * @static + * @param {google.bigtable.v2.IType=} [properties] Properties to set + * @returns {google.bigtable.v2.Type} Type instance + */ + Type.create = function create(properties) { + return new Type(properties); + }; + + /** + * Encodes the specified Type message. Does not implicitly {@link google.bigtable.v2.Type.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type + * @static + * @param {google.bigtable.v2.IType} message Type message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Type.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + $root.google.bigtable.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) + $root.google.bigtable.v2.Type.String.encode(message.stringType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) + $root.google.bigtable.v2.Type.Array.encode(message.arrayType, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) + $root.google.bigtable.v2.Type.Map.encode(message.mapType, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) + $root.google.bigtable.v2.Type.Int64.encode(message.int64Type, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) + $root.google.bigtable.v2.Type.Aggregate.encode(message.aggregateType, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) + $root.google.bigtable.v2.Type.Struct.encode(message.structType, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) + $root.google.bigtable.v2.Type.Bool.encode(message.boolType, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) + $root.google.bigtable.v2.Type.Float64.encode(message.float64Type, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) + $root.google.bigtable.v2.Type.Timestamp.encode(message.timestampType, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) + $root.google.bigtable.v2.Type.Date.encode(message.dateType, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) + $root.google.bigtable.v2.Type.Float32.encode(message.float32Type, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) + $root.google.bigtable.v2.Type.Proto.encode(message.protoType, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + $root.google.bigtable.v2.Type.Enum.encode(message.enumType, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Type message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type + * @static + * @param {google.bigtable.v2.IType} message Type message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Type.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Type message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type} Type + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Type.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.v2.Type.Bytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.stringType = $root.google.bigtable.v2.Type.String.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.int64Type = $root.google.bigtable.v2.Type.Int64.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 12: { + message.float32Type = $root.google.bigtable.v2.Type.Float32.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.float64Type = $root.google.bigtable.v2.Type.Float64.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.boolType = $root.google.bigtable.v2.Type.Bool.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.timestampType = $root.google.bigtable.v2.Type.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 11: { + message.dateType = $root.google.bigtable.v2.Type.Date.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.structType = $root.google.bigtable.v2.Type.Struct.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.arrayType = $root.google.bigtable.v2.Type.Array.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.mapType = $root.google.bigtable.v2.Type.Map.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 13: { + message.protoType = $root.google.bigtable.v2.Type.Proto.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 14: { + message.enumType = $root.google.bigtable.v2.Type.Enum.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Type message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type} Type + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Type.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Type message. + * @function verify + * @memberof google.bigtable.v2.Type + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Type.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType, long + 1); + if (error) + return "bytesType." + error; + } + } + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.String.verify(message.stringType, long + 1); + if (error) + return "stringType." + error; + } + } + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Int64.verify(message.int64Type, long + 1); + if (error) + return "int64Type." + error; + } + } + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Float32.verify(message.float32Type, long + 1); + if (error) + return "float32Type." + error; + } + } + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Float64.verify(message.float64Type, long + 1); + if (error) + return "float64Type." + error; + } + } + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Bool.verify(message.boolType, long + 1); + if (error) + return "boolType." + error; + } + } + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Timestamp.verify(message.timestampType, long + 1); + if (error) + return "timestampType." + error; + } + } + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Date.verify(message.dateType, long + 1); + if (error) + return "dateType." + error; + } + } + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.verify(message.aggregateType, long + 1); + if (error) + return "aggregateType." + error; + } + } + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Struct.verify(message.structType, long + 1); + if (error) + return "structType." + error; + } + } + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Array.verify(message.arrayType, long + 1); + if (error) + return "arrayType." + error; + } + } + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Map.verify(message.mapType, long + 1); + if (error) + return "mapType." + error; + } + } + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Proto.verify(message.protoType, long + 1); + if (error) + return "protoType." + error; + } + } + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.v2.Type.Enum.verify(message.enumType, long + 1); + if (error) + return "enumType." + error; + } + } + return null; + }; + + /** + * Creates a Type message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type} Type + */ + Type.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type(); + if (object.bytesType != null) { + if (!$util.isObject(object.bytesType)) + throw TypeError(".google.bigtable.v2.Type.bytesType: object expected"); + message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType, long + 1); + } + if (object.stringType != null) { + if (!$util.isObject(object.stringType)) + throw TypeError(".google.bigtable.v2.Type.stringType: object expected"); + message.stringType = $root.google.bigtable.v2.Type.String.fromObject(object.stringType, long + 1); + } + if (object.int64Type != null) { + if (!$util.isObject(object.int64Type)) + throw TypeError(".google.bigtable.v2.Type.int64Type: object expected"); + message.int64Type = $root.google.bigtable.v2.Type.Int64.fromObject(object.int64Type, long + 1); + } + if (object.float32Type != null) { + if (!$util.isObject(object.float32Type)) + throw TypeError(".google.bigtable.v2.Type.float32Type: object expected"); + message.float32Type = $root.google.bigtable.v2.Type.Float32.fromObject(object.float32Type, long + 1); + } + if (object.float64Type != null) { + if (!$util.isObject(object.float64Type)) + throw TypeError(".google.bigtable.v2.Type.float64Type: object expected"); + message.float64Type = $root.google.bigtable.v2.Type.Float64.fromObject(object.float64Type, long + 1); + } + if (object.boolType != null) { + if (!$util.isObject(object.boolType)) + throw TypeError(".google.bigtable.v2.Type.boolType: object expected"); + message.boolType = $root.google.bigtable.v2.Type.Bool.fromObject(object.boolType, long + 1); + } + if (object.timestampType != null) { + if (!$util.isObject(object.timestampType)) + throw TypeError(".google.bigtable.v2.Type.timestampType: object expected"); + message.timestampType = $root.google.bigtable.v2.Type.Timestamp.fromObject(object.timestampType, long + 1); + } + if (object.dateType != null) { + if (!$util.isObject(object.dateType)) + throw TypeError(".google.bigtable.v2.Type.dateType: object expected"); + message.dateType = $root.google.bigtable.v2.Type.Date.fromObject(object.dateType, long + 1); + } + if (object.aggregateType != null) { + if (!$util.isObject(object.aggregateType)) + throw TypeError(".google.bigtable.v2.Type.aggregateType: object expected"); + message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.fromObject(object.aggregateType, long + 1); + } + if (object.structType != null) { + if (!$util.isObject(object.structType)) + throw TypeError(".google.bigtable.v2.Type.structType: object expected"); + message.structType = $root.google.bigtable.v2.Type.Struct.fromObject(object.structType, long + 1); + } + if (object.arrayType != null) { + if (!$util.isObject(object.arrayType)) + throw TypeError(".google.bigtable.v2.Type.arrayType: object expected"); + message.arrayType = $root.google.bigtable.v2.Type.Array.fromObject(object.arrayType, long + 1); + } + if (object.mapType != null) { + if (!$util.isObject(object.mapType)) + throw TypeError(".google.bigtable.v2.Type.mapType: object expected"); + message.mapType = $root.google.bigtable.v2.Type.Map.fromObject(object.mapType, long + 1); + } + if (object.protoType != null) { + if (!$util.isObject(object.protoType)) + throw TypeError(".google.bigtable.v2.Type.protoType: object expected"); + message.protoType = $root.google.bigtable.v2.Type.Proto.fromObject(object.protoType, long + 1); + } + if (object.enumType != null) { + if (!$util.isObject(object.enumType)) + throw TypeError(".google.bigtable.v2.Type.enumType: object expected"); + message.enumType = $root.google.bigtable.v2.Type.Enum.fromObject(object.enumType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Type message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type + * @static + * @param {google.bigtable.v2.Type} message Type + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Type.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { + object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options, q + 1); + if (options.oneofs) + object.kind = "bytesType"; + } + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) { + object.stringType = $root.google.bigtable.v2.Type.String.toObject(message.stringType, options, q + 1); + if (options.oneofs) + object.kind = "stringType"; + } + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) { + object.arrayType = $root.google.bigtable.v2.Type.Array.toObject(message.arrayType, options, q + 1); + if (options.oneofs) + object.kind = "arrayType"; + } + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) { + object.mapType = $root.google.bigtable.v2.Type.Map.toObject(message.mapType, options, q + 1); + if (options.oneofs) + object.kind = "mapType"; + } + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) { + object.int64Type = $root.google.bigtable.v2.Type.Int64.toObject(message.int64Type, options, q + 1); + if (options.oneofs) + object.kind = "int64Type"; + } + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) { + object.aggregateType = $root.google.bigtable.v2.Type.Aggregate.toObject(message.aggregateType, options, q + 1); + if (options.oneofs) + object.kind = "aggregateType"; + } + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) { + object.structType = $root.google.bigtable.v2.Type.Struct.toObject(message.structType, options, q + 1); + if (options.oneofs) + object.kind = "structType"; + } + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) { + object.boolType = $root.google.bigtable.v2.Type.Bool.toObject(message.boolType, options, q + 1); + if (options.oneofs) + object.kind = "boolType"; + } + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) { + object.float64Type = $root.google.bigtable.v2.Type.Float64.toObject(message.float64Type, options, q + 1); + if (options.oneofs) + object.kind = "float64Type"; + } + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) { + object.timestampType = $root.google.bigtable.v2.Type.Timestamp.toObject(message.timestampType, options, q + 1); + if (options.oneofs) + object.kind = "timestampType"; + } + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) { + object.dateType = $root.google.bigtable.v2.Type.Date.toObject(message.dateType, options, q + 1); + if (options.oneofs) + object.kind = "dateType"; + } + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) { + object.float32Type = $root.google.bigtable.v2.Type.Float32.toObject(message.float32Type, options, q + 1); + if (options.oneofs) + object.kind = "float32Type"; + } + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) { + object.protoType = $root.google.bigtable.v2.Type.Proto.toObject(message.protoType, options, q + 1); + if (options.oneofs) + object.kind = "protoType"; + } + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + object.enumType = $root.google.bigtable.v2.Type.Enum.toObject(message.enumType, options, q + 1); + if (options.oneofs) + object.kind = "enumType"; + } + return object; + }; + + /** + * Converts this Type to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type + * @instance + * @returns {Object.} JSON object + */ + Type.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Type + * @function getTypeUrl + * @memberof google.bigtable.v2.Type + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Type.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type"; + }; + + Type.Bytes = (function() { + + /** + * Properties of a Bytes. + * @memberof google.bigtable.v2.Type + * @interface IBytes + * @property {google.bigtable.v2.Type.Bytes.IEncoding|null} [encoding] Bytes encoding + */ + + /** + * Constructs a new Bytes. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Bytes. + * @implements IBytes + * @constructor + * @param {google.bigtable.v2.Type.IBytes=} [properties] Properties to set + */ + function Bytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Bytes encoding. + * @member {google.bigtable.v2.Type.Bytes.IEncoding|null|undefined} encoding + * @memberof google.bigtable.v2.Type.Bytes + * @instance + */ + Bytes.prototype.encoding = null; + + /** + * Creates a new Bytes instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {google.bigtable.v2.Type.IBytes=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Bytes} Bytes instance + */ + Bytes.create = function create(properties) { + return new Bytes(properties); + }; + + /** + * Encodes the specified Bytes message. Does not implicitly {@link google.bigtable.v2.Type.Bytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {google.bigtable.v2.Type.IBytes} message Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.v2.Type.Bytes.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Bytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Bytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {google.bigtable.v2.Type.IBytes} message Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Bytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Bytes} Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Bytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Bytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Bytes} Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Bytes message. + * @function verify + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Bytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.v2.Type.Bytes.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a Bytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Bytes} Bytes + */ + Bytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Bytes: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Bytes(); + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.v2.Type.Bytes.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Bytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {google.bigtable.v2.Type.Bytes} message Bytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Bytes.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this Bytes to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Bytes + * @instance + * @returns {Object.} JSON object + */ + Bytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Bytes + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Bytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Bytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Bytes"; + }; + + Bytes.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.v2.Type.Bytes + * @interface IEncoding + * @property {google.bigtable.v2.Type.Bytes.Encoding.IRaw|null} [raw] Encoding raw + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.v2.Type.Bytes + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.v2.Type.Bytes.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding raw. + * @member {google.bigtable.v2.Type.Bytes.Encoding.IRaw|null|undefined} raw + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @instance + */ + Encoding.prototype.raw = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"raw"|undefined} encoding + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["raw"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.v2.Type.Bytes.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Bytes.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.Bytes.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.v2.Type.Bytes.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) + $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.encode(message.raw, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Bytes.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.v2.Type.Bytes.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Bytes.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Bytes.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Bytes.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.verify(message.raw, long + 1); + if (error) + return "raw." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Bytes.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Bytes.Encoding(); + if (object.raw != null) { + if (!$util.isObject(object.raw)) + throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding.raw: object expected"); + message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.fromObject(object.raw, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.v2.Type.Bytes.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) { + object.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options, q + 1); + if (options.oneofs) + object.encoding = "raw"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Bytes.Encoding"; + }; + + Encoding.Raw = (function() { + + /** + * Properties of a Raw. + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @interface IRaw + * @property {boolean|null} [escapeNulls] Raw escapeNulls + */ + + /** + * Constructs a new Raw. + * @memberof google.bigtable.v2.Type.Bytes.Encoding + * @classdesc Represents a Raw. + * @implements IRaw + * @constructor + * @param {google.bigtable.v2.Type.Bytes.Encoding.IRaw=} [properties] Properties to set + */ + function Raw(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Raw escapeNulls. + * @member {boolean} escapeNulls + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @instance + */ + Raw.prototype.escapeNulls = false; + + /** + * Creates a new Raw instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.v2.Type.Bytes.Encoding.IRaw=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Bytes.Encoding.Raw} Raw instance + */ + Raw.create = function create(properties) { + return new Raw(properties); + }; + + /** + * Encodes the specified Raw message. Does not implicitly {@link google.bigtable.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.v2.Type.Bytes.Encoding.IRaw} message Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Raw.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.escapeNulls != null && Object.hasOwnProperty.call(message, "escapeNulls")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.escapeNulls); + return writer; + }; + + /** + * Encodes the specified Raw message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.v2.Type.Bytes.Encoding.IRaw} message Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Raw.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Raw message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Bytes.Encoding.Raw} Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Raw.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Bytes.Encoding.Raw(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.escapeNulls = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Raw message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Bytes.Encoding.Raw} Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Raw.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Raw message. + * @function verify + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Raw.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.escapeNulls != null && Object.hasOwnProperty.call(message, "escapeNulls")) + if (typeof message.escapeNulls !== "boolean") + return "escapeNulls: boolean expected"; + return null; + }; + + /** + * Creates a Raw message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Bytes.Encoding.Raw} Raw + */ + Raw.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding.Raw) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding.Raw: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Bytes.Encoding.Raw(); + if (object.escapeNulls != null) + message.escapeNulls = Boolean(object.escapeNulls); + return message; + }; + + /** + * Creates a plain object from a Raw message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.v2.Type.Bytes.Encoding.Raw} message Raw + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Raw.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.escapeNulls = false; + if (message.escapeNulls != null && Object.hasOwnProperty.call(message, "escapeNulls")) + object.escapeNulls = message.escapeNulls; + return object; + }; + + /** + * Converts this Raw to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @instance + * @returns {Object.} JSON object + */ + Raw.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Raw + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Bytes.Encoding.Raw + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Raw.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Bytes.Encoding.Raw"; + }; + + return Raw; + })(); + + return Encoding; + })(); + + return Bytes; + })(); + + Type.String = (function() { + + /** + * Properties of a String. + * @memberof google.bigtable.v2.Type + * @interface IString + * @property {google.bigtable.v2.Type.String.IEncoding|null} [encoding] String encoding + */ + + /** + * Constructs a new String. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a String. + * @implements IString + * @constructor + * @param {google.bigtable.v2.Type.IString=} [properties] Properties to set + */ + function String(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * String encoding. + * @member {google.bigtable.v2.Type.String.IEncoding|null|undefined} encoding + * @memberof google.bigtable.v2.Type.String + * @instance + */ + String.prototype.encoding = null; + + /** + * Creates a new String instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.String + * @static + * @param {google.bigtable.v2.Type.IString=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.String} String instance + */ + String.create = function create(properties) { + return new String(properties); + }; + + /** + * Encodes the specified String message. Does not implicitly {@link google.bigtable.v2.Type.String.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.String + * @static + * @param {google.bigtable.v2.Type.IString} message String message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + String.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.v2.Type.String.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified String message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.String.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.String + * @static + * @param {google.bigtable.v2.Type.IString} message String message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + String.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a String message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.String + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.String} String + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + String.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.String(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.String.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a String message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.String + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.String} String + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + String.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a String message. + * @function verify + * @memberof google.bigtable.v2.Type.String + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + String.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.v2.Type.String.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a String message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.String + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.String} String + */ + String.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.String) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.String: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.String(); + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.v2.Type.String.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.String.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a String message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.String + * @static + * @param {google.bigtable.v2.Type.String} message String + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + String.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.String.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this String to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.String + * @instance + * @returns {Object.} JSON object + */ + String.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for String + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.String + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + String.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.String"; + }; + + String.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.v2.Type.String + * @interface IEncoding + * @property {google.bigtable.v2.Type.String.Encoding.IUtf8Raw|null} [utf8Raw] Encoding utf8Raw + * @property {google.bigtable.v2.Type.String.Encoding.IUtf8Bytes|null} [utf8Bytes] Encoding utf8Bytes + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.v2.Type.String + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.v2.Type.String.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding utf8Raw. + * @member {google.bigtable.v2.Type.String.Encoding.IUtf8Raw|null|undefined} utf8Raw + * @memberof google.bigtable.v2.Type.String.Encoding + * @instance + */ + Encoding.prototype.utf8Raw = null; + + /** + * Encoding utf8Bytes. + * @member {google.bigtable.v2.Type.String.Encoding.IUtf8Bytes|null|undefined} utf8Bytes + * @memberof google.bigtable.v2.Type.String.Encoding + * @instance + */ + Encoding.prototype.utf8Bytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"utf8Raw"|"utf8Bytes"|undefined} encoding + * @memberof google.bigtable.v2.Type.String.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["utf8Raw", "utf8Bytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {google.bigtable.v2.Type.String.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.String.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {google.bigtable.v2.Type.String.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) + $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.encode(message.utf8Raw, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) + $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.encode(message.utf8Bytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {google.bigtable.v2.Type.String.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.String.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.String.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.String.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw, long + 1); + if (error) + return "utf8Raw." + error; + } + } + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) { + if (properties.encoding === 1) + return "encoding: multiple values"; + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.verify(message.utf8Bytes, long + 1); + if (error) + return "utf8Bytes." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.String.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.String.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.String.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.String.Encoding(); + if (object.utf8Raw != null) { + if (!$util.isObject(object.utf8Raw)) + throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Raw: object expected"); + message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.fromObject(object.utf8Raw, long + 1); + } + if (object.utf8Bytes != null) { + if (!$util.isObject(object.utf8Bytes)) + throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Bytes: object expected"); + message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.fromObject(object.utf8Bytes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {google.bigtable.v2.Type.String.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) { + object.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options, q + 1); + if (options.oneofs) + object.encoding = "utf8Raw"; + } + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) { + object.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options, q + 1); + if (options.oneofs) + object.encoding = "utf8Bytes"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.String.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.String.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.String.Encoding"; + }; + + Encoding.Utf8Raw = (function() { + + /** + * Properties of an Utf8Raw. + * @memberof google.bigtable.v2.Type.String.Encoding + * @interface IUtf8Raw + */ + + /** + * Constructs a new Utf8Raw. + * @memberof google.bigtable.v2.Type.String.Encoding + * @classdesc Represents an Utf8Raw. + * @implements IUtf8Raw + * @constructor + * @param {google.bigtable.v2.Type.String.Encoding.IUtf8Raw=} [properties] Properties to set + */ + function Utf8Raw(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Utf8Raw instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {google.bigtable.v2.Type.String.Encoding.IUtf8Raw=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.String.Encoding.Utf8Raw} Utf8Raw instance + */ + Utf8Raw.create = function create(properties) { + return new Utf8Raw(properties); + }; + + /** + * Encodes the specified Utf8Raw message. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {google.bigtable.v2.Type.String.Encoding.IUtf8Raw} message Utf8Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Utf8Raw.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Utf8Raw message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {google.bigtable.v2.Type.String.Encoding.IUtf8Raw} message Utf8Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Utf8Raw.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Utf8Raw message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.String.Encoding.Utf8Raw} Utf8Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Utf8Raw.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Utf8Raw message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.String.Encoding.Utf8Raw} Utf8Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Utf8Raw.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Utf8Raw message. + * @function verify + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Utf8Raw.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an Utf8Raw message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.String.Encoding.Utf8Raw} Utf8Raw + */ + Utf8Raw.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw) + return object; + return new $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw(); + }; + + /** + * Creates a plain object from an Utf8Raw message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {google.bigtable.v2.Type.String.Encoding.Utf8Raw} message Utf8Raw + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Utf8Raw.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Utf8Raw to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @instance + * @returns {Object.} JSON object + */ + Utf8Raw.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Utf8Raw + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Raw + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Utf8Raw.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.String.Encoding.Utf8Raw"; + }; + + return Utf8Raw; + })(); + + Encoding.Utf8Bytes = (function() { + + /** + * Properties of an Utf8Bytes. + * @memberof google.bigtable.v2.Type.String.Encoding + * @interface IUtf8Bytes + * @property {string|null} [nullEscapeChar] Utf8Bytes nullEscapeChar + */ + + /** + * Constructs a new Utf8Bytes. + * @memberof google.bigtable.v2.Type.String.Encoding + * @classdesc Represents an Utf8Bytes. + * @implements IUtf8Bytes + * @constructor + * @param {google.bigtable.v2.Type.String.Encoding.IUtf8Bytes=} [properties] Properties to set + */ + function Utf8Bytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Utf8Bytes nullEscapeChar. + * @member {string} nullEscapeChar + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @instance + */ + Utf8Bytes.prototype.nullEscapeChar = ""; + + /** + * Creates a new Utf8Bytes instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {google.bigtable.v2.Type.String.Encoding.IUtf8Bytes=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.String.Encoding.Utf8Bytes} Utf8Bytes instance + */ + Utf8Bytes.create = function create(properties) { + return new Utf8Bytes(properties); + }; + + /** + * Encodes the specified Utf8Bytes message. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.Utf8Bytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {google.bigtable.v2.Type.String.Encoding.IUtf8Bytes} message Utf8Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Utf8Bytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.nullEscapeChar != null && Object.hasOwnProperty.call(message, "nullEscapeChar")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nullEscapeChar); + return writer; + }; + + /** + * Encodes the specified Utf8Bytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.String.Encoding.Utf8Bytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {google.bigtable.v2.Type.String.Encoding.IUtf8Bytes} message Utf8Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Utf8Bytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Utf8Bytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.String.Encoding.Utf8Bytes} Utf8Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Utf8Bytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.nullEscapeChar = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Utf8Bytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.String.Encoding.Utf8Bytes} Utf8Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Utf8Bytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Utf8Bytes message. + * @function verify + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Utf8Bytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.nullEscapeChar != null && Object.hasOwnProperty.call(message, "nullEscapeChar")) + if (!$util.isString(message.nullEscapeChar)) + return "nullEscapeChar: string expected"; + return null; + }; + + /** + * Creates an Utf8Bytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.String.Encoding.Utf8Bytes} Utf8Bytes + */ + Utf8Bytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.String.Encoding.Utf8Bytes: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes(); + if (object.nullEscapeChar != null) + message.nullEscapeChar = String(object.nullEscapeChar); + return message; + }; + + /** + * Creates a plain object from an Utf8Bytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {google.bigtable.v2.Type.String.Encoding.Utf8Bytes} message Utf8Bytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Utf8Bytes.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.nullEscapeChar = ""; + if (message.nullEscapeChar != null && Object.hasOwnProperty.call(message, "nullEscapeChar")) + object.nullEscapeChar = message.nullEscapeChar; + return object; + }; + + /** + * Converts this Utf8Bytes to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @instance + * @returns {Object.} JSON object + */ + Utf8Bytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Utf8Bytes + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.String.Encoding.Utf8Bytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Utf8Bytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.String.Encoding.Utf8Bytes"; + }; + + return Utf8Bytes; + })(); + + return Encoding; + })(); + + return String; + })(); + + Type.Int64 = (function() { + + /** + * Properties of an Int64. + * @memberof google.bigtable.v2.Type + * @interface IInt64 + * @property {google.bigtable.v2.Type.Int64.IEncoding|null} [encoding] Int64 encoding + */ + + /** + * Constructs a new Int64. + * @memberof google.bigtable.v2.Type + * @classdesc Represents an Int64. + * @implements IInt64 + * @constructor + * @param {google.bigtable.v2.Type.IInt64=} [properties] Properties to set + */ + function Int64(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64 encoding. + * @member {google.bigtable.v2.Type.Int64.IEncoding|null|undefined} encoding + * @memberof google.bigtable.v2.Type.Int64 + * @instance + */ + Int64.prototype.encoding = null; + + /** + * Creates a new Int64 instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {google.bigtable.v2.Type.IInt64=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Int64} Int64 instance + */ + Int64.create = function create(properties) { + return new Int64(properties); + }; + + /** + * Encodes the specified Int64 message. Does not implicitly {@link google.bigtable.v2.Type.Int64.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {google.bigtable.v2.Type.IInt64} message Int64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.v2.Type.Int64.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Int64 message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Int64.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {google.bigtable.v2.Type.IInt64} message Int64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Int64 message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Int64} Int64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Int64(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Int64 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Int64} Int64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64 message. + * @function verify + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.v2.Type.Int64.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates an Int64 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Int64} Int64 + */ + Int64.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Int64) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Int64: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Int64(); + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.v2.Type.Int64.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Int64 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {google.bigtable.v2.Type.Int64} message Int64 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this Int64 to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Int64 + * @instance + * @returns {Object.} JSON object + */ + Int64.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64 + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Int64 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Int64"; + }; + + Int64.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.v2.Type.Int64 + * @interface IEncoding + * @property {google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes|null} [bigEndianBytes] Encoding bigEndianBytes + * @property {google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes|null} [orderedCodeBytes] Encoding orderedCodeBytes + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.v2.Type.Int64 + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.v2.Type.Int64.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding bigEndianBytes. + * @member {google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes|null|undefined} bigEndianBytes + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @instance + */ + Encoding.prototype.bigEndianBytes = null; + + /** + * Encoding orderedCodeBytes. + * @member {google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes|null|undefined} orderedCodeBytes + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @instance + */ + Encoding.prototype.orderedCodeBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"bigEndianBytes"|"orderedCodeBytes"|undefined} encoding + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["bigEndianBytes", "orderedCodeBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.v2.Type.Int64.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Int64.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.v2.Type.Int64.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) + $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.encode(message.bigEndianBytes, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) + $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.v2.Type.Int64.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Int64.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Int64.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.orderedCodeBytes = $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Int64.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes, long + 1); + if (error) + return "bigEndianBytes." + error; + } + } + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + if (properties.encoding === 1) + return "encoding: multiple values"; + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.verify(message.orderedCodeBytes, long + 1); + if (error) + return "orderedCodeBytes." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Int64.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Int64.Encoding(); + if (object.bigEndianBytes != null) { + if (!$util.isObject(object.bigEndianBytes)) + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.bigEndianBytes: object expected"); + message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.fromObject(object.bigEndianBytes, long + 1); + } + if (object.orderedCodeBytes != null) { + if (!$util.isObject(object.orderedCodeBytes)) + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.orderedCodeBytes: object expected"); + message.orderedCodeBytes = $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.fromObject(object.orderedCodeBytes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) { + object.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options, q + 1); + if (options.oneofs) + object.encoding = "bigEndianBytes"; + } + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + object.orderedCodeBytes = $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options, q + 1); + if (options.oneofs) + object.encoding = "orderedCodeBytes"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Int64.Encoding"; + }; + + Encoding.BigEndianBytes = (function() { + + /** + * Properties of a BigEndianBytes. + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @interface IBigEndianBytes + * @property {google.bigtable.v2.Type.IBytes|null} [bytesType] BigEndianBytes bytesType + */ + + /** + * Constructs a new BigEndianBytes. + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @classdesc Represents a BigEndianBytes. + * @implements IBigEndianBytes + * @constructor + * @param {google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes=} [properties] Properties to set + */ + function BigEndianBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigEndianBytes bytesType. + * @member {google.bigtable.v2.Type.IBytes|null|undefined} bytesType + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @instance + */ + BigEndianBytes.prototype.bytesType = null; + + /** + * Creates a new BigEndianBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes instance + */ + BigEndianBytes.create = function create(properties) { + return new BigEndianBytes(properties); + }; + + /** + * Encodes the specified BigEndianBytes message. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes} message BigEndianBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigEndianBytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + $root.google.bigtable.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigEndianBytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding.IBigEndianBytes} message BigEndianBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigEndianBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigEndianBytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.v2.Type.Bytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigEndianBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigEndianBytes message. + * @function verify + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigEndianBytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { + var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType, long + 1); + if (error) + return "bytesType." + error; + } + return null; + }; + + /** + * Creates a BigEndianBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + */ + BigEndianBytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes(); + if (object.bytesType != null) { + if (!$util.isObject(object.bytesType)) + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytesType: object expected"); + message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a BigEndianBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} message BigEndianBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigEndianBytes.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.bytesType = null; + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options, q + 1); + return object; + }; + + /** + * Converts this BigEndianBytes to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @instance + * @returns {Object.} JSON object + */ + BigEndianBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigEndianBytes + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigEndianBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes"; + }; + + return BigEndianBytes; + })(); + + Encoding.OrderedCodeBytes = (function() { + + /** + * Properties of an OrderedCodeBytes. + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @interface IOrderedCodeBytes + */ + + /** + * Constructs a new OrderedCodeBytes. + * @memberof google.bigtable.v2.Type.Int64.Encoding + * @classdesc Represents an OrderedCodeBytes. + * @implements IOrderedCodeBytes + * @constructor + * @param {google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes=} [properties] Properties to set + */ + function OrderedCodeBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new OrderedCodeBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes} OrderedCodeBytes instance + */ + OrderedCodeBytes.create = function create(properties) { + return new OrderedCodeBytes(properties); + }; + + /** + * Encodes the specified OrderedCodeBytes message. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes} message OrderedCodeBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderedCodeBytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified OrderedCodeBytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding.IOrderedCodeBytes} message OrderedCodeBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderedCodeBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes} OrderedCodeBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderedCodeBytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes} OrderedCodeBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderedCodeBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderedCodeBytes message. + * @function verify + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderedCodeBytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an OrderedCodeBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes} OrderedCodeBytes + */ + OrderedCodeBytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) + return object; + return new $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes(); + }; + + /** + * Creates a plain object from an OrderedCodeBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes} message OrderedCodeBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderedCodeBytes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OrderedCodeBytes to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @instance + * @returns {Object.} JSON object + */ + OrderedCodeBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderedCodeBytes + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderedCodeBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes"; + }; + + return OrderedCodeBytes; + })(); + + return Encoding; + })(); + + return Int64; + })(); + + Type.Bool = (function() { + + /** + * Properties of a Bool. + * @memberof google.bigtable.v2.Type + * @interface IBool + */ + + /** + * Constructs a new Bool. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Bool. + * @implements IBool + * @constructor + * @param {google.bigtable.v2.Type.IBool=} [properties] Properties to set + */ + function Bool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Bool instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {google.bigtable.v2.Type.IBool=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Bool} Bool instance + */ + Bool.create = function create(properties) { + return new Bool(properties); + }; + + /** + * Encodes the specified Bool message. Does not implicitly {@link google.bigtable.v2.Type.Bool.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {google.bigtable.v2.Type.IBool} message Bool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bool.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Bool message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Bool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {google.bigtable.v2.Type.IBool} message Bool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Bool message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Bool} Bool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bool.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Bool(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Bool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Bool} Bool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Bool message. + * @function verify + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Bool.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Bool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Bool} Bool + */ + Bool.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Bool) + return object; + return new $root.google.bigtable.v2.Type.Bool(); + }; + + /** + * Creates a plain object from a Bool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {google.bigtable.v2.Type.Bool} message Bool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Bool.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Bool to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Bool + * @instance + * @returns {Object.} JSON object + */ + Bool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Bool + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Bool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Bool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Bool"; + }; + + return Bool; + })(); + + Type.Float32 = (function() { + + /** + * Properties of a Float32. + * @memberof google.bigtable.v2.Type + * @interface IFloat32 + */ + + /** + * Constructs a new Float32. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Float32. + * @implements IFloat32 + * @constructor + * @param {google.bigtable.v2.Type.IFloat32=} [properties] Properties to set + */ + function Float32(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Float32 instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {google.bigtable.v2.Type.IFloat32=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Float32} Float32 instance + */ + Float32.create = function create(properties) { + return new Float32(properties); + }; + + /** + * Encodes the specified Float32 message. Does not implicitly {@link google.bigtable.v2.Type.Float32.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {google.bigtable.v2.Type.IFloat32} message Float32 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Float32.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Float32 message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Float32.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {google.bigtable.v2.Type.IFloat32} message Float32 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Float32.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Float32 message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Float32} Float32 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Float32.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Float32(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Float32 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Float32} Float32 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Float32.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Float32 message. + * @function verify + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Float32.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Float32 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Float32} Float32 + */ + Float32.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Float32) + return object; + return new $root.google.bigtable.v2.Type.Float32(); + }; + + /** + * Creates a plain object from a Float32 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {google.bigtable.v2.Type.Float32} message Float32 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Float32.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Float32 to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Float32 + * @instance + * @returns {Object.} JSON object + */ + Float32.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Float32 + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Float32 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Float32.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Float32"; + }; + + return Float32; + })(); + + Type.Float64 = (function() { + + /** + * Properties of a Float64. + * @memberof google.bigtable.v2.Type + * @interface IFloat64 + */ + + /** + * Constructs a new Float64. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Float64. + * @implements IFloat64 + * @constructor + * @param {google.bigtable.v2.Type.IFloat64=} [properties] Properties to set + */ + function Float64(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Float64 instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {google.bigtable.v2.Type.IFloat64=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Float64} Float64 instance + */ + Float64.create = function create(properties) { + return new Float64(properties); + }; + + /** + * Encodes the specified Float64 message. Does not implicitly {@link google.bigtable.v2.Type.Float64.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {google.bigtable.v2.Type.IFloat64} message Float64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Float64.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Float64 message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Float64.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {google.bigtable.v2.Type.IFloat64} message Float64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Float64.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Float64 message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Float64} Float64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Float64.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Float64(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Float64 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Float64} Float64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Float64.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Float64 message. + * @function verify + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Float64.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Float64 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Float64} Float64 + */ + Float64.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Float64) + return object; + return new $root.google.bigtable.v2.Type.Float64(); + }; + + /** + * Creates a plain object from a Float64 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {google.bigtable.v2.Type.Float64} message Float64 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Float64.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Float64 to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Float64 + * @instance + * @returns {Object.} JSON object + */ + Float64.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Float64 + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Float64 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Float64.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Float64"; + }; + + return Float64; + })(); + + Type.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.bigtable.v2.Type + * @interface ITimestamp + * @property {google.bigtable.v2.Type.Timestamp.IEncoding|null} [encoding] Timestamp encoding + */ + + /** + * Constructs a new Timestamp. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.bigtable.v2.Type.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp encoding. + * @member {google.bigtable.v2.Type.Timestamp.IEncoding|null|undefined} encoding + * @memberof google.bigtable.v2.Type.Timestamp + * @instance + */ + Timestamp.prototype.encoding = null; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {google.bigtable.v2.Type.ITimestamp=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {google.bigtable.v2.Type.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.v2.Type.Timestamp.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {google.bigtable.v2.Type.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.v2.Type.Timestamp.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.v2.Type.Timestamp.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Timestamp) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Timestamp: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Timestamp(); + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.v2.Type.Timestamp.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.Timestamp.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {google.bigtable.v2.Type.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.Timestamp.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Timestamp"; + }; + + Timestamp.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.v2.Type.Timestamp + * @interface IEncoding + * @property {google.bigtable.v2.Type.Int64.IEncoding|null} [unixMicrosInt64] Encoding unixMicrosInt64 + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.v2.Type.Timestamp + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.v2.Type.Timestamp.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding unixMicrosInt64. + * @member {google.bigtable.v2.Type.Int64.IEncoding|null|undefined} unixMicrosInt64 + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @instance + */ + Encoding.prototype.unixMicrosInt64 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"unixMicrosInt64"|undefined} encoding + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["unixMicrosInt64"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {google.bigtable.v2.Type.Timestamp.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Timestamp.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {google.bigtable.v2.Type.Timestamp.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) + $root.google.bigtable.v2.Type.Int64.Encoding.encode(message.unixMicrosInt64, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Timestamp.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {google.bigtable.v2.Type.Timestamp.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Timestamp.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Timestamp.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.unixMicrosInt64 = $root.google.bigtable.v2.Type.Int64.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Timestamp.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Int64.Encoding.verify(message.unixMicrosInt64, long + 1); + if (error) + return "unixMicrosInt64." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Timestamp.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Timestamp.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Timestamp.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Timestamp.Encoding(); + if (object.unixMicrosInt64 != null) { + if (!$util.isObject(object.unixMicrosInt64)) + throw TypeError(".google.bigtable.v2.Type.Timestamp.Encoding.unixMicrosInt64: object expected"); + message.unixMicrosInt64 = $root.google.bigtable.v2.Type.Int64.Encoding.fromObject(object.unixMicrosInt64, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {google.bigtable.v2.Type.Timestamp.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) { + object.unixMicrosInt64 = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.unixMicrosInt64, options, q + 1); + if (options.oneofs) + object.encoding = "unixMicrosInt64"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Timestamp.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Timestamp.Encoding"; + }; + + return Encoding; + })(); + + return Timestamp; + })(); + + Type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.bigtable.v2.Type + * @interface IDate + */ + + /** + * Constructs a new Date. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.bigtable.v2.Type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {google.bigtable.v2.Type.IDate=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.bigtable.v2.Type.Date.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {google.bigtable.v2.Type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {google.bigtable.v2.Type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Date} Date + */ + Date.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Date) + return object; + return new $root.google.bigtable.v2.Type.Date(); + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {google.bigtable.v2.Type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Date"; + }; + + return Date; + })(); + + Type.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.bigtable.v2.Type + * @interface IStruct + * @property {Array.|null} [fields] Struct fields + * @property {google.bigtable.v2.Type.Struct.IEncoding|null} [encoding] Struct encoding + */ + + /** + * Constructs a new Struct. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.bigtable.v2.Type.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Array.} fields + * @memberof google.bigtable.v2.Type.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyArray; + + /** + * Struct encoding. + * @member {google.bigtable.v2.Type.Struct.IEncoding|null|undefined} encoding + * @memberof google.bigtable.v2.Type.Struct + * @instance + */ + Struct.prototype.encoding = null; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {google.bigtable.v2.Type.IStruct=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.bigtable.v2.Type.Struct.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {google.bigtable.v2.Type.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.bigtable.v2.Type.Struct.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.v2.Type.Struct.Encoding.encode(message.encoding, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {google.bigtable.v2.Type.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Struct(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.bigtable.v2.Type.Struct.Field.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.encoding = $root.google.bigtable.v2.Type.Struct.Encoding.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.bigtable.v2.Type.Struct.Field.verify(message.fields[i], long + 1); + if (error) + return "fields." + error; + } + } + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { + var error = $root.google.bigtable.v2.Type.Struct.Encoding.verify(message.encoding, long + 1); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Struct} Struct + */ + Struct.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Struct) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Struct: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Struct(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.bigtable.v2.Type.Struct.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (!$util.isObject(object.fields[i])) + throw TypeError(".google.bigtable.v2.Type.Struct.fields: object expected"); + message.fields[i] = $root.google.bigtable.v2.Type.Struct.Field.fromObject(object.fields[i], long + 1); + } + } + if (object.encoding != null) { + if (!$util.isObject(object.encoding)) + throw TypeError(".google.bigtable.v2.Type.Struct.encoding: object expected"); + message.encoding = $root.google.bigtable.v2.Type.Struct.Encoding.fromObject(object.encoding, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {google.bigtable.v2.Type.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) + object.encoding = null; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.bigtable.v2.Type.Struct.Field.toObject(message.fields[j], options, q + 1); + } + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.Struct.Encoding.toObject(message.encoding, options, q + 1); + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Struct"; + }; + + Struct.Field = (function() { + + /** + * Properties of a Field. + * @memberof google.bigtable.v2.Type.Struct + * @interface IField + * @property {string|null} [fieldName] Field fieldName + * @property {google.bigtable.v2.IType|null} [type] Field type + */ + + /** + * Constructs a new Field. + * @memberof google.bigtable.v2.Type.Struct + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.bigtable.v2.Type.Struct.IField=} [properties] Properties to set + */ + function Field(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Field fieldName. + * @member {string} fieldName + * @memberof google.bigtable.v2.Type.Struct.Field + * @instance + */ + Field.prototype.fieldName = ""; + + /** + * Field type. + * @member {google.bigtable.v2.IType|null|undefined} type + * @memberof google.bigtable.v2.Type.Struct.Field + * @instance + */ + Field.prototype.type = null; + + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {google.bigtable.v2.Type.Struct.IField=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Struct.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Field.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {google.bigtable.v2.Type.Struct.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {google.bigtable.v2.Type.Struct.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Struct.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Struct.Field(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.type = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Struct.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Field message. + * @function verify + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) { + var error = $root.google.bigtable.v2.Type.verify(message.type, long + 1); + if (error) + return "type." + error; + } + return null; + }; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Struct.Field} Field + */ + Field.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Struct.Field) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Struct.Field: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Struct.Field(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.type != null) { + if (!$util.isObject(object.type)) + throw TypeError(".google.bigtable.v2.Type.Struct.Field.type: object expected"); + message.type = $root.google.bigtable.v2.Type.fromObject(object.type, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {google.bigtable.v2.Type.Struct.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.type = null; + } + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + object.fieldName = message.fieldName; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options, q + 1); + return object; + }; + + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Struct.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Struct.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Struct.Field"; + }; + + return Field; + })(); + + Struct.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.v2.Type.Struct + * @interface IEncoding + * @property {google.bigtable.v2.Type.Struct.Encoding.ISingleton|null} [singleton] Encoding singleton + * @property {google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes|null} [delimitedBytes] Encoding delimitedBytes + * @property {google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes|null} [orderedCodeBytes] Encoding orderedCodeBytes + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.v2.Type.Struct + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.v2.Type.Struct.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding singleton. + * @member {google.bigtable.v2.Type.Struct.Encoding.ISingleton|null|undefined} singleton + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @instance + */ + Encoding.prototype.singleton = null; + + /** + * Encoding delimitedBytes. + * @member {google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes|null|undefined} delimitedBytes + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @instance + */ + Encoding.prototype.delimitedBytes = null; + + /** + * Encoding orderedCodeBytes. + * @member {google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes|null|undefined} orderedCodeBytes + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @instance + */ + Encoding.prototype.orderedCodeBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"singleton"|"delimitedBytes"|"orderedCodeBytes"|undefined} encoding + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["singleton", "delimitedBytes", "orderedCodeBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {google.bigtable.v2.Type.Struct.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Struct.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {google.bigtable.v2.Type.Struct.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) + $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.encode(message.singleton, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) + $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.encode(message.delimitedBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) + $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {google.bigtable.v2.Type.Struct.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Struct.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Struct.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.singleton = $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.delimitedBytes = $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.orderedCodeBytes = $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Struct.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.verify(message.singleton, long + 1); + if (error) + return "singleton." + error; + } + } + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) { + if (properties.encoding === 1) + return "encoding: multiple values"; + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.verify(message.delimitedBytes, long + 1); + if (error) + return "delimitedBytes." + error; + } + } + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + if (properties.encoding === 1) + return "encoding: multiple values"; + properties.encoding = 1; + { + var error = $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.verify(message.orderedCodeBytes, long + 1); + if (error) + return "orderedCodeBytes." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Struct.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Struct.Encoding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Struct.Encoding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Struct.Encoding(); + if (object.singleton != null) { + if (!$util.isObject(object.singleton)) + throw TypeError(".google.bigtable.v2.Type.Struct.Encoding.singleton: object expected"); + message.singleton = $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.fromObject(object.singleton, long + 1); + } + if (object.delimitedBytes != null) { + if (!$util.isObject(object.delimitedBytes)) + throw TypeError(".google.bigtable.v2.Type.Struct.Encoding.delimitedBytes: object expected"); + message.delimitedBytes = $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.fromObject(object.delimitedBytes, long + 1); + } + if (object.orderedCodeBytes != null) { + if (!$util.isObject(object.orderedCodeBytes)) + throw TypeError(".google.bigtable.v2.Type.Struct.Encoding.orderedCodeBytes: object expected"); + message.orderedCodeBytes = $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.fromObject(object.orderedCodeBytes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) { + object.singleton = $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.toObject(message.singleton, options, q + 1); + if (options.oneofs) + object.encoding = "singleton"; + } + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) { + object.delimitedBytes = $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.toObject(message.delimitedBytes, options, q + 1); + if (options.oneofs) + object.encoding = "delimitedBytes"; + } + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + object.orderedCodeBytes = $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options, q + 1); + if (options.oneofs) + object.encoding = "orderedCodeBytes"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Struct.Encoding"; + }; + + Encoding.Singleton = (function() { + + /** + * Properties of a Singleton. + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @interface ISingleton + */ + + /** + * Constructs a new Singleton. + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @classdesc Represents a Singleton. + * @implements ISingleton + * @constructor + * @param {google.bigtable.v2.Type.Struct.Encoding.ISingleton=} [properties] Properties to set + */ + function Singleton(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Singleton instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.ISingleton=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Struct.Encoding.Singleton} Singleton instance + */ + Singleton.create = function create(properties) { + return new Singleton(properties); + }; + + /** + * Encodes the specified Singleton message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.Singleton.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.ISingleton} message Singleton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Singleton.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Singleton message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.Singleton.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.ISingleton} message Singleton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Singleton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Singleton message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Struct.Encoding.Singleton} Singleton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Singleton.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Struct.Encoding.Singleton(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Singleton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Struct.Encoding.Singleton} Singleton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Singleton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Singleton message. + * @function verify + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Singleton.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Singleton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Struct.Encoding.Singleton} Singleton + */ + Singleton.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Struct.Encoding.Singleton) + return object; + return new $root.google.bigtable.v2.Type.Struct.Encoding.Singleton(); + }; + + /** + * Creates a plain object from a Singleton message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.Singleton} message Singleton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Singleton.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Singleton to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @instance + * @returns {Object.} JSON object + */ + Singleton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Singleton + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Struct.Encoding.Singleton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Singleton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Struct.Encoding.Singleton"; + }; + + return Singleton; + })(); + + Encoding.DelimitedBytes = (function() { + + /** + * Properties of a DelimitedBytes. + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @interface IDelimitedBytes + * @property {Uint8Array|null} [delimiter] DelimitedBytes delimiter + */ + + /** + * Constructs a new DelimitedBytes. + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @classdesc Represents a DelimitedBytes. + * @implements IDelimitedBytes + * @constructor + * @param {google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes=} [properties] Properties to set + */ + function DelimitedBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelimitedBytes delimiter. + * @member {Uint8Array} delimiter + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @instance + */ + DelimitedBytes.prototype.delimiter = $util.newBuffer([]); + + /** + * Creates a new DelimitedBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes} DelimitedBytes instance + */ + DelimitedBytes.create = function create(properties) { + return new DelimitedBytes(properties); + }; + + /** + * Encodes the specified DelimitedBytes message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes} message DelimitedBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelimitedBytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delimiter); + return writer; + }; + + /** + * Encodes the specified DelimitedBytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.IDelimitedBytes} message DelimitedBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelimitedBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DelimitedBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes} DelimitedBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelimitedBytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.delimiter = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DelimitedBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes} DelimitedBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelimitedBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelimitedBytes message. + * @function verify + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelimitedBytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + if (!(message.delimiter && typeof message.delimiter.length === "number" || $util.isString(message.delimiter))) + return "delimiter: buffer expected"; + return null; + }; + + /** + * Creates a DelimitedBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes} DelimitedBytes + */ + DelimitedBytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes(); + if (object.delimiter != null) + if (typeof object.delimiter === "string") + $util.base64.decode(object.delimiter, message.delimiter = $util.newBuffer($util.base64.length(object.delimiter)), 0); + else if (object.delimiter.length >= 0) + message.delimiter = object.delimiter; + return message; + }; + + /** + * Creates a plain object from a DelimitedBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes} message DelimitedBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelimitedBytes.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.delimiter = ""; + else { + object.delimiter = []; + if (options.bytes !== Array) + object.delimiter = $util.newBuffer(object.delimiter); + } + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + object.delimiter = options.bytes === String ? $util.base64.encode(message.delimiter, 0, message.delimiter.length) : options.bytes === Array ? Array.prototype.slice.call(message.delimiter) : message.delimiter; + return object; + }; + + /** + * Converts this DelimitedBytes to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @instance + * @returns {Object.} JSON object + */ + DelimitedBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DelimitedBytes + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DelimitedBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes"; + }; + + return DelimitedBytes; + })(); + + Encoding.OrderedCodeBytes = (function() { + + /** + * Properties of an OrderedCodeBytes. + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @interface IOrderedCodeBytes + */ + + /** + * Constructs a new OrderedCodeBytes. + * @memberof google.bigtable.v2.Type.Struct.Encoding + * @classdesc Represents an OrderedCodeBytes. + * @implements IOrderedCodeBytes + * @constructor + * @param {google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes=} [properties] Properties to set + */ + function OrderedCodeBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new OrderedCodeBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes} OrderedCodeBytes instance + */ + OrderedCodeBytes.create = function create(properties) { + return new OrderedCodeBytes(properties); + }; + + /** + * Encodes the specified OrderedCodeBytes message. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes} message OrderedCodeBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderedCodeBytes.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified OrderedCodeBytes message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.IOrderedCodeBytes} message OrderedCodeBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderedCodeBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes} OrderedCodeBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderedCodeBytes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OrderedCodeBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes} OrderedCodeBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderedCodeBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderedCodeBytes message. + * @function verify + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderedCodeBytes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an OrderedCodeBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes} OrderedCodeBytes + */ + OrderedCodeBytes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) + return object; + return new $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes(); + }; + + /** + * Creates a plain object from an OrderedCodeBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes} message OrderedCodeBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderedCodeBytes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OrderedCodeBytes to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @instance + * @returns {Object.} JSON object + */ + OrderedCodeBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderedCodeBytes + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderedCodeBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes"; + }; + + return OrderedCodeBytes; + })(); + + return Encoding; + })(); + + return Struct; + })(); + + Type.Proto = (function() { + + /** + * Properties of a Proto. + * @memberof google.bigtable.v2.Type + * @interface IProto + * @property {string|null} [schemaBundleId] Proto schemaBundleId + * @property {string|null} [messageName] Proto messageName + */ + + /** + * Constructs a new Proto. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Proto. + * @implements IProto + * @constructor + * @param {google.bigtable.v2.Type.IProto=} [properties] Properties to set + */ + function Proto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proto schemaBundleId. + * @member {string} schemaBundleId + * @memberof google.bigtable.v2.Type.Proto + * @instance + */ + Proto.prototype.schemaBundleId = ""; + + /** + * Proto messageName. + * @member {string} messageName + * @memberof google.bigtable.v2.Type.Proto + * @instance + */ + Proto.prototype.messageName = ""; + + /** + * Creates a new Proto instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {google.bigtable.v2.Type.IProto=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Proto} Proto instance + */ + Proto.create = function create(properties) { + return new Proto(properties); + }; + + /** + * Encodes the specified Proto message. Does not implicitly {@link google.bigtable.v2.Type.Proto.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {google.bigtable.v2.Type.IProto} message Proto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaBundleId); + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.messageName); + return writer; + }; + + /** + * Encodes the specified Proto message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Proto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {google.bigtable.v2.Type.IProto} message Proto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Proto message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Proto} Proto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Proto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schemaBundleId = reader.string(); + break; + } + case 2: { + message.messageName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Proto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Proto} Proto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proto message. + * @function verify + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + if (!$util.isString(message.schemaBundleId)) + return "schemaBundleId: string expected"; + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) + if (!$util.isString(message.messageName)) + return "messageName: string expected"; + return null; + }; + + /** + * Creates a Proto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Proto} Proto + */ + Proto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Proto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Proto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Proto(); + if (object.schemaBundleId != null) + message.schemaBundleId = String(object.schemaBundleId); + if (object.messageName != null) + message.messageName = String(object.messageName); + return message; + }; + + /** + * Creates a plain object from a Proto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {google.bigtable.v2.Type.Proto} message Proto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.schemaBundleId = ""; + object.messageName = ""; + } + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + object.schemaBundleId = message.schemaBundleId; + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) + object.messageName = message.messageName; + return object; + }; + + /** + * Converts this Proto to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Proto + * @instance + * @returns {Object.} JSON object + */ + Proto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Proto + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Proto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Proto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Proto"; + }; + + return Proto; + })(); + + Type.Enum = (function() { + + /** + * Properties of an Enum. + * @memberof google.bigtable.v2.Type + * @interface IEnum + * @property {string|null} [schemaBundleId] Enum schemaBundleId + * @property {string|null} [enumName] Enum enumName + */ + + /** + * Constructs a new Enum. + * @memberof google.bigtable.v2.Type + * @classdesc Represents an Enum. + * @implements IEnum + * @constructor + * @param {google.bigtable.v2.Type.IEnum=} [properties] Properties to set + */ + function Enum(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Enum schemaBundleId. + * @member {string} schemaBundleId + * @memberof google.bigtable.v2.Type.Enum + * @instance + */ + Enum.prototype.schemaBundleId = ""; + + /** + * Enum enumName. + * @member {string} enumName + * @memberof google.bigtable.v2.Type.Enum + * @instance + */ + Enum.prototype.enumName = ""; + + /** + * Creates a new Enum instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {google.bigtable.v2.Type.IEnum=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Enum} Enum instance + */ + Enum.create = function create(properties) { + return new Enum(properties); + }; + + /** + * Encodes the specified Enum message. Does not implicitly {@link google.bigtable.v2.Type.Enum.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {google.bigtable.v2.Type.IEnum} message Enum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Enum.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaBundleId); + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.enumName); + return writer; + }; + + /** + * Encodes the specified Enum message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Enum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {google.bigtable.v2.Type.IEnum} message Enum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Enum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Enum message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Enum} Enum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Enum.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Enum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schemaBundleId = reader.string(); + break; + } + case 2: { + message.enumName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Enum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Enum} Enum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Enum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Enum message. + * @function verify + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Enum.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + if (!$util.isString(message.schemaBundleId)) + return "schemaBundleId: string expected"; + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) + if (!$util.isString(message.enumName)) + return "enumName: string expected"; + return null; + }; + + /** + * Creates an Enum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Enum} Enum + */ + Enum.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Enum) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Enum: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Enum(); + if (object.schemaBundleId != null) + message.schemaBundleId = String(object.schemaBundleId); + if (object.enumName != null) + message.enumName = String(object.enumName); + return message; + }; + + /** + * Creates a plain object from an Enum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {google.bigtable.v2.Type.Enum} message Enum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Enum.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.schemaBundleId = ""; + object.enumName = ""; + } + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) + object.schemaBundleId = message.schemaBundleId; + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) + object.enumName = message.enumName; + return object; + }; + + /** + * Converts this Enum to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Enum + * @instance + * @returns {Object.} JSON object + */ + Enum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Enum + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Enum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Enum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Enum"; + }; + + return Enum; + })(); + + Type.Array = (function() { + + /** + * Properties of an Array. + * @memberof google.bigtable.v2.Type + * @interface IArray + * @property {google.bigtable.v2.IType|null} [elementType] Array elementType + */ + + /** + * Constructs a new Array. + * @memberof google.bigtable.v2.Type + * @classdesc Represents an Array. + * @implements IArray + * @constructor + * @param {google.bigtable.v2.Type.IArray=} [properties] Properties to set + */ + function Array(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Array elementType. + * @member {google.bigtable.v2.IType|null|undefined} elementType + * @memberof google.bigtable.v2.Type.Array + * @instance + */ + Array.prototype.elementType = null; + + /** + * Creates a new Array instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {google.bigtable.v2.Type.IArray=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Array} Array instance + */ + Array.create = function create(properties) { + return new Array(properties); + }; + + /** + * Encodes the specified Array message. Does not implicitly {@link google.bigtable.v2.Type.Array.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {google.bigtable.v2.Type.IArray} message Array message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Array.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) + $root.google.bigtable.v2.Type.encode(message.elementType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Array message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Array.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {google.bigtable.v2.Type.IArray} message Array message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Array.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Array message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Array} Array + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Array.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Array(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.elementType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Array message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Array} Array + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Array.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Array message. + * @function verify + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Array.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) { + var error = $root.google.bigtable.v2.Type.verify(message.elementType, long + 1); + if (error) + return "elementType." + error; + } + return null; + }; + + /** + * Creates an Array message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Array} Array + */ + Array.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Array) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Array: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Array(); + if (object.elementType != null) { + if (!$util.isObject(object.elementType)) + throw TypeError(".google.bigtable.v2.Type.Array.elementType: object expected"); + message.elementType = $root.google.bigtable.v2.Type.fromObject(object.elementType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Array message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {google.bigtable.v2.Type.Array} message Array + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Array.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.elementType = null; + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) + object.elementType = $root.google.bigtable.v2.Type.toObject(message.elementType, options, q + 1); + return object; + }; + + /** + * Converts this Array to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Array + * @instance + * @returns {Object.} JSON object + */ + Array.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Array + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Array + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Array.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Array"; + }; + + return Array; + })(); + + Type.Map = (function() { + + /** + * Properties of a Map. + * @memberof google.bigtable.v2.Type + * @interface IMap + * @property {google.bigtable.v2.IType|null} [keyType] Map keyType + * @property {google.bigtable.v2.IType|null} [valueType] Map valueType + */ + + /** + * Constructs a new Map. + * @memberof google.bigtable.v2.Type + * @classdesc Represents a Map. + * @implements IMap + * @constructor + * @param {google.bigtable.v2.Type.IMap=} [properties] Properties to set + */ + function Map(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Map keyType. + * @member {google.bigtable.v2.IType|null|undefined} keyType + * @memberof google.bigtable.v2.Type.Map + * @instance + */ + Map.prototype.keyType = null; + + /** + * Map valueType. + * @member {google.bigtable.v2.IType|null|undefined} valueType + * @memberof google.bigtable.v2.Type.Map + * @instance + */ + Map.prototype.valueType = null; + + /** + * Creates a new Map instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {google.bigtable.v2.Type.IMap=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Map} Map instance + */ + Map.create = function create(properties) { + return new Map(properties); + }; + + /** + * Encodes the specified Map message. Does not implicitly {@link google.bigtable.v2.Type.Map.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {google.bigtable.v2.Type.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) + $root.google.bigtable.v2.Type.encode(message.keyType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + $root.google.bigtable.v2.Type.encode(message.valueType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Map.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {google.bigtable.v2.Type.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Map message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Map(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.keyType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.valueType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Map message. + * @function verify + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Map.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) { + var error = $root.google.bigtable.v2.Type.verify(message.keyType, long + 1); + if (error) + return "keyType." + error; + } + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) { + var error = $root.google.bigtable.v2.Type.verify(message.valueType, long + 1); + if (error) + return "valueType." + error; + } + return null; + }; + + /** + * Creates a Map message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Map} Map + */ + Map.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Map) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Map: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Map(); + if (object.keyType != null) { + if (!$util.isObject(object.keyType)) + throw TypeError(".google.bigtable.v2.Type.Map.keyType: object expected"); + message.keyType = $root.google.bigtable.v2.Type.fromObject(object.keyType, long + 1); + } + if (object.valueType != null) { + if (!$util.isObject(object.valueType)) + throw TypeError(".google.bigtable.v2.Type.Map.valueType: object expected"); + message.valueType = $root.google.bigtable.v2.Type.fromObject(object.valueType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {google.bigtable.v2.Type.Map} message Map + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Map.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.keyType = null; + object.valueType = null; + } + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) + object.keyType = $root.google.bigtable.v2.Type.toObject(message.keyType, options, q + 1); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + object.valueType = $root.google.bigtable.v2.Type.toObject(message.valueType, options, q + 1); + return object; + }; + + /** + * Converts this Map to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Map + * @instance + * @returns {Object.} JSON object + */ + Map.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Map + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Map + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Map"; + }; + + return Map; + })(); + + Type.Aggregate = (function() { + + /** + * Properties of an Aggregate. + * @memberof google.bigtable.v2.Type + * @interface IAggregate + * @property {google.bigtable.v2.IType|null} [inputType] Aggregate inputType + * @property {google.bigtable.v2.IType|null} [stateType] Aggregate stateType + * @property {google.bigtable.v2.Type.Aggregate.ISum|null} [sum] Aggregate sum + * @property {google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null} [hllppUniqueCount] Aggregate hllppUniqueCount + * @property {google.bigtable.v2.Type.Aggregate.IMax|null} [max] Aggregate max + * @property {google.bigtable.v2.Type.Aggregate.IMin|null} [min] Aggregate min + */ + + /** + * Constructs a new Aggregate. + * @memberof google.bigtable.v2.Type + * @classdesc Represents an Aggregate. + * @implements IAggregate + * @constructor + * @param {google.bigtable.v2.Type.IAggregate=} [properties] Properties to set + */ + function Aggregate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Aggregate inputType. + * @member {google.bigtable.v2.IType|null|undefined} inputType + * @memberof google.bigtable.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.inputType = null; + + /** + * Aggregate stateType. + * @member {google.bigtable.v2.IType|null|undefined} stateType + * @memberof google.bigtable.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.stateType = null; + + /** + * Aggregate sum. + * @member {google.bigtable.v2.Type.Aggregate.ISum|null|undefined} sum + * @memberof google.bigtable.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.sum = null; + + /** + * Aggregate hllppUniqueCount. + * @member {google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount|null|undefined} hllppUniqueCount + * @memberof google.bigtable.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.hllppUniqueCount = null; + + /** + * Aggregate max. + * @member {google.bigtable.v2.Type.Aggregate.IMax|null|undefined} max + * @memberof google.bigtable.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.max = null; + + /** + * Aggregate min. + * @member {google.bigtable.v2.Type.Aggregate.IMin|null|undefined} min + * @memberof google.bigtable.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.min = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Aggregate aggregator. + * @member {"sum"|"hllppUniqueCount"|"max"|"min"|undefined} aggregator + * @memberof google.bigtable.v2.Type.Aggregate + * @instance + */ + Object.defineProperty(Aggregate.prototype, "aggregator", { + get: $util.oneOfGetter($oneOfFields = ["sum", "hllppUniqueCount", "max", "min"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Aggregate instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {google.bigtable.v2.Type.IAggregate=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Aggregate} Aggregate instance + */ + Aggregate.create = function create(properties) { + return new Aggregate(properties); + }; + + /** + * Encodes the specified Aggregate message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {google.bigtable.v2.Type.IAggregate} message Aggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregate.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + $root.google.bigtable.v2.Type.encode(message.inputType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) + $root.google.bigtable.v2.Type.encode(message.stateType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + $root.google.bigtable.v2.Type.Aggregate.Sum.encode(message.sum, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) + $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.encode(message.hllppUniqueCount, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + $root.google.bigtable.v2.Type.Aggregate.Max.encode(message.max, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + $root.google.bigtable.v2.Type.Aggregate.Min.encode(message.min, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Aggregate message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {google.bigtable.v2.Type.IAggregate} message Aggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Aggregate message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Aggregate} Aggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregate.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Aggregate(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inputType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.stateType = $root.google.bigtable.v2.Type.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.max = $root.google.bigtable.v2.Type.Aggregate.Max.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.min = $root.google.bigtable.v2.Type.Aggregate.Min.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Aggregate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Aggregate} Aggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aggregate message. + * @function verify + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregate.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) { + var error = $root.google.bigtable.v2.Type.verify(message.inputType, long + 1); + if (error) + return "inputType." + error; + } + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) { + var error = $root.google.bigtable.v2.Type.verify(message.stateType, long + 1); + if (error) + return "stateType." + error; + } + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) { + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Sum.verify(message.sum, long + 1); + if (error) + return "sum." + error; + } + } + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify(message.hllppUniqueCount, long + 1); + if (error) + return "hllppUniqueCount." + error; + } + } + if (message.max != null && Object.hasOwnProperty.call(message, "max")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Max.verify(message.max, long + 1); + if (error) + return "max." + error; + } + } + if (message.min != null && Object.hasOwnProperty.call(message, "min")) { + if (properties.aggregator === 1) + return "aggregator: multiple values"; + properties.aggregator = 1; + { + var error = $root.google.bigtable.v2.Type.Aggregate.Min.verify(message.min, long + 1); + if (error) + return "min." + error; + } + } + return null; + }; + + /** + * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Aggregate} Aggregate + */ + Aggregate.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Aggregate: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.Type.Aggregate(); + if (object.inputType != null) { + if (!$util.isObject(object.inputType)) + throw TypeError(".google.bigtable.v2.Type.Aggregate.inputType: object expected"); + message.inputType = $root.google.bigtable.v2.Type.fromObject(object.inputType, long + 1); + } + if (object.stateType != null) { + if (!$util.isObject(object.stateType)) + throw TypeError(".google.bigtable.v2.Type.Aggregate.stateType: object expected"); + message.stateType = $root.google.bigtable.v2.Type.fromObject(object.stateType, long + 1); + } + if (object.sum != null) { + if (!$util.isObject(object.sum)) + throw TypeError(".google.bigtable.v2.Type.Aggregate.sum: object expected"); + message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.fromObject(object.sum, long + 1); + } + if (object.hllppUniqueCount != null) { + if (!$util.isObject(object.hllppUniqueCount)) + throw TypeError(".google.bigtable.v2.Type.Aggregate.hllppUniqueCount: object expected"); + message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount, long + 1); + } + if (object.max != null) { + if (!$util.isObject(object.max)) + throw TypeError(".google.bigtable.v2.Type.Aggregate.max: object expected"); + message.max = $root.google.bigtable.v2.Type.Aggregate.Max.fromObject(object.max, long + 1); + } + if (object.min != null) { + if (!$util.isObject(object.min)) + throw TypeError(".google.bigtable.v2.Type.Aggregate.min: object expected"); + message.min = $root.google.bigtable.v2.Type.Aggregate.Min.fromObject(object.min, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Aggregate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {google.bigtable.v2.Type.Aggregate} message Aggregate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregate.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.inputType = null; + object.stateType = null; + } + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + object.inputType = $root.google.bigtable.v2.Type.toObject(message.inputType, options, q + 1); + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) + object.stateType = $root.google.bigtable.v2.Type.toObject(message.stateType, options, q + 1); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) { + object.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.toObject(message.sum, options, q + 1); + if (options.oneofs) + object.aggregator = "sum"; + } + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) { + object.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options, q + 1); + if (options.oneofs) + object.aggregator = "hllppUniqueCount"; + } + if (message.max != null && Object.hasOwnProperty.call(message, "max")) { + object.max = $root.google.bigtable.v2.Type.Aggregate.Max.toObject(message.max, options, q + 1); + if (options.oneofs) + object.aggregator = "max"; + } + if (message.min != null && Object.hasOwnProperty.call(message, "min")) { + object.min = $root.google.bigtable.v2.Type.Aggregate.Min.toObject(message.min, options, q + 1); + if (options.oneofs) + object.aggregator = "min"; + } + return object; + }; + + /** + * Converts this Aggregate to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Aggregate + * @instance + * @returns {Object.} JSON object + */ + Aggregate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Aggregate + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Aggregate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aggregate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Aggregate"; + }; + + Aggregate.Sum = (function() { + + /** + * Properties of a Sum. + * @memberof google.bigtable.v2.Type.Aggregate + * @interface ISum + */ + + /** + * Constructs a new Sum. + * @memberof google.bigtable.v2.Type.Aggregate + * @classdesc Represents a Sum. + * @implements ISum + * @constructor + * @param {google.bigtable.v2.Type.Aggregate.ISum=} [properties] Properties to set + */ + function Sum(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Sum instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.v2.Type.Aggregate.ISum=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Aggregate.Sum} Sum instance + */ + Sum.create = function create(properties) { + return new Sum(properties); + }; + + /** + * Encodes the specified Sum message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Sum.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.v2.Type.Aggregate.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Sum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.v2.Type.Aggregate.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Sum message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Aggregate.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Aggregate.Sum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Aggregate.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sum message. + * @function verify + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sum.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Aggregate.Sum} Sum + */ + Sum.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Sum) + return object; + return new $root.google.bigtable.v2.Type.Aggregate.Sum(); + }; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.v2.Type.Aggregate.Sum} message Sum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Sum to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @instance + * @returns {Object.} JSON object + */ + Sum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Sum + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Aggregate.Sum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Aggregate.Sum"; + }; + + return Sum; + })(); + + Aggregate.Max = (function() { + + /** + * Properties of a Max. + * @memberof google.bigtable.v2.Type.Aggregate + * @interface IMax + */ + + /** + * Constructs a new Max. + * @memberof google.bigtable.v2.Type.Aggregate + * @classdesc Represents a Max. + * @implements IMax + * @constructor + * @param {google.bigtable.v2.Type.Aggregate.IMax=} [properties] Properties to set + */ + function Max(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Max instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {google.bigtable.v2.Type.Aggregate.IMax=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Aggregate.Max} Max instance + */ + Max.create = function create(properties) { + return new Max(properties); + }; + + /** + * Encodes the specified Max message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Max.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {google.bigtable.v2.Type.Aggregate.IMax} message Max message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Max.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Max message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Max.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {google.bigtable.v2.Type.Aggregate.IMax} message Max message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Max.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Max message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Aggregate.Max} Max + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Max.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Aggregate.Max(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Max message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Aggregate.Max} Max + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Max.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Max message. + * @function verify + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Max.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Max message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Aggregate.Max} Max + */ + Max.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Max) + return object; + return new $root.google.bigtable.v2.Type.Aggregate.Max(); + }; + + /** + * Creates a plain object from a Max message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {google.bigtable.v2.Type.Aggregate.Max} message Max + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Max.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Max to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @instance + * @returns {Object.} JSON object + */ + Max.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Max + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Aggregate.Max + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Max.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Aggregate.Max"; + }; + + return Max; + })(); + + Aggregate.Min = (function() { + + /** + * Properties of a Min. + * @memberof google.bigtable.v2.Type.Aggregate + * @interface IMin + */ + + /** + * Constructs a new Min. + * @memberof google.bigtable.v2.Type.Aggregate + * @classdesc Represents a Min. + * @implements IMin + * @constructor + * @param {google.bigtable.v2.Type.Aggregate.IMin=} [properties] Properties to set + */ + function Min(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Min instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {google.bigtable.v2.Type.Aggregate.IMin=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Aggregate.Min} Min instance + */ + Min.create = function create(properties) { + return new Min(properties); + }; + + /** + * Encodes the specified Min message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Min.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {google.bigtable.v2.Type.Aggregate.IMin} message Min message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Min.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Min message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.Min.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {google.bigtable.v2.Type.Aggregate.IMin} message Min message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Min.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Min message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Aggregate.Min} Min + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Min.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Aggregate.Min(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Min message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Aggregate.Min} Min + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Min.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Min message. + * @function verify + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Min.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Min message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Aggregate.Min} Min + */ + Min.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Min) + return object; + return new $root.google.bigtable.v2.Type.Aggregate.Min(); + }; + + /** + * Creates a plain object from a Min message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {google.bigtable.v2.Type.Aggregate.Min} message Min + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Min.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Min to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @instance + * @returns {Object.} JSON object + */ + Min.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Min + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Aggregate.Min + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Min.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Aggregate.Min"; + }; + + return Min; + })(); + + Aggregate.HyperLogLogPlusPlusUniqueCount = (function() { + + /** + * Properties of a HyperLogLogPlusPlusUniqueCount. + * @memberof google.bigtable.v2.Type.Aggregate + * @interface IHyperLogLogPlusPlusUniqueCount + */ + + /** + * Constructs a new HyperLogLogPlusPlusUniqueCount. + * @memberof google.bigtable.v2.Type.Aggregate + * @classdesc Represents a HyperLogLogPlusPlusUniqueCount. + * @implements IHyperLogLogPlusPlusUniqueCount + * @constructor + * @param {google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount=} [properties] Properties to set + */ + function HyperLogLogPlusPlusUniqueCount(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new HyperLogLogPlusPlusUniqueCount instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount=} [properties] Properties to set + * @returns {google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} HyperLogLogPlusPlusUniqueCount instance + */ + HyperLogLogPlusPlusUniqueCount.create = function create(properties) { + return new HyperLogLogPlusPlusUniqueCount(properties); + }; + + /** + * Encodes the specified HyperLogLogPlusPlusUniqueCount message. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount} message HyperLogLogPlusPlusUniqueCount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HyperLogLogPlusPlusUniqueCount.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified HyperLogLogPlusPlusUniqueCount message, length delimited. Does not implicitly {@link google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {google.bigtable.v2.Type.Aggregate.IHyperLogLogPlusPlusUniqueCount} message HyperLogLogPlusPlusUniqueCount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HyperLogLogPlusPlusUniqueCount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a HyperLogLogPlusPlusUniqueCount message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} HyperLogLogPlusPlusUniqueCount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HyperLogLogPlusPlusUniqueCount.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HyperLogLogPlusPlusUniqueCount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} HyperLogLogPlusPlusUniqueCount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HyperLogLogPlusPlusUniqueCount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HyperLogLogPlusPlusUniqueCount message. + * @function verify + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HyperLogLogPlusPlusUniqueCount.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a HyperLogLogPlusPlusUniqueCount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} HyperLogLogPlusPlusUniqueCount + */ + HyperLogLogPlusPlusUniqueCount.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + return object; + return new $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(); + }; + + /** + * Creates a plain object from a HyperLogLogPlusPlusUniqueCount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} message HyperLogLogPlusPlusUniqueCount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HyperLogLogPlusPlusUniqueCount.toObject = function toObject() { + return {}; + }; + + /** + * Converts this HyperLogLogPlusPlusUniqueCount to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @instance + * @returns {Object.} JSON object + */ + HyperLogLogPlusPlusUniqueCount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HyperLogLogPlusPlusUniqueCount + * @function getTypeUrl + * @memberof google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HyperLogLogPlusPlusUniqueCount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"; + }; + + return HyperLogLogPlusPlusUniqueCount; + })(); + + return Aggregate; + })(); + + return Type; + })(); + + v2.ReadIterationStats = (function() { + + /** + * Properties of a ReadIterationStats. + * @memberof google.bigtable.v2 + * @interface IReadIterationStats + * @property {number|Long|null} [rowsSeenCount] ReadIterationStats rowsSeenCount + * @property {number|Long|null} [rowsReturnedCount] ReadIterationStats rowsReturnedCount + * @property {number|Long|null} [cellsSeenCount] ReadIterationStats cellsSeenCount + * @property {number|Long|null} [cellsReturnedCount] ReadIterationStats cellsReturnedCount + */ + + /** + * Constructs a new ReadIterationStats. + * @memberof google.bigtable.v2 + * @classdesc Represents a ReadIterationStats. + * @implements IReadIterationStats + * @constructor + * @param {google.bigtable.v2.IReadIterationStats=} [properties] Properties to set + */ + function ReadIterationStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadIterationStats rowsSeenCount. + * @member {number|Long} rowsSeenCount + * @memberof google.bigtable.v2.ReadIterationStats + * @instance + */ + ReadIterationStats.prototype.rowsSeenCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReadIterationStats rowsReturnedCount. + * @member {number|Long} rowsReturnedCount + * @memberof google.bigtable.v2.ReadIterationStats + * @instance + */ + ReadIterationStats.prototype.rowsReturnedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReadIterationStats cellsSeenCount. + * @member {number|Long} cellsSeenCount + * @memberof google.bigtable.v2.ReadIterationStats + * @instance + */ + ReadIterationStats.prototype.cellsSeenCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReadIterationStats cellsReturnedCount. + * @member {number|Long} cellsReturnedCount + * @memberof google.bigtable.v2.ReadIterationStats + * @instance + */ + ReadIterationStats.prototype.cellsReturnedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ReadIterationStats instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {google.bigtable.v2.IReadIterationStats=} [properties] Properties to set + * @returns {google.bigtable.v2.ReadIterationStats} ReadIterationStats instance + */ + ReadIterationStats.create = function create(properties) { + return new ReadIterationStats(properties); + }; + + /** + * Encodes the specified ReadIterationStats message. Does not implicitly {@link google.bigtable.v2.ReadIterationStats.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {google.bigtable.v2.IReadIterationStats} message ReadIterationStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadIterationStats.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rowsSeenCount != null && Object.hasOwnProperty.call(message, "rowsSeenCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowsSeenCount); + if (message.rowsReturnedCount != null && Object.hasOwnProperty.call(message, "rowsReturnedCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.rowsReturnedCount); + if (message.cellsSeenCount != null && Object.hasOwnProperty.call(message, "cellsSeenCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.cellsSeenCount); + if (message.cellsReturnedCount != null && Object.hasOwnProperty.call(message, "cellsReturnedCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.cellsReturnedCount); + return writer; + }; + + /** + * Encodes the specified ReadIterationStats message, length delimited. Does not implicitly {@link google.bigtable.v2.ReadIterationStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {google.bigtable.v2.IReadIterationStats} message ReadIterationStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadIterationStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReadIterationStats message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ReadIterationStats} ReadIterationStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadIterationStats.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ReadIterationStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rowsSeenCount = reader.int64(); + break; + } + case 2: { + message.rowsReturnedCount = reader.int64(); + break; + } + case 3: { + message.cellsSeenCount = reader.int64(); + break; + } + case 4: { + message.cellsReturnedCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReadIterationStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ReadIterationStats} ReadIterationStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadIterationStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadIterationStats message. + * @function verify + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadIterationStats.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rowsSeenCount != null && Object.hasOwnProperty.call(message, "rowsSeenCount")) + if (!$util.isInteger(message.rowsSeenCount) && !(message.rowsSeenCount && $util.isInteger(message.rowsSeenCount.low) && $util.isInteger(message.rowsSeenCount.high))) + return "rowsSeenCount: integer|Long expected"; + if (message.rowsReturnedCount != null && Object.hasOwnProperty.call(message, "rowsReturnedCount")) + if (!$util.isInteger(message.rowsReturnedCount) && !(message.rowsReturnedCount && $util.isInteger(message.rowsReturnedCount.low) && $util.isInteger(message.rowsReturnedCount.high))) + return "rowsReturnedCount: integer|Long expected"; + if (message.cellsSeenCount != null && Object.hasOwnProperty.call(message, "cellsSeenCount")) + if (!$util.isInteger(message.cellsSeenCount) && !(message.cellsSeenCount && $util.isInteger(message.cellsSeenCount.low) && $util.isInteger(message.cellsSeenCount.high))) + return "cellsSeenCount: integer|Long expected"; + if (message.cellsReturnedCount != null && Object.hasOwnProperty.call(message, "cellsReturnedCount")) + if (!$util.isInteger(message.cellsReturnedCount) && !(message.cellsReturnedCount && $util.isInteger(message.cellsReturnedCount.low) && $util.isInteger(message.cellsReturnedCount.high))) + return "cellsReturnedCount: integer|Long expected"; + return null; + }; + + /** + * Creates a ReadIterationStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ReadIterationStats} ReadIterationStats + */ + ReadIterationStats.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ReadIterationStats) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadIterationStats: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ReadIterationStats(); + if (object.rowsSeenCount != null) + if ($util.Long) + message.rowsSeenCount = $util.Long.fromValue(object.rowsSeenCount, false); + else if (typeof object.rowsSeenCount === "string") + message.rowsSeenCount = parseInt(object.rowsSeenCount, 10); + else if (typeof object.rowsSeenCount === "number") + message.rowsSeenCount = object.rowsSeenCount; + else if (typeof object.rowsSeenCount === "object") + message.rowsSeenCount = new $util.LongBits(object.rowsSeenCount.low >>> 0, object.rowsSeenCount.high >>> 0).toNumber(); + if (object.rowsReturnedCount != null) + if ($util.Long) + message.rowsReturnedCount = $util.Long.fromValue(object.rowsReturnedCount, false); + else if (typeof object.rowsReturnedCount === "string") + message.rowsReturnedCount = parseInt(object.rowsReturnedCount, 10); + else if (typeof object.rowsReturnedCount === "number") + message.rowsReturnedCount = object.rowsReturnedCount; + else if (typeof object.rowsReturnedCount === "object") + message.rowsReturnedCount = new $util.LongBits(object.rowsReturnedCount.low >>> 0, object.rowsReturnedCount.high >>> 0).toNumber(); + if (object.cellsSeenCount != null) + if ($util.Long) + message.cellsSeenCount = $util.Long.fromValue(object.cellsSeenCount, false); + else if (typeof object.cellsSeenCount === "string") + message.cellsSeenCount = parseInt(object.cellsSeenCount, 10); + else if (typeof object.cellsSeenCount === "number") + message.cellsSeenCount = object.cellsSeenCount; + else if (typeof object.cellsSeenCount === "object") + message.cellsSeenCount = new $util.LongBits(object.cellsSeenCount.low >>> 0, object.cellsSeenCount.high >>> 0).toNumber(); + if (object.cellsReturnedCount != null) + if ($util.Long) + message.cellsReturnedCount = $util.Long.fromValue(object.cellsReturnedCount, false); + else if (typeof object.cellsReturnedCount === "string") + message.cellsReturnedCount = parseInt(object.cellsReturnedCount, 10); + else if (typeof object.cellsReturnedCount === "number") + message.cellsReturnedCount = object.cellsReturnedCount; + else if (typeof object.cellsReturnedCount === "object") + message.cellsReturnedCount = new $util.LongBits(object.cellsReturnedCount.low >>> 0, object.cellsReturnedCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ReadIterationStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {google.bigtable.v2.ReadIterationStats} message ReadIterationStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadIterationStats.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowsSeenCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.rowsSeenCount = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowsReturnedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.rowsReturnedCount = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.cellsSeenCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.cellsSeenCount = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.cellsReturnedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.cellsReturnedCount = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + } + if (message.rowsSeenCount != null && Object.hasOwnProperty.call(message, "rowsSeenCount")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rowsSeenCount = typeof message.rowsSeenCount === "number" ? BigInt(message.rowsSeenCount) : $util.Long.fromBits(message.rowsSeenCount.low >>> 0, message.rowsSeenCount.high >>> 0, false).toBigInt(); + else if (typeof message.rowsSeenCount === "number") + object.rowsSeenCount = options.longs === String ? String(message.rowsSeenCount) : message.rowsSeenCount; + else + object.rowsSeenCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowsSeenCount) : options.longs === Number ? new $util.LongBits(message.rowsSeenCount.low >>> 0, message.rowsSeenCount.high >>> 0).toNumber() : message.rowsSeenCount; + if (message.rowsReturnedCount != null && Object.hasOwnProperty.call(message, "rowsReturnedCount")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rowsReturnedCount = typeof message.rowsReturnedCount === "number" ? BigInt(message.rowsReturnedCount) : $util.Long.fromBits(message.rowsReturnedCount.low >>> 0, message.rowsReturnedCount.high >>> 0, false).toBigInt(); + else if (typeof message.rowsReturnedCount === "number") + object.rowsReturnedCount = options.longs === String ? String(message.rowsReturnedCount) : message.rowsReturnedCount; + else + object.rowsReturnedCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowsReturnedCount) : options.longs === Number ? new $util.LongBits(message.rowsReturnedCount.low >>> 0, message.rowsReturnedCount.high >>> 0).toNumber() : message.rowsReturnedCount; + if (message.cellsSeenCount != null && Object.hasOwnProperty.call(message, "cellsSeenCount")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.cellsSeenCount = typeof message.cellsSeenCount === "number" ? BigInt(message.cellsSeenCount) : $util.Long.fromBits(message.cellsSeenCount.low >>> 0, message.cellsSeenCount.high >>> 0, false).toBigInt(); + else if (typeof message.cellsSeenCount === "number") + object.cellsSeenCount = options.longs === String ? String(message.cellsSeenCount) : message.cellsSeenCount; + else + object.cellsSeenCount = options.longs === String ? $util.Long.prototype.toString.call(message.cellsSeenCount) : options.longs === Number ? new $util.LongBits(message.cellsSeenCount.low >>> 0, message.cellsSeenCount.high >>> 0).toNumber() : message.cellsSeenCount; + if (message.cellsReturnedCount != null && Object.hasOwnProperty.call(message, "cellsReturnedCount")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.cellsReturnedCount = typeof message.cellsReturnedCount === "number" ? BigInt(message.cellsReturnedCount) : $util.Long.fromBits(message.cellsReturnedCount.low >>> 0, message.cellsReturnedCount.high >>> 0, false).toBigInt(); + else if (typeof message.cellsReturnedCount === "number") + object.cellsReturnedCount = options.longs === String ? String(message.cellsReturnedCount) : message.cellsReturnedCount; + else + object.cellsReturnedCount = options.longs === String ? $util.Long.prototype.toString.call(message.cellsReturnedCount) : options.longs === Number ? new $util.LongBits(message.cellsReturnedCount.low >>> 0, message.cellsReturnedCount.high >>> 0).toNumber() : message.cellsReturnedCount; + return object; + }; + + /** + * Converts this ReadIterationStats to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ReadIterationStats + * @instance + * @returns {Object.} JSON object + */ + ReadIterationStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadIterationStats + * @function getTypeUrl + * @memberof google.bigtable.v2.ReadIterationStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadIterationStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ReadIterationStats"; + }; + + return ReadIterationStats; + })(); + + v2.RequestLatencyStats = (function() { + + /** + * Properties of a RequestLatencyStats. + * @memberof google.bigtable.v2 + * @interface IRequestLatencyStats + * @property {google.protobuf.IDuration|null} [frontendServerLatency] RequestLatencyStats frontendServerLatency + */ + + /** + * Constructs a new RequestLatencyStats. + * @memberof google.bigtable.v2 + * @classdesc Represents a RequestLatencyStats. + * @implements IRequestLatencyStats + * @constructor + * @param {google.bigtable.v2.IRequestLatencyStats=} [properties] Properties to set + */ + function RequestLatencyStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestLatencyStats frontendServerLatency. + * @member {google.protobuf.IDuration|null|undefined} frontendServerLatency + * @memberof google.bigtable.v2.RequestLatencyStats + * @instance + */ + RequestLatencyStats.prototype.frontendServerLatency = null; + + /** + * Creates a new RequestLatencyStats instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {google.bigtable.v2.IRequestLatencyStats=} [properties] Properties to set + * @returns {google.bigtable.v2.RequestLatencyStats} RequestLatencyStats instance + */ + RequestLatencyStats.create = function create(properties) { + return new RequestLatencyStats(properties); + }; + + /** + * Encodes the specified RequestLatencyStats message. Does not implicitly {@link google.bigtable.v2.RequestLatencyStats.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {google.bigtable.v2.IRequestLatencyStats} message RequestLatencyStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestLatencyStats.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.frontendServerLatency != null && Object.hasOwnProperty.call(message, "frontendServerLatency")) + $root.google.protobuf.Duration.encode(message.frontendServerLatency, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestLatencyStats message, length delimited. Does not implicitly {@link google.bigtable.v2.RequestLatencyStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {google.bigtable.v2.IRequestLatencyStats} message RequestLatencyStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestLatencyStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RequestLatencyStats message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RequestLatencyStats} RequestLatencyStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestLatencyStats.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RequestLatencyStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.frontendServerLatency = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RequestLatencyStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RequestLatencyStats} RequestLatencyStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestLatencyStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestLatencyStats message. + * @function verify + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestLatencyStats.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.frontendServerLatency != null && Object.hasOwnProperty.call(message, "frontendServerLatency")) { + var error = $root.google.protobuf.Duration.verify(message.frontendServerLatency, long + 1); + if (error) + return "frontendServerLatency." + error; + } + return null; + }; + + /** + * Creates a RequestLatencyStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RequestLatencyStats} RequestLatencyStats + */ + RequestLatencyStats.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.RequestLatencyStats) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RequestLatencyStats: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RequestLatencyStats(); + if (object.frontendServerLatency != null) { + if (!$util.isObject(object.frontendServerLatency)) + throw TypeError(".google.bigtable.v2.RequestLatencyStats.frontendServerLatency: object expected"); + message.frontendServerLatency = $root.google.protobuf.Duration.fromObject(object.frontendServerLatency, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RequestLatencyStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {google.bigtable.v2.RequestLatencyStats} message RequestLatencyStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestLatencyStats.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.frontendServerLatency = null; + if (message.frontendServerLatency != null && Object.hasOwnProperty.call(message, "frontendServerLatency")) + object.frontendServerLatency = $root.google.protobuf.Duration.toObject(message.frontendServerLatency, options, q + 1); + return object; + }; + + /** + * Converts this RequestLatencyStats to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RequestLatencyStats + * @instance + * @returns {Object.} JSON object + */ + RequestLatencyStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestLatencyStats + * @function getTypeUrl + * @memberof google.bigtable.v2.RequestLatencyStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestLatencyStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RequestLatencyStats"; + }; + + return RequestLatencyStats; + })(); + + v2.FullReadStatsView = (function() { + + /** + * Properties of a FullReadStatsView. + * @memberof google.bigtable.v2 + * @interface IFullReadStatsView + * @property {google.bigtable.v2.IReadIterationStats|null} [readIterationStats] FullReadStatsView readIterationStats + * @property {google.bigtable.v2.IRequestLatencyStats|null} [requestLatencyStats] FullReadStatsView requestLatencyStats + */ + + /** + * Constructs a new FullReadStatsView. + * @memberof google.bigtable.v2 + * @classdesc Represents a FullReadStatsView. + * @implements IFullReadStatsView + * @constructor + * @param {google.bigtable.v2.IFullReadStatsView=} [properties] Properties to set + */ + function FullReadStatsView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FullReadStatsView readIterationStats. + * @member {google.bigtable.v2.IReadIterationStats|null|undefined} readIterationStats + * @memberof google.bigtable.v2.FullReadStatsView + * @instance + */ + FullReadStatsView.prototype.readIterationStats = null; + + /** + * FullReadStatsView requestLatencyStats. + * @member {google.bigtable.v2.IRequestLatencyStats|null|undefined} requestLatencyStats + * @memberof google.bigtable.v2.FullReadStatsView + * @instance + */ + FullReadStatsView.prototype.requestLatencyStats = null; + + /** + * Creates a new FullReadStatsView instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {google.bigtable.v2.IFullReadStatsView=} [properties] Properties to set + * @returns {google.bigtable.v2.FullReadStatsView} FullReadStatsView instance + */ + FullReadStatsView.create = function create(properties) { + return new FullReadStatsView(properties); + }; + + /** + * Encodes the specified FullReadStatsView message. Does not implicitly {@link google.bigtable.v2.FullReadStatsView.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {google.bigtable.v2.IFullReadStatsView} message FullReadStatsView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FullReadStatsView.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.readIterationStats != null && Object.hasOwnProperty.call(message, "readIterationStats")) + $root.google.bigtable.v2.ReadIterationStats.encode(message.readIterationStats, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.requestLatencyStats != null && Object.hasOwnProperty.call(message, "requestLatencyStats")) + $root.google.bigtable.v2.RequestLatencyStats.encode(message.requestLatencyStats, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified FullReadStatsView message, length delimited. Does not implicitly {@link google.bigtable.v2.FullReadStatsView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {google.bigtable.v2.IFullReadStatsView} message FullReadStatsView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FullReadStatsView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FullReadStatsView message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.FullReadStatsView} FullReadStatsView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FullReadStatsView.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.FullReadStatsView(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FullReadStatsView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.FullReadStatsView} FullReadStatsView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FullReadStatsView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FullReadStatsView message. + * @function verify + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FullReadStatsView.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.readIterationStats != null && Object.hasOwnProperty.call(message, "readIterationStats")) { + var error = $root.google.bigtable.v2.ReadIterationStats.verify(message.readIterationStats, long + 1); + if (error) + return "readIterationStats." + error; + } + if (message.requestLatencyStats != null && Object.hasOwnProperty.call(message, "requestLatencyStats")) { + var error = $root.google.bigtable.v2.RequestLatencyStats.verify(message.requestLatencyStats, long + 1); + if (error) + return "requestLatencyStats." + error; + } + return null; + }; + + /** + * Creates a FullReadStatsView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.FullReadStatsView} FullReadStatsView + */ + FullReadStatsView.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.FullReadStatsView) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.FullReadStatsView: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.FullReadStatsView(); + if (object.readIterationStats != null) { + if (!$util.isObject(object.readIterationStats)) + throw TypeError(".google.bigtable.v2.FullReadStatsView.readIterationStats: object expected"); + message.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.fromObject(object.readIterationStats, long + 1); + } + if (object.requestLatencyStats != null) { + if (!$util.isObject(object.requestLatencyStats)) + throw TypeError(".google.bigtable.v2.FullReadStatsView.requestLatencyStats: object expected"); + message.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.fromObject(object.requestLatencyStats, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FullReadStatsView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {google.bigtable.v2.FullReadStatsView} message FullReadStatsView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FullReadStatsView.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.readIterationStats = null; + object.requestLatencyStats = null; + } + if (message.readIterationStats != null && Object.hasOwnProperty.call(message, "readIterationStats")) + object.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.toObject(message.readIterationStats, options, q + 1); + if (message.requestLatencyStats != null && Object.hasOwnProperty.call(message, "requestLatencyStats")) + object.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.toObject(message.requestLatencyStats, options, q + 1); + return object; + }; + + /** + * Converts this FullReadStatsView to JSON. + * @function toJSON + * @memberof google.bigtable.v2.FullReadStatsView + * @instance + * @returns {Object.} JSON object + */ + FullReadStatsView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FullReadStatsView + * @function getTypeUrl + * @memberof google.bigtable.v2.FullReadStatsView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FullReadStatsView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.FullReadStatsView"; + }; + + return FullReadStatsView; + })(); + + v2.RequestStats = (function() { + + /** + * Properties of a RequestStats. + * @memberof google.bigtable.v2 + * @interface IRequestStats + * @property {google.bigtable.v2.IFullReadStatsView|null} [fullReadStatsView] RequestStats fullReadStatsView + */ + + /** + * Constructs a new RequestStats. + * @memberof google.bigtable.v2 + * @classdesc Represents a RequestStats. + * @implements IRequestStats + * @constructor + * @param {google.bigtable.v2.IRequestStats=} [properties] Properties to set + */ + function RequestStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestStats fullReadStatsView. + * @member {google.bigtable.v2.IFullReadStatsView|null|undefined} fullReadStatsView + * @memberof google.bigtable.v2.RequestStats + * @instance + */ + RequestStats.prototype.fullReadStatsView = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RequestStats statsView. + * @member {"fullReadStatsView"|undefined} statsView + * @memberof google.bigtable.v2.RequestStats + * @instance + */ + Object.defineProperty(RequestStats.prototype, "statsView", { + get: $util.oneOfGetter($oneOfFields = ["fullReadStatsView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RequestStats instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {google.bigtable.v2.IRequestStats=} [properties] Properties to set + * @returns {google.bigtable.v2.RequestStats} RequestStats instance + */ + RequestStats.create = function create(properties) { + return new RequestStats(properties); + }; + + /** + * Encodes the specified RequestStats message. Does not implicitly {@link google.bigtable.v2.RequestStats.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {google.bigtable.v2.IRequestStats} message RequestStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestStats.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.fullReadStatsView != null && Object.hasOwnProperty.call(message, "fullReadStatsView")) + $root.google.bigtable.v2.FullReadStatsView.encode(message.fullReadStatsView, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestStats message, length delimited. Does not implicitly {@link google.bigtable.v2.RequestStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {google.bigtable.v2.IRequestStats} message RequestStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RequestStats message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RequestStats} RequestStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestStats.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RequestStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RequestStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RequestStats} RequestStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestStats message. + * @function verify + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestStats.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.fullReadStatsView != null && Object.hasOwnProperty.call(message, "fullReadStatsView")) { + properties.statsView = 1; + { + var error = $root.google.bigtable.v2.FullReadStatsView.verify(message.fullReadStatsView, long + 1); + if (error) + return "fullReadStatsView." + error; + } + } + return null; + }; + + /** + * Creates a RequestStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RequestStats} RequestStats + */ + RequestStats.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.RequestStats) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RequestStats: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.RequestStats(); + if (object.fullReadStatsView != null) { + if (!$util.isObject(object.fullReadStatsView)) + throw TypeError(".google.bigtable.v2.RequestStats.fullReadStatsView: object expected"); + message.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.fromObject(object.fullReadStatsView, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RequestStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {google.bigtable.v2.RequestStats} message RequestStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestStats.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.fullReadStatsView != null && Object.hasOwnProperty.call(message, "fullReadStatsView")) { + object.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.toObject(message.fullReadStatsView, options, q + 1); + if (options.oneofs) + object.statsView = "fullReadStatsView"; + } + return object; + }; + + /** + * Converts this RequestStats to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RequestStats + * @instance + * @returns {Object.} JSON object + */ + RequestStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestStats + * @function getTypeUrl + * @memberof google.bigtable.v2.RequestStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RequestStats"; + }; + + return RequestStats; + })(); + + /** + * SessionType enum. + * @name google.bigtable.v2.SessionType + * @enum {number} + * @property {number} SESSION_TYPE_UNSET=0 SESSION_TYPE_UNSET value + * @property {number} SESSION_TYPE_TABLE=1 SESSION_TYPE_TABLE value + * @property {number} SESSION_TYPE_AUTHORIZED_VIEW=2 SESSION_TYPE_AUTHORIZED_VIEW value + * @property {number} SESSION_TYPE_MATERIALIZED_VIEW=3 SESSION_TYPE_MATERIALIZED_VIEW value + * @property {number} SESSION_TYPE_TEST=9999 SESSION_TYPE_TEST value + */ + v2.SessionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_TYPE_UNSET"] = 0; + values[valuesById[1] = "SESSION_TYPE_TABLE"] = 1; + values[valuesById[2] = "SESSION_TYPE_AUTHORIZED_VIEW"] = 2; + values[valuesById[3] = "SESSION_TYPE_MATERIALIZED_VIEW"] = 3; + values[valuesById[9999] = "SESSION_TYPE_TEST"] = 9999; + return values; + })(); + + v2.GetClientConfigurationRequest = (function() { + + /** + * Properties of a GetClientConfigurationRequest. + * @memberof google.bigtable.v2 + * @interface IGetClientConfigurationRequest + * @property {string|null} [instanceName] GetClientConfigurationRequest instanceName + * @property {string|null} [appProfileId] GetClientConfigurationRequest appProfileId + */ + + /** + * Constructs a new GetClientConfigurationRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a GetClientConfigurationRequest. + * @implements IGetClientConfigurationRequest + * @constructor + * @param {google.bigtable.v2.IGetClientConfigurationRequest=} [properties] Properties to set + */ + function GetClientConfigurationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetClientConfigurationRequest instanceName. + * @member {string} instanceName + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @instance + */ + GetClientConfigurationRequest.prototype.instanceName = ""; + + /** + * GetClientConfigurationRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @instance + */ + GetClientConfigurationRequest.prototype.appProfileId = ""; + + /** + * Creates a new GetClientConfigurationRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {google.bigtable.v2.IGetClientConfigurationRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.GetClientConfigurationRequest} GetClientConfigurationRequest instance + */ + GetClientConfigurationRequest.create = function create(properties) { + return new GetClientConfigurationRequest(properties); + }; + + /** + * Encodes the specified GetClientConfigurationRequest message. Does not implicitly {@link google.bigtable.v2.GetClientConfigurationRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {google.bigtable.v2.IGetClientConfigurationRequest} message GetClientConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClientConfigurationRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + return writer; + }; + + /** + * Encodes the specified GetClientConfigurationRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.GetClientConfigurationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {google.bigtable.v2.IGetClientConfigurationRequest} message GetClientConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClientConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetClientConfigurationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.GetClientConfigurationRequest} GetClientConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClientConfigurationRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GetClientConfigurationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.instanceName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetClientConfigurationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.GetClientConfigurationRequest} GetClientConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClientConfigurationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetClientConfigurationRequest message. + * @function verify + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetClientConfigurationRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + if (!$util.isString(message.instanceName)) + return "instanceName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + return null; + }; + + /** + * Creates a GetClientConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.GetClientConfigurationRequest} GetClientConfigurationRequest + */ + GetClientConfigurationRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.GetClientConfigurationRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.GetClientConfigurationRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.GetClientConfigurationRequest(); + if (object.instanceName != null) + message.instanceName = String(object.instanceName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + return message; + }; + + /** + * Creates a plain object from a GetClientConfigurationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {google.bigtable.v2.GetClientConfigurationRequest} message GetClientConfigurationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetClientConfigurationRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.instanceName = ""; + object.appProfileId = ""; + } + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) + object.instanceName = message.instanceName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + return object; + }; + + /** + * Converts this GetClientConfigurationRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @instance + * @returns {Object.} JSON object + */ + GetClientConfigurationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetClientConfigurationRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.GetClientConfigurationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetClientConfigurationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.GetClientConfigurationRequest"; + }; + + return GetClientConfigurationRequest; + })(); + + v2.LoadBalancingOptions = (function() { + + /** + * Properties of a LoadBalancingOptions. + * @memberof google.bigtable.v2 + * @interface ILoadBalancingOptions + * @property {google.bigtable.v2.LoadBalancingOptions.ILeastInFlight|null} [leastInFlight] LoadBalancingOptions leastInFlight + * @property {google.bigtable.v2.LoadBalancingOptions.IPeakEwma|null} [peakEwma] LoadBalancingOptions peakEwma + * @property {google.bigtable.v2.LoadBalancingOptions.IRandom|null} [random] LoadBalancingOptions random + */ + + /** + * Constructs a new LoadBalancingOptions. + * @memberof google.bigtable.v2 + * @classdesc Represents a LoadBalancingOptions. + * @implements ILoadBalancingOptions + * @constructor + * @param {google.bigtable.v2.ILoadBalancingOptions=} [properties] Properties to set + */ + function LoadBalancingOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancingOptions leastInFlight. + * @member {google.bigtable.v2.LoadBalancingOptions.ILeastInFlight|null|undefined} leastInFlight + * @memberof google.bigtable.v2.LoadBalancingOptions + * @instance + */ + LoadBalancingOptions.prototype.leastInFlight = null; + + /** + * LoadBalancingOptions peakEwma. + * @member {google.bigtable.v2.LoadBalancingOptions.IPeakEwma|null|undefined} peakEwma + * @memberof google.bigtable.v2.LoadBalancingOptions + * @instance + */ + LoadBalancingOptions.prototype.peakEwma = null; + + /** + * LoadBalancingOptions random. + * @member {google.bigtable.v2.LoadBalancingOptions.IRandom|null|undefined} random + * @memberof google.bigtable.v2.LoadBalancingOptions + * @instance + */ + LoadBalancingOptions.prototype.random = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LoadBalancingOptions loadBalancingStrategy. + * @member {"leastInFlight"|"peakEwma"|"random"|undefined} loadBalancingStrategy + * @memberof google.bigtable.v2.LoadBalancingOptions + * @instance + */ + Object.defineProperty(LoadBalancingOptions.prototype, "loadBalancingStrategy", { + get: $util.oneOfGetter($oneOfFields = ["leastInFlight", "peakEwma", "random"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LoadBalancingOptions instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {google.bigtable.v2.ILoadBalancingOptions=} [properties] Properties to set + * @returns {google.bigtable.v2.LoadBalancingOptions} LoadBalancingOptions instance + */ + LoadBalancingOptions.create = function create(properties) { + return new LoadBalancingOptions(properties); + }; + + /** + * Encodes the specified LoadBalancingOptions message. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {google.bigtable.v2.ILoadBalancingOptions} message LoadBalancingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancingOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.leastInFlight != null && Object.hasOwnProperty.call(message, "leastInFlight")) + $root.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.encode(message.leastInFlight, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.peakEwma != null && Object.hasOwnProperty.call(message, "peakEwma")) + $root.google.bigtable.v2.LoadBalancingOptions.PeakEwma.encode(message.peakEwma, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.random != null && Object.hasOwnProperty.call(message, "random")) + $root.google.bigtable.v2.LoadBalancingOptions.Random.encode(message.random, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadBalancingOptions message, length delimited. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {google.bigtable.v2.ILoadBalancingOptions} message LoadBalancingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancingOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a LoadBalancingOptions message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.LoadBalancingOptions} LoadBalancingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancingOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.LoadBalancingOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.leastInFlight = $root.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.peakEwma = $root.google.bigtable.v2.LoadBalancingOptions.PeakEwma.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.random = $root.google.bigtable.v2.LoadBalancingOptions.Random.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancingOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.LoadBalancingOptions} LoadBalancingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancingOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancingOptions message. + * @function verify + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancingOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.leastInFlight != null && Object.hasOwnProperty.call(message, "leastInFlight")) { + properties.loadBalancingStrategy = 1; + { + var error = $root.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.verify(message.leastInFlight, long + 1); + if (error) + return "leastInFlight." + error; + } + } + if (message.peakEwma != null && Object.hasOwnProperty.call(message, "peakEwma")) { + if (properties.loadBalancingStrategy === 1) + return "loadBalancingStrategy: multiple values"; + properties.loadBalancingStrategy = 1; + { + var error = $root.google.bigtable.v2.LoadBalancingOptions.PeakEwma.verify(message.peakEwma, long + 1); + if (error) + return "peakEwma." + error; + } + } + if (message.random != null && Object.hasOwnProperty.call(message, "random")) { + if (properties.loadBalancingStrategy === 1) + return "loadBalancingStrategy: multiple values"; + properties.loadBalancingStrategy = 1; + { + var error = $root.google.bigtable.v2.LoadBalancingOptions.Random.verify(message.random, long + 1); + if (error) + return "random." + error; + } + } + return null; + }; + + /** + * Creates a LoadBalancingOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.LoadBalancingOptions} LoadBalancingOptions + */ + LoadBalancingOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.LoadBalancingOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.LoadBalancingOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.LoadBalancingOptions(); + if (object.leastInFlight != null) { + if (!$util.isObject(object.leastInFlight)) + throw TypeError(".google.bigtable.v2.LoadBalancingOptions.leastInFlight: object expected"); + message.leastInFlight = $root.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.fromObject(object.leastInFlight, long + 1); + } + if (object.peakEwma != null) { + if (!$util.isObject(object.peakEwma)) + throw TypeError(".google.bigtable.v2.LoadBalancingOptions.peakEwma: object expected"); + message.peakEwma = $root.google.bigtable.v2.LoadBalancingOptions.PeakEwma.fromObject(object.peakEwma, long + 1); + } + if (object.random != null) { + if (!$util.isObject(object.random)) + throw TypeError(".google.bigtable.v2.LoadBalancingOptions.random: object expected"); + message.random = $root.google.bigtable.v2.LoadBalancingOptions.Random.fromObject(object.random, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancingOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {google.bigtable.v2.LoadBalancingOptions} message LoadBalancingOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancingOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.leastInFlight != null && Object.hasOwnProperty.call(message, "leastInFlight")) { + object.leastInFlight = $root.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.toObject(message.leastInFlight, options, q + 1); + if (options.oneofs) + object.loadBalancingStrategy = "leastInFlight"; + } + if (message.peakEwma != null && Object.hasOwnProperty.call(message, "peakEwma")) { + object.peakEwma = $root.google.bigtable.v2.LoadBalancingOptions.PeakEwma.toObject(message.peakEwma, options, q + 1); + if (options.oneofs) + object.loadBalancingStrategy = "peakEwma"; + } + if (message.random != null && Object.hasOwnProperty.call(message, "random")) { + object.random = $root.google.bigtable.v2.LoadBalancingOptions.Random.toObject(message.random, options, q + 1); + if (options.oneofs) + object.loadBalancingStrategy = "random"; + } + return object; + }; + + /** + * Converts this LoadBalancingOptions to JSON. + * @function toJSON + * @memberof google.bigtable.v2.LoadBalancingOptions + * @instance + * @returns {Object.} JSON object + */ + LoadBalancingOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancingOptions + * @function getTypeUrl + * @memberof google.bigtable.v2.LoadBalancingOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancingOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.LoadBalancingOptions"; + }; + + LoadBalancingOptions.LeastInFlight = (function() { + + /** + * Properties of a LeastInFlight. + * @memberof google.bigtable.v2.LoadBalancingOptions + * @interface ILeastInFlight + * @property {number|Long|null} [randomSubsetSize] LeastInFlight randomSubsetSize + */ + + /** + * Constructs a new LeastInFlight. + * @memberof google.bigtable.v2.LoadBalancingOptions + * @classdesc Represents a LeastInFlight. + * @implements ILeastInFlight + * @constructor + * @param {google.bigtable.v2.LoadBalancingOptions.ILeastInFlight=} [properties] Properties to set + */ + function LeastInFlight(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LeastInFlight randomSubsetSize. + * @member {number|Long} randomSubsetSize + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @instance + */ + LeastInFlight.prototype.randomSubsetSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LeastInFlight instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.ILeastInFlight=} [properties] Properties to set + * @returns {google.bigtable.v2.LoadBalancingOptions.LeastInFlight} LeastInFlight instance + */ + LeastInFlight.create = function create(properties) { + return new LeastInFlight(properties); + }; + + /** + * Encodes the specified LeastInFlight message. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.LeastInFlight.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.ILeastInFlight} message LeastInFlight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LeastInFlight.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.randomSubsetSize != null && Object.hasOwnProperty.call(message, "randomSubsetSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.randomSubsetSize); + return writer; + }; + + /** + * Encodes the specified LeastInFlight message, length delimited. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.LeastInFlight.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.ILeastInFlight} message LeastInFlight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LeastInFlight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a LeastInFlight message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.LoadBalancingOptions.LeastInFlight} LeastInFlight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LeastInFlight.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.LoadBalancingOptions.LeastInFlight(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.randomSubsetSize = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LeastInFlight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.LoadBalancingOptions.LeastInFlight} LeastInFlight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LeastInFlight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LeastInFlight message. + * @function verify + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LeastInFlight.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.randomSubsetSize != null && Object.hasOwnProperty.call(message, "randomSubsetSize")) + if (!$util.isInteger(message.randomSubsetSize) && !(message.randomSubsetSize && $util.isInteger(message.randomSubsetSize.low) && $util.isInteger(message.randomSubsetSize.high))) + return "randomSubsetSize: integer|Long expected"; + return null; + }; + + /** + * Creates a LeastInFlight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.LoadBalancingOptions.LeastInFlight} LeastInFlight + */ + LeastInFlight.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.LoadBalancingOptions.LeastInFlight: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.LoadBalancingOptions.LeastInFlight(); + if (object.randomSubsetSize != null) + if ($util.Long) + message.randomSubsetSize = $util.Long.fromValue(object.randomSubsetSize, false); + else if (typeof object.randomSubsetSize === "string") + message.randomSubsetSize = parseInt(object.randomSubsetSize, 10); + else if (typeof object.randomSubsetSize === "number") + message.randomSubsetSize = object.randomSubsetSize; + else if (typeof object.randomSubsetSize === "object") + message.randomSubsetSize = new $util.LongBits(object.randomSubsetSize.low >>> 0, object.randomSubsetSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LeastInFlight message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.LeastInFlight} message LeastInFlight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LeastInFlight.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.randomSubsetSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.randomSubsetSize = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.randomSubsetSize != null && Object.hasOwnProperty.call(message, "randomSubsetSize")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.randomSubsetSize = typeof message.randomSubsetSize === "number" ? BigInt(message.randomSubsetSize) : $util.Long.fromBits(message.randomSubsetSize.low >>> 0, message.randomSubsetSize.high >>> 0, false).toBigInt(); + else if (typeof message.randomSubsetSize === "number") + object.randomSubsetSize = options.longs === String ? String(message.randomSubsetSize) : message.randomSubsetSize; + else + object.randomSubsetSize = options.longs === String ? $util.Long.prototype.toString.call(message.randomSubsetSize) : options.longs === Number ? new $util.LongBits(message.randomSubsetSize.low >>> 0, message.randomSubsetSize.high >>> 0).toNumber() : message.randomSubsetSize; + return object; + }; + + /** + * Converts this LeastInFlight to JSON. + * @function toJSON + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @instance + * @returns {Object.} JSON object + */ + LeastInFlight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LeastInFlight + * @function getTypeUrl + * @memberof google.bigtable.v2.LoadBalancingOptions.LeastInFlight + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LeastInFlight.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.LoadBalancingOptions.LeastInFlight"; + }; + + return LeastInFlight; + })(); + + LoadBalancingOptions.PeakEwma = (function() { + + /** + * Properties of a PeakEwma. + * @memberof google.bigtable.v2.LoadBalancingOptions + * @interface IPeakEwma + * @property {number|Long|null} [randomSubsetSize] PeakEwma randomSubsetSize + */ + + /** + * Constructs a new PeakEwma. + * @memberof google.bigtable.v2.LoadBalancingOptions + * @classdesc Represents a PeakEwma. + * @implements IPeakEwma + * @constructor + * @param {google.bigtable.v2.LoadBalancingOptions.IPeakEwma=} [properties] Properties to set + */ + function PeakEwma(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PeakEwma randomSubsetSize. + * @member {number|Long} randomSubsetSize + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @instance + */ + PeakEwma.prototype.randomSubsetSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PeakEwma instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.IPeakEwma=} [properties] Properties to set + * @returns {google.bigtable.v2.LoadBalancingOptions.PeakEwma} PeakEwma instance + */ + PeakEwma.create = function create(properties) { + return new PeakEwma(properties); + }; + + /** + * Encodes the specified PeakEwma message. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.PeakEwma.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.IPeakEwma} message PeakEwma message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeakEwma.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.randomSubsetSize != null && Object.hasOwnProperty.call(message, "randomSubsetSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.randomSubsetSize); + return writer; + }; + + /** + * Encodes the specified PeakEwma message, length delimited. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.PeakEwma.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.IPeakEwma} message PeakEwma message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeakEwma.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PeakEwma message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.LoadBalancingOptions.PeakEwma} PeakEwma + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeakEwma.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.LoadBalancingOptions.PeakEwma(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.randomSubsetSize = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PeakEwma message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.LoadBalancingOptions.PeakEwma} PeakEwma + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeakEwma.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PeakEwma message. + * @function verify + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PeakEwma.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.randomSubsetSize != null && Object.hasOwnProperty.call(message, "randomSubsetSize")) + if (!$util.isInteger(message.randomSubsetSize) && !(message.randomSubsetSize && $util.isInteger(message.randomSubsetSize.low) && $util.isInteger(message.randomSubsetSize.high))) + return "randomSubsetSize: integer|Long expected"; + return null; + }; + + /** + * Creates a PeakEwma message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.LoadBalancingOptions.PeakEwma} PeakEwma + */ + PeakEwma.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.LoadBalancingOptions.PeakEwma) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.LoadBalancingOptions.PeakEwma: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.LoadBalancingOptions.PeakEwma(); + if (object.randomSubsetSize != null) + if ($util.Long) + message.randomSubsetSize = $util.Long.fromValue(object.randomSubsetSize, false); + else if (typeof object.randomSubsetSize === "string") + message.randomSubsetSize = parseInt(object.randomSubsetSize, 10); + else if (typeof object.randomSubsetSize === "number") + message.randomSubsetSize = object.randomSubsetSize; + else if (typeof object.randomSubsetSize === "object") + message.randomSubsetSize = new $util.LongBits(object.randomSubsetSize.low >>> 0, object.randomSubsetSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PeakEwma message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.PeakEwma} message PeakEwma + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PeakEwma.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.randomSubsetSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.randomSubsetSize = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.randomSubsetSize != null && Object.hasOwnProperty.call(message, "randomSubsetSize")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.randomSubsetSize = typeof message.randomSubsetSize === "number" ? BigInt(message.randomSubsetSize) : $util.Long.fromBits(message.randomSubsetSize.low >>> 0, message.randomSubsetSize.high >>> 0, false).toBigInt(); + else if (typeof message.randomSubsetSize === "number") + object.randomSubsetSize = options.longs === String ? String(message.randomSubsetSize) : message.randomSubsetSize; + else + object.randomSubsetSize = options.longs === String ? $util.Long.prototype.toString.call(message.randomSubsetSize) : options.longs === Number ? new $util.LongBits(message.randomSubsetSize.low >>> 0, message.randomSubsetSize.high >>> 0).toNumber() : message.randomSubsetSize; + return object; + }; + + /** + * Converts this PeakEwma to JSON. + * @function toJSON + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @instance + * @returns {Object.} JSON object + */ + PeakEwma.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PeakEwma + * @function getTypeUrl + * @memberof google.bigtable.v2.LoadBalancingOptions.PeakEwma + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PeakEwma.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.LoadBalancingOptions.PeakEwma"; + }; + + return PeakEwma; + })(); + + LoadBalancingOptions.Random = (function() { + + /** + * Properties of a Random. + * @memberof google.bigtable.v2.LoadBalancingOptions + * @interface IRandom + */ + + /** + * Constructs a new Random. + * @memberof google.bigtable.v2.LoadBalancingOptions + * @classdesc Represents a Random. + * @implements IRandom + * @constructor + * @param {google.bigtable.v2.LoadBalancingOptions.IRandom=} [properties] Properties to set + */ + function Random(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Random instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.IRandom=} [properties] Properties to set + * @returns {google.bigtable.v2.LoadBalancingOptions.Random} Random instance + */ + Random.create = function create(properties) { + return new Random(properties); + }; + + /** + * Encodes the specified Random message. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.Random.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.IRandom} message Random message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Random.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Random message, length delimited. Does not implicitly {@link google.bigtable.v2.LoadBalancingOptions.Random.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.IRandom} message Random message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Random.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Random message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.LoadBalancingOptions.Random} Random + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Random.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.LoadBalancingOptions.Random(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Random message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.LoadBalancingOptions.Random} Random + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Random.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Random message. + * @function verify + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Random.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Random message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.LoadBalancingOptions.Random} Random + */ + Random.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.LoadBalancingOptions.Random) + return object; + return new $root.google.bigtable.v2.LoadBalancingOptions.Random(); + }; + + /** + * Creates a plain object from a Random message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {google.bigtable.v2.LoadBalancingOptions.Random} message Random + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Random.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Random to JSON. + * @function toJSON + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @instance + * @returns {Object.} JSON object + */ + Random.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Random + * @function getTypeUrl + * @memberof google.bigtable.v2.LoadBalancingOptions.Random + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Random.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.LoadBalancingOptions.Random"; + }; + + return Random; + })(); + + return LoadBalancingOptions; + })(); + + v2.SessionClientConfiguration = (function() { + + /** + * Properties of a SessionClientConfiguration. + * @memberof google.bigtable.v2 + * @interface ISessionClientConfiguration + * @property {number|null} [sessionLoad] SessionClientConfiguration sessionLoad + * @property {google.bigtable.v2.ILoadBalancingOptions|null} [loadBalancingOptions] SessionClientConfiguration loadBalancingOptions + * @property {google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration|null} [channelConfiguration] SessionClientConfiguration channelConfiguration + * @property {google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration|null} [sessionPoolConfiguration] SessionClientConfiguration sessionPoolConfiguration + */ + + /** + * Constructs a new SessionClientConfiguration. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionClientConfiguration. + * @implements ISessionClientConfiguration + * @constructor + * @param {google.bigtable.v2.ISessionClientConfiguration=} [properties] Properties to set + */ + function SessionClientConfiguration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionClientConfiguration sessionLoad. + * @member {number} sessionLoad + * @memberof google.bigtable.v2.SessionClientConfiguration + * @instance + */ + SessionClientConfiguration.prototype.sessionLoad = 0; + + /** + * SessionClientConfiguration loadBalancingOptions. + * @member {google.bigtable.v2.ILoadBalancingOptions|null|undefined} loadBalancingOptions + * @memberof google.bigtable.v2.SessionClientConfiguration + * @instance + */ + SessionClientConfiguration.prototype.loadBalancingOptions = null; + + /** + * SessionClientConfiguration channelConfiguration. + * @member {google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration|null|undefined} channelConfiguration + * @memberof google.bigtable.v2.SessionClientConfiguration + * @instance + */ + SessionClientConfiguration.prototype.channelConfiguration = null; + + /** + * SessionClientConfiguration sessionPoolConfiguration. + * @member {google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration|null|undefined} sessionPoolConfiguration + * @memberof google.bigtable.v2.SessionClientConfiguration + * @instance + */ + SessionClientConfiguration.prototype.sessionPoolConfiguration = null; + + /** + * Creates a new SessionClientConfiguration instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {google.bigtable.v2.ISessionClientConfiguration=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionClientConfiguration} SessionClientConfiguration instance + */ + SessionClientConfiguration.create = function create(properties) { + return new SessionClientConfiguration(properties); + }; + + /** + * Encodes the specified SessionClientConfiguration message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {google.bigtable.v2.ISessionClientConfiguration} message SessionClientConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionClientConfiguration.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.sessionLoad != null && Object.hasOwnProperty.call(message, "sessionLoad")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.sessionLoad); + if (message.loadBalancingOptions != null && Object.hasOwnProperty.call(message, "loadBalancingOptions")) + $root.google.bigtable.v2.LoadBalancingOptions.encode(message.loadBalancingOptions, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.channelConfiguration != null && Object.hasOwnProperty.call(message, "channelConfiguration")) + $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.encode(message.channelConfiguration, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.sessionPoolConfiguration != null && Object.hasOwnProperty.call(message, "sessionPoolConfiguration")) + $root.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.encode(message.sessionPoolConfiguration, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionClientConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {google.bigtable.v2.ISessionClientConfiguration} message SessionClientConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionClientConfiguration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionClientConfiguration message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionClientConfiguration} SessionClientConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionClientConfiguration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionClientConfiguration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionLoad = reader.float(); + break; + } + case 2: { + message.loadBalancingOptions = $root.google.bigtable.v2.LoadBalancingOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.channelConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.sessionPoolConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionClientConfiguration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionClientConfiguration} SessionClientConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionClientConfiguration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionClientConfiguration message. + * @function verify + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionClientConfiguration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.sessionLoad != null && Object.hasOwnProperty.call(message, "sessionLoad")) + if (typeof message.sessionLoad !== "number") + return "sessionLoad: number expected"; + if (message.loadBalancingOptions != null && Object.hasOwnProperty.call(message, "loadBalancingOptions")) { + var error = $root.google.bigtable.v2.LoadBalancingOptions.verify(message.loadBalancingOptions, long + 1); + if (error) + return "loadBalancingOptions." + error; + } + if (message.channelConfiguration != null && Object.hasOwnProperty.call(message, "channelConfiguration")) { + var error = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.verify(message.channelConfiguration, long + 1); + if (error) + return "channelConfiguration." + error; + } + if (message.sessionPoolConfiguration != null && Object.hasOwnProperty.call(message, "sessionPoolConfiguration")) { + var error = $root.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.verify(message.sessionPoolConfiguration, long + 1); + if (error) + return "sessionPoolConfiguration." + error; + } + return null; + }; + + /** + * Creates a SessionClientConfiguration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionClientConfiguration} SessionClientConfiguration + */ + SessionClientConfiguration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionClientConfiguration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionClientConfiguration(); + if (object.sessionLoad != null) + message.sessionLoad = Number(object.sessionLoad); + if (object.loadBalancingOptions != null) { + if (!$util.isObject(object.loadBalancingOptions)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.loadBalancingOptions: object expected"); + message.loadBalancingOptions = $root.google.bigtable.v2.LoadBalancingOptions.fromObject(object.loadBalancingOptions, long + 1); + } + if (object.channelConfiguration != null) { + if (!$util.isObject(object.channelConfiguration)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.channelConfiguration: object expected"); + message.channelConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.fromObject(object.channelConfiguration, long + 1); + } + if (object.sessionPoolConfiguration != null) { + if (!$util.isObject(object.sessionPoolConfiguration)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.sessionPoolConfiguration: object expected"); + message.sessionPoolConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.fromObject(object.sessionPoolConfiguration, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SessionClientConfiguration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration} message SessionClientConfiguration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionClientConfiguration.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.sessionLoad = 0; + object.loadBalancingOptions = null; + object.channelConfiguration = null; + object.sessionPoolConfiguration = null; + } + if (message.sessionLoad != null && Object.hasOwnProperty.call(message, "sessionLoad")) + object.sessionLoad = options.json && !isFinite(message.sessionLoad) ? String(message.sessionLoad) : message.sessionLoad; + if (message.loadBalancingOptions != null && Object.hasOwnProperty.call(message, "loadBalancingOptions")) + object.loadBalancingOptions = $root.google.bigtable.v2.LoadBalancingOptions.toObject(message.loadBalancingOptions, options, q + 1); + if (message.channelConfiguration != null && Object.hasOwnProperty.call(message, "channelConfiguration")) + object.channelConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.toObject(message.channelConfiguration, options, q + 1); + if (message.sessionPoolConfiguration != null && Object.hasOwnProperty.call(message, "sessionPoolConfiguration")) + object.sessionPoolConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.toObject(message.sessionPoolConfiguration, options, q + 1); + return object; + }; + + /** + * Converts this SessionClientConfiguration to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionClientConfiguration + * @instance + * @returns {Object.} JSON object + */ + SessionClientConfiguration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionClientConfiguration + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionClientConfiguration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionClientConfiguration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionClientConfiguration"; + }; + + SessionClientConfiguration.ChannelPoolConfiguration = (function() { + + /** + * Properties of a ChannelPoolConfiguration. + * @memberof google.bigtable.v2.SessionClientConfiguration + * @interface IChannelPoolConfiguration + * @property {number|null} [minServerCount] ChannelPoolConfiguration minServerCount + * @property {number|null} [maxServerCount] ChannelPoolConfiguration maxServerCount + * @property {number|null} [perServerSessionCount] ChannelPoolConfiguration perServerSessionCount + * @property {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback|null} [directAccessWithFallback] ChannelPoolConfiguration directAccessWithFallback + * @property {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly|null} [directAccessOnly] ChannelPoolConfiguration directAccessOnly + * @property {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly|null} [cloudPathOnly] ChannelPoolConfiguration cloudPathOnly + */ + + /** + * Constructs a new ChannelPoolConfiguration. + * @memberof google.bigtable.v2.SessionClientConfiguration + * @classdesc Represents a ChannelPoolConfiguration. + * @implements IChannelPoolConfiguration + * @constructor + * @param {google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration=} [properties] Properties to set + */ + function ChannelPoolConfiguration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChannelPoolConfiguration minServerCount. + * @member {number} minServerCount + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @instance + */ + ChannelPoolConfiguration.prototype.minServerCount = 0; + + /** + * ChannelPoolConfiguration maxServerCount. + * @member {number} maxServerCount + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @instance + */ + ChannelPoolConfiguration.prototype.maxServerCount = 0; + + /** + * ChannelPoolConfiguration perServerSessionCount. + * @member {number} perServerSessionCount + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @instance + */ + ChannelPoolConfiguration.prototype.perServerSessionCount = 0; + + /** + * ChannelPoolConfiguration directAccessWithFallback. + * @member {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback|null|undefined} directAccessWithFallback + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @instance + */ + ChannelPoolConfiguration.prototype.directAccessWithFallback = null; + + /** + * ChannelPoolConfiguration directAccessOnly. + * @member {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly|null|undefined} directAccessOnly + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @instance + */ + ChannelPoolConfiguration.prototype.directAccessOnly = null; + + /** + * ChannelPoolConfiguration cloudPathOnly. + * @member {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly|null|undefined} cloudPathOnly + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @instance + */ + ChannelPoolConfiguration.prototype.cloudPathOnly = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChannelPoolConfiguration mode. + * @member {"directAccessWithFallback"|"directAccessOnly"|"cloudPathOnly"|undefined} mode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @instance + */ + Object.defineProperty(ChannelPoolConfiguration.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["directAccessWithFallback", "directAccessOnly", "cloudPathOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChannelPoolConfiguration instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration} ChannelPoolConfiguration instance + */ + ChannelPoolConfiguration.create = function create(properties) { + return new ChannelPoolConfiguration(properties); + }; + + /** + * Encodes the specified ChannelPoolConfiguration message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration} message ChannelPoolConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChannelPoolConfiguration.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.minServerCount != null && Object.hasOwnProperty.call(message, "minServerCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minServerCount); + if (message.maxServerCount != null && Object.hasOwnProperty.call(message, "maxServerCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxServerCount); + if (message.perServerSessionCount != null && Object.hasOwnProperty.call(message, "perServerSessionCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.perServerSessionCount); + if (message.directAccessWithFallback != null && Object.hasOwnProperty.call(message, "directAccessWithFallback")) + $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.encode(message.directAccessWithFallback, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.directAccessOnly != null && Object.hasOwnProperty.call(message, "directAccessOnly")) + $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.encode(message.directAccessOnly, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.cloudPathOnly != null && Object.hasOwnProperty.call(message, "cloudPathOnly")) + $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.encode(message.cloudPathOnly, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChannelPoolConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.IChannelPoolConfiguration} message ChannelPoolConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChannelPoolConfiguration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ChannelPoolConfiguration message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration} ChannelPoolConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChannelPoolConfiguration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.minServerCount = reader.int32(); + break; + } + case 2: { + message.maxServerCount = reader.int32(); + break; + } + case 3: { + message.perServerSessionCount = reader.int32(); + break; + } + case 4: { + message.directAccessWithFallback = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.directAccessOnly = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.cloudPathOnly = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ChannelPoolConfiguration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration} ChannelPoolConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChannelPoolConfiguration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChannelPoolConfiguration message. + * @function verify + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChannelPoolConfiguration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.minServerCount != null && Object.hasOwnProperty.call(message, "minServerCount")) + if (!$util.isInteger(message.minServerCount)) + return "minServerCount: integer expected"; + if (message.maxServerCount != null && Object.hasOwnProperty.call(message, "maxServerCount")) + if (!$util.isInteger(message.maxServerCount)) + return "maxServerCount: integer expected"; + if (message.perServerSessionCount != null && Object.hasOwnProperty.call(message, "perServerSessionCount")) + if (!$util.isInteger(message.perServerSessionCount)) + return "perServerSessionCount: integer expected"; + if (message.directAccessWithFallback != null && Object.hasOwnProperty.call(message, "directAccessWithFallback")) { + properties.mode = 1; + { + var error = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.verify(message.directAccessWithFallback, long + 1); + if (error) + return "directAccessWithFallback." + error; + } + } + if (message.directAccessOnly != null && Object.hasOwnProperty.call(message, "directAccessOnly")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.verify(message.directAccessOnly, long + 1); + if (error) + return "directAccessOnly." + error; + } + } + if (message.cloudPathOnly != null && Object.hasOwnProperty.call(message, "cloudPathOnly")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.verify(message.cloudPathOnly, long + 1); + if (error) + return "cloudPathOnly." + error; + } + } + return null; + }; + + /** + * Creates a ChannelPoolConfiguration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration} ChannelPoolConfiguration + */ + ChannelPoolConfiguration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration(); + if (object.minServerCount != null) + message.minServerCount = object.minServerCount | 0; + if (object.maxServerCount != null) + message.maxServerCount = object.maxServerCount | 0; + if (object.perServerSessionCount != null) + message.perServerSessionCount = object.perServerSessionCount | 0; + if (object.directAccessWithFallback != null) { + if (!$util.isObject(object.directAccessWithFallback)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.directAccessWithFallback: object expected"); + message.directAccessWithFallback = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.fromObject(object.directAccessWithFallback, long + 1); + } + if (object.directAccessOnly != null) { + if (!$util.isObject(object.directAccessOnly)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.directAccessOnly: object expected"); + message.directAccessOnly = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.fromObject(object.directAccessOnly, long + 1); + } + if (object.cloudPathOnly != null) { + if (!$util.isObject(object.cloudPathOnly)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.cloudPathOnly: object expected"); + message.cloudPathOnly = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.fromObject(object.cloudPathOnly, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ChannelPoolConfiguration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration} message ChannelPoolConfiguration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChannelPoolConfiguration.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.minServerCount = 0; + object.maxServerCount = 0; + object.perServerSessionCount = 0; + } + if (message.minServerCount != null && Object.hasOwnProperty.call(message, "minServerCount")) + object.minServerCount = message.minServerCount; + if (message.maxServerCount != null && Object.hasOwnProperty.call(message, "maxServerCount")) + object.maxServerCount = message.maxServerCount; + if (message.perServerSessionCount != null && Object.hasOwnProperty.call(message, "perServerSessionCount")) + object.perServerSessionCount = message.perServerSessionCount; + if (message.directAccessWithFallback != null && Object.hasOwnProperty.call(message, "directAccessWithFallback")) { + object.directAccessWithFallback = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.toObject(message.directAccessWithFallback, options, q + 1); + if (options.oneofs) + object.mode = "directAccessWithFallback"; + } + if (message.directAccessOnly != null && Object.hasOwnProperty.call(message, "directAccessOnly")) { + object.directAccessOnly = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.toObject(message.directAccessOnly, options, q + 1); + if (options.oneofs) + object.mode = "directAccessOnly"; + } + if (message.cloudPathOnly != null && Object.hasOwnProperty.call(message, "cloudPathOnly")) { + object.cloudPathOnly = $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.toObject(message.cloudPathOnly, options, q + 1); + if (options.oneofs) + object.mode = "cloudPathOnly"; + } + return object; + }; + + /** + * Converts this ChannelPoolConfiguration to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @instance + * @returns {Object.} JSON object + */ + ChannelPoolConfiguration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChannelPoolConfiguration + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChannelPoolConfiguration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration"; + }; + + ChannelPoolConfiguration.DirectAccessWithFallback = (function() { + + /** + * Properties of a DirectAccessWithFallback. + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @interface IDirectAccessWithFallback + * @property {number|null} [errorRateThreshold] DirectAccessWithFallback errorRateThreshold + * @property {google.protobuf.IDuration|null} [checkInterval] DirectAccessWithFallback checkInterval + */ + + /** + * Constructs a new DirectAccessWithFallback. + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @classdesc Represents a DirectAccessWithFallback. + * @implements IDirectAccessWithFallback + * @constructor + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback=} [properties] Properties to set + */ + function DirectAccessWithFallback(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DirectAccessWithFallback errorRateThreshold. + * @member {number} errorRateThreshold + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @instance + */ + DirectAccessWithFallback.prototype.errorRateThreshold = 0; + + /** + * DirectAccessWithFallback checkInterval. + * @member {google.protobuf.IDuration|null|undefined} checkInterval + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @instance + */ + DirectAccessWithFallback.prototype.checkInterval = null; + + /** + * Creates a new DirectAccessWithFallback instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback} DirectAccessWithFallback instance + */ + DirectAccessWithFallback.create = function create(properties) { + return new DirectAccessWithFallback(properties); + }; + + /** + * Encodes the specified DirectAccessWithFallback message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback} message DirectAccessWithFallback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectAccessWithFallback.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.errorRateThreshold != null && Object.hasOwnProperty.call(message, "errorRateThreshold")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.errorRateThreshold); + if (message.checkInterval != null && Object.hasOwnProperty.call(message, "checkInterval")) + $root.google.protobuf.Duration.encode(message.checkInterval, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified DirectAccessWithFallback message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessWithFallback} message DirectAccessWithFallback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectAccessWithFallback.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DirectAccessWithFallback message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback} DirectAccessWithFallback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectAccessWithFallback.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.errorRateThreshold = reader.float(); + break; + } + case 2: { + message.checkInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DirectAccessWithFallback message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback} DirectAccessWithFallback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectAccessWithFallback.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DirectAccessWithFallback message. + * @function verify + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DirectAccessWithFallback.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.errorRateThreshold != null && Object.hasOwnProperty.call(message, "errorRateThreshold")) + if (typeof message.errorRateThreshold !== "number") + return "errorRateThreshold: number expected"; + if (message.checkInterval != null && Object.hasOwnProperty.call(message, "checkInterval")) { + var error = $root.google.protobuf.Duration.verify(message.checkInterval, long + 1); + if (error) + return "checkInterval." + error; + } + return null; + }; + + /** + * Creates a DirectAccessWithFallback message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback} DirectAccessWithFallback + */ + DirectAccessWithFallback.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback(); + if (object.errorRateThreshold != null) + message.errorRateThreshold = Number(object.errorRateThreshold); + if (object.checkInterval != null) { + if (!$util.isObject(object.checkInterval)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.checkInterval: object expected"); + message.checkInterval = $root.google.protobuf.Duration.fromObject(object.checkInterval, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DirectAccessWithFallback message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback} message DirectAccessWithFallback + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DirectAccessWithFallback.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.errorRateThreshold = 0; + object.checkInterval = null; + } + if (message.errorRateThreshold != null && Object.hasOwnProperty.call(message, "errorRateThreshold")) + object.errorRateThreshold = options.json && !isFinite(message.errorRateThreshold) ? String(message.errorRateThreshold) : message.errorRateThreshold; + if (message.checkInterval != null && Object.hasOwnProperty.call(message, "checkInterval")) + object.checkInterval = $root.google.protobuf.Duration.toObject(message.checkInterval, options, q + 1); + return object; + }; + + /** + * Converts this DirectAccessWithFallback to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @instance + * @returns {Object.} JSON object + */ + DirectAccessWithFallback.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DirectAccessWithFallback + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DirectAccessWithFallback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback"; + }; + + return DirectAccessWithFallback; + })(); + + ChannelPoolConfiguration.DirectAccessOnly = (function() { + + /** + * Properties of a DirectAccessOnly. + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @interface IDirectAccessOnly + */ + + /** + * Constructs a new DirectAccessOnly. + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @classdesc Represents a DirectAccessOnly. + * @implements IDirectAccessOnly + * @constructor + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly=} [properties] Properties to set + */ + function DirectAccessOnly(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new DirectAccessOnly instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly} DirectAccessOnly instance + */ + DirectAccessOnly.create = function create(properties) { + return new DirectAccessOnly(properties); + }; + + /** + * Encodes the specified DirectAccessOnly message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly} message DirectAccessOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectAccessOnly.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified DirectAccessOnly message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.IDirectAccessOnly} message DirectAccessOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectAccessOnly.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DirectAccessOnly message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly} DirectAccessOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectAccessOnly.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DirectAccessOnly message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly} DirectAccessOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectAccessOnly.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DirectAccessOnly message. + * @function verify + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DirectAccessOnly.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a DirectAccessOnly message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly} DirectAccessOnly + */ + DirectAccessOnly.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly) + return object; + return new $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly(); + }; + + /** + * Creates a plain object from a DirectAccessOnly message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly} message DirectAccessOnly + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DirectAccessOnly.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DirectAccessOnly to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @instance + * @returns {Object.} JSON object + */ + DirectAccessOnly.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DirectAccessOnly + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DirectAccessOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly"; + }; + + return DirectAccessOnly; + })(); + + ChannelPoolConfiguration.CloudPathOnly = (function() { + + /** + * Properties of a CloudPathOnly. + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @interface ICloudPathOnly + */ + + /** + * Constructs a new CloudPathOnly. + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + * @classdesc Represents a CloudPathOnly. + * @implements ICloudPathOnly + * @constructor + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly=} [properties] Properties to set + */ + function CloudPathOnly(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new CloudPathOnly instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly} CloudPathOnly instance + */ + CloudPathOnly.create = function create(properties) { + return new CloudPathOnly(properties); + }; + + /** + * Encodes the specified CloudPathOnly message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly} message CloudPathOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudPathOnly.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified CloudPathOnly message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ICloudPathOnly} message CloudPathOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudPathOnly.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CloudPathOnly message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly} CloudPathOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudPathOnly.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudPathOnly message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly} CloudPathOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudPathOnly.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudPathOnly message. + * @function verify + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudPathOnly.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a CloudPathOnly message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly} CloudPathOnly + */ + CloudPathOnly.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly) + return object; + return new $root.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly(); + }; + + /** + * Creates a plain object from a CloudPathOnly message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly} message CloudPathOnly + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudPathOnly.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CloudPathOnly to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @instance + * @returns {Object.} JSON object + */ + CloudPathOnly.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudPathOnly + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudPathOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly"; + }; + + return CloudPathOnly; + })(); + + return ChannelPoolConfiguration; + })(); + + SessionClientConfiguration.SessionPoolConfiguration = (function() { + + /** + * Properties of a SessionPoolConfiguration. + * @memberof google.bigtable.v2.SessionClientConfiguration + * @interface ISessionPoolConfiguration + * @property {number|null} [headroom] SessionPoolConfiguration headroom + * @property {number|null} [minSessionCount] SessionPoolConfiguration minSessionCount + * @property {number|null} [maxSessionCount] SessionPoolConfiguration maxSessionCount + * @property {number|null} [newSessionQueueLength] SessionPoolConfiguration newSessionQueueLength + * @property {number|null} [newSessionCreationBudget] SessionPoolConfiguration newSessionCreationBudget + * @property {google.protobuf.IDuration|null} [newSessionCreationPenalty] SessionPoolConfiguration newSessionCreationPenalty + * @property {number|null} [consecutiveSessionFailureThreshold] SessionPoolConfiguration consecutiveSessionFailureThreshold + * @property {google.bigtable.v2.ILoadBalancingOptions|null} [loadBalancingOptions] SessionPoolConfiguration loadBalancingOptions + */ + + /** + * Constructs a new SessionPoolConfiguration. + * @memberof google.bigtable.v2.SessionClientConfiguration + * @classdesc Represents a SessionPoolConfiguration. + * @implements ISessionPoolConfiguration + * @constructor + * @param {google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration=} [properties] Properties to set + */ + function SessionPoolConfiguration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionPoolConfiguration headroom. + * @member {number} headroom + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + */ + SessionPoolConfiguration.prototype.headroom = 0; + + /** + * SessionPoolConfiguration minSessionCount. + * @member {number} minSessionCount + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + */ + SessionPoolConfiguration.prototype.minSessionCount = 0; + + /** + * SessionPoolConfiguration maxSessionCount. + * @member {number} maxSessionCount + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + */ + SessionPoolConfiguration.prototype.maxSessionCount = 0; + + /** + * SessionPoolConfiguration newSessionQueueLength. + * @member {number} newSessionQueueLength + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + */ + SessionPoolConfiguration.prototype.newSessionQueueLength = 0; + + /** + * SessionPoolConfiguration newSessionCreationBudget. + * @member {number} newSessionCreationBudget + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + */ + SessionPoolConfiguration.prototype.newSessionCreationBudget = 0; + + /** + * SessionPoolConfiguration newSessionCreationPenalty. + * @member {google.protobuf.IDuration|null|undefined} newSessionCreationPenalty + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + */ + SessionPoolConfiguration.prototype.newSessionCreationPenalty = null; + + /** + * SessionPoolConfiguration consecutiveSessionFailureThreshold. + * @member {number} consecutiveSessionFailureThreshold + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + */ + SessionPoolConfiguration.prototype.consecutiveSessionFailureThreshold = 0; + + /** + * SessionPoolConfiguration loadBalancingOptions. + * @member {google.bigtable.v2.ILoadBalancingOptions|null|undefined} loadBalancingOptions + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + */ + SessionPoolConfiguration.prototype.loadBalancingOptions = null; + + /** + * Creates a new SessionPoolConfiguration instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration} SessionPoolConfiguration instance + */ + SessionPoolConfiguration.create = function create(properties) { + return new SessionPoolConfiguration(properties); + }; + + /** + * Encodes the specified SessionPoolConfiguration message. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration} message SessionPoolConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionPoolConfiguration.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.headroom != null && Object.hasOwnProperty.call(message, "headroom")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.headroom); + if (message.minSessionCount != null && Object.hasOwnProperty.call(message, "minSessionCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minSessionCount); + if (message.maxSessionCount != null && Object.hasOwnProperty.call(message, "maxSessionCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxSessionCount); + if (message.newSessionQueueLength != null && Object.hasOwnProperty.call(message, "newSessionQueueLength")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.newSessionQueueLength); + if (message.newSessionCreationBudget != null && Object.hasOwnProperty.call(message, "newSessionCreationBudget")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.newSessionCreationBudget); + if (message.newSessionCreationPenalty != null && Object.hasOwnProperty.call(message, "newSessionCreationPenalty")) + $root.google.protobuf.Duration.encode(message.newSessionCreationPenalty, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.consecutiveSessionFailureThreshold != null && Object.hasOwnProperty.call(message, "consecutiveSessionFailureThreshold")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.consecutiveSessionFailureThreshold); + if (message.loadBalancingOptions != null && Object.hasOwnProperty.call(message, "loadBalancingOptions")) + $root.google.bigtable.v2.LoadBalancingOptions.encode(message.loadBalancingOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionPoolConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.ISessionPoolConfiguration} message SessionPoolConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionPoolConfiguration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionPoolConfiguration message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration} SessionPoolConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionPoolConfiguration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.headroom = reader.float(); + break; + } + case 2: { + message.minSessionCount = reader.int32(); + break; + } + case 3: { + message.maxSessionCount = reader.int32(); + break; + } + case 4: { + message.newSessionQueueLength = reader.int32(); + break; + } + case 5: { + message.newSessionCreationBudget = reader.int32(); + break; + } + case 6: { + message.newSessionCreationPenalty = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.consecutiveSessionFailureThreshold = reader.int32(); + break; + } + case 9: { + message.loadBalancingOptions = $root.google.bigtable.v2.LoadBalancingOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionPoolConfiguration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration} SessionPoolConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionPoolConfiguration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionPoolConfiguration message. + * @function verify + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionPoolConfiguration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.headroom != null && Object.hasOwnProperty.call(message, "headroom")) + if (typeof message.headroom !== "number") + return "headroom: number expected"; + if (message.minSessionCount != null && Object.hasOwnProperty.call(message, "minSessionCount")) + if (!$util.isInteger(message.minSessionCount)) + return "minSessionCount: integer expected"; + if (message.maxSessionCount != null && Object.hasOwnProperty.call(message, "maxSessionCount")) + if (!$util.isInteger(message.maxSessionCount)) + return "maxSessionCount: integer expected"; + if (message.newSessionQueueLength != null && Object.hasOwnProperty.call(message, "newSessionQueueLength")) + if (!$util.isInteger(message.newSessionQueueLength)) + return "newSessionQueueLength: integer expected"; + if (message.newSessionCreationBudget != null && Object.hasOwnProperty.call(message, "newSessionCreationBudget")) + if (!$util.isInteger(message.newSessionCreationBudget)) + return "newSessionCreationBudget: integer expected"; + if (message.newSessionCreationPenalty != null && Object.hasOwnProperty.call(message, "newSessionCreationPenalty")) { + var error = $root.google.protobuf.Duration.verify(message.newSessionCreationPenalty, long + 1); + if (error) + return "newSessionCreationPenalty." + error; + } + if (message.consecutiveSessionFailureThreshold != null && Object.hasOwnProperty.call(message, "consecutiveSessionFailureThreshold")) + if (!$util.isInteger(message.consecutiveSessionFailureThreshold)) + return "consecutiveSessionFailureThreshold: integer expected"; + if (message.loadBalancingOptions != null && Object.hasOwnProperty.call(message, "loadBalancingOptions")) { + var error = $root.google.bigtable.v2.LoadBalancingOptions.verify(message.loadBalancingOptions, long + 1); + if (error) + return "loadBalancingOptions." + error; + } + return null; + }; + + /** + * Creates a SessionPoolConfiguration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration} SessionPoolConfiguration + */ + SessionPoolConfiguration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration(); + if (object.headroom != null) + message.headroom = Number(object.headroom); + if (object.minSessionCount != null) + message.minSessionCount = object.minSessionCount | 0; + if (object.maxSessionCount != null) + message.maxSessionCount = object.maxSessionCount | 0; + if (object.newSessionQueueLength != null) + message.newSessionQueueLength = object.newSessionQueueLength | 0; + if (object.newSessionCreationBudget != null) + message.newSessionCreationBudget = object.newSessionCreationBudget | 0; + if (object.newSessionCreationPenalty != null) { + if (!$util.isObject(object.newSessionCreationPenalty)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.newSessionCreationPenalty: object expected"); + message.newSessionCreationPenalty = $root.google.protobuf.Duration.fromObject(object.newSessionCreationPenalty, long + 1); + } + if (object.consecutiveSessionFailureThreshold != null) + message.consecutiveSessionFailureThreshold = object.consecutiveSessionFailureThreshold | 0; + if (object.loadBalancingOptions != null) { + if (!$util.isObject(object.loadBalancingOptions)) + throw TypeError(".google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.loadBalancingOptions: object expected"); + message.loadBalancingOptions = $root.google.bigtable.v2.LoadBalancingOptions.fromObject(object.loadBalancingOptions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SessionPoolConfiguration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration} message SessionPoolConfiguration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionPoolConfiguration.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.headroom = 0; + object.minSessionCount = 0; + object.maxSessionCount = 0; + object.newSessionQueueLength = 0; + object.newSessionCreationBudget = 0; + object.newSessionCreationPenalty = null; + object.consecutiveSessionFailureThreshold = 0; + object.loadBalancingOptions = null; + } + if (message.headroom != null && Object.hasOwnProperty.call(message, "headroom")) + object.headroom = options.json && !isFinite(message.headroom) ? String(message.headroom) : message.headroom; + if (message.minSessionCount != null && Object.hasOwnProperty.call(message, "minSessionCount")) + object.minSessionCount = message.minSessionCount; + if (message.maxSessionCount != null && Object.hasOwnProperty.call(message, "maxSessionCount")) + object.maxSessionCount = message.maxSessionCount; + if (message.newSessionQueueLength != null && Object.hasOwnProperty.call(message, "newSessionQueueLength")) + object.newSessionQueueLength = message.newSessionQueueLength; + if (message.newSessionCreationBudget != null && Object.hasOwnProperty.call(message, "newSessionCreationBudget")) + object.newSessionCreationBudget = message.newSessionCreationBudget; + if (message.newSessionCreationPenalty != null && Object.hasOwnProperty.call(message, "newSessionCreationPenalty")) + object.newSessionCreationPenalty = $root.google.protobuf.Duration.toObject(message.newSessionCreationPenalty, options, q + 1); + if (message.consecutiveSessionFailureThreshold != null && Object.hasOwnProperty.call(message, "consecutiveSessionFailureThreshold")) + object.consecutiveSessionFailureThreshold = message.consecutiveSessionFailureThreshold; + if (message.loadBalancingOptions != null && Object.hasOwnProperty.call(message, "loadBalancingOptions")) + object.loadBalancingOptions = $root.google.bigtable.v2.LoadBalancingOptions.toObject(message.loadBalancingOptions, options, q + 1); + return object; + }; + + /** + * Converts this SessionPoolConfiguration to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @instance + * @returns {Object.} JSON object + */ + SessionPoolConfiguration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionPoolConfiguration + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionPoolConfiguration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration"; + }; + + return SessionPoolConfiguration; + })(); + + return SessionClientConfiguration; + })(); + + v2.TelemetryConfiguration = (function() { + + /** + * Properties of a TelemetryConfiguration. + * @memberof google.bigtable.v2 + * @interface ITelemetryConfiguration + * @property {google.bigtable.v2.TelemetryConfiguration.Level|null} [debugTagLevel] TelemetryConfiguration debugTagLevel + */ + + /** + * Constructs a new TelemetryConfiguration. + * @memberof google.bigtable.v2 + * @classdesc Represents a TelemetryConfiguration. + * @implements ITelemetryConfiguration + * @constructor + * @param {google.bigtable.v2.ITelemetryConfiguration=} [properties] Properties to set + */ + function TelemetryConfiguration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TelemetryConfiguration debugTagLevel. + * @member {google.bigtable.v2.TelemetryConfiguration.Level} debugTagLevel + * @memberof google.bigtable.v2.TelemetryConfiguration + * @instance + */ + TelemetryConfiguration.prototype.debugTagLevel = 0; + + /** + * Creates a new TelemetryConfiguration instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {google.bigtable.v2.ITelemetryConfiguration=} [properties] Properties to set + * @returns {google.bigtable.v2.TelemetryConfiguration} TelemetryConfiguration instance + */ + TelemetryConfiguration.create = function create(properties) { + return new TelemetryConfiguration(properties); + }; + + /** + * Encodes the specified TelemetryConfiguration message. Does not implicitly {@link google.bigtable.v2.TelemetryConfiguration.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {google.bigtable.v2.ITelemetryConfiguration} message TelemetryConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelemetryConfiguration.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.debugTagLevel != null && Object.hasOwnProperty.call(message, "debugTagLevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.debugTagLevel); + return writer; + }; + + /** + * Encodes the specified TelemetryConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.TelemetryConfiguration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {google.bigtable.v2.ITelemetryConfiguration} message TelemetryConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelemetryConfiguration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TelemetryConfiguration message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.TelemetryConfiguration} TelemetryConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelemetryConfiguration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.TelemetryConfiguration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.debugTagLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TelemetryConfiguration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.TelemetryConfiguration} TelemetryConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelemetryConfiguration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TelemetryConfiguration message. + * @function verify + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TelemetryConfiguration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.debugTagLevel != null && Object.hasOwnProperty.call(message, "debugTagLevel")) + switch (message.debugTagLevel) { + default: + return "debugTagLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a TelemetryConfiguration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.TelemetryConfiguration} TelemetryConfiguration + */ + TelemetryConfiguration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.TelemetryConfiguration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.TelemetryConfiguration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.TelemetryConfiguration(); + switch (object.debugTagLevel) { + default: + if (typeof object.debugTagLevel === "number") { + message.debugTagLevel = object.debugTagLevel; + break; + } + break; + case "LEVEL_UNSPECIFIED": + case 0: + message.debugTagLevel = 0; + break; + case "DEBUG": + case 1: + message.debugTagLevel = 1; + break; + case "INFO": + case 2: + message.debugTagLevel = 2; + break; + case "WARN": + case 3: + message.debugTagLevel = 3; + break; + case "ERROR": + case 4: + message.debugTagLevel = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a TelemetryConfiguration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {google.bigtable.v2.TelemetryConfiguration} message TelemetryConfiguration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TelemetryConfiguration.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.debugTagLevel = options.enums === String ? "LEVEL_UNSPECIFIED" : 0; + if (message.debugTagLevel != null && Object.hasOwnProperty.call(message, "debugTagLevel")) + object.debugTagLevel = options.enums === String ? $root.google.bigtable.v2.TelemetryConfiguration.Level[message.debugTagLevel] === undefined ? message.debugTagLevel : $root.google.bigtable.v2.TelemetryConfiguration.Level[message.debugTagLevel] : message.debugTagLevel; + return object; + }; + + /** + * Converts this TelemetryConfiguration to JSON. + * @function toJSON + * @memberof google.bigtable.v2.TelemetryConfiguration + * @instance + * @returns {Object.} JSON object + */ + TelemetryConfiguration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TelemetryConfiguration + * @function getTypeUrl + * @memberof google.bigtable.v2.TelemetryConfiguration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TelemetryConfiguration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.TelemetryConfiguration"; + }; + + /** + * Level enum. + * @name google.bigtable.v2.TelemetryConfiguration.Level + * @enum {number} + * @property {number} LEVEL_UNSPECIFIED=0 LEVEL_UNSPECIFIED value + * @property {number} DEBUG=1 DEBUG value + * @property {number} INFO=2 INFO value + * @property {number} WARN=3 WARN value + * @property {number} ERROR=4 ERROR value + */ + TelemetryConfiguration.Level = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEBUG"] = 1; + values[valuesById[2] = "INFO"] = 2; + values[valuesById[3] = "WARN"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return TelemetryConfiguration; + })(); + + v2.ClientConfiguration = (function() { + + /** + * Properties of a ClientConfiguration. + * @memberof google.bigtable.v2 + * @interface IClientConfiguration + * @property {google.bigtable.v2.ISessionClientConfiguration|null} [sessionConfiguration] ClientConfiguration sessionConfiguration + * @property {boolean|null} [stopPolling] ClientConfiguration stopPolling + * @property {google.protobuf.IDuration|null} [pollingInterval] ClientConfiguration pollingInterval + * @property {google.bigtable.v2.ClientConfiguration.IPollingConfiguration|null} [pollingConfiguration] ClientConfiguration pollingConfiguration + * @property {google.bigtable.v2.ITelemetryConfiguration|null} [telemetryConfiguration] ClientConfiguration telemetryConfiguration + */ + + /** + * Constructs a new ClientConfiguration. + * @memberof google.bigtable.v2 + * @classdesc Represents a ClientConfiguration. + * @implements IClientConfiguration + * @constructor + * @param {google.bigtable.v2.IClientConfiguration=} [properties] Properties to set + */ + function ClientConfiguration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientConfiguration sessionConfiguration. + * @member {google.bigtable.v2.ISessionClientConfiguration|null|undefined} sessionConfiguration + * @memberof google.bigtable.v2.ClientConfiguration + * @instance + */ + ClientConfiguration.prototype.sessionConfiguration = null; + + /** + * ClientConfiguration stopPolling. + * @member {boolean|null|undefined} stopPolling + * @memberof google.bigtable.v2.ClientConfiguration + * @instance + */ + ClientConfiguration.prototype.stopPolling = null; + + /** + * ClientConfiguration pollingInterval. + * @member {google.protobuf.IDuration|null|undefined} pollingInterval + * @memberof google.bigtable.v2.ClientConfiguration + * @instance + */ + ClientConfiguration.prototype.pollingInterval = null; + + /** + * ClientConfiguration pollingConfiguration. + * @member {google.bigtable.v2.ClientConfiguration.IPollingConfiguration|null|undefined} pollingConfiguration + * @memberof google.bigtable.v2.ClientConfiguration + * @instance + */ + ClientConfiguration.prototype.pollingConfiguration = null; + + /** + * ClientConfiguration telemetryConfiguration. + * @member {google.bigtable.v2.ITelemetryConfiguration|null|undefined} telemetryConfiguration + * @memberof google.bigtable.v2.ClientConfiguration + * @instance + */ + ClientConfiguration.prototype.telemetryConfiguration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ClientConfiguration polling. + * @member {"stopPolling"|"pollingInterval"|"pollingConfiguration"|undefined} polling + * @memberof google.bigtable.v2.ClientConfiguration + * @instance + */ + Object.defineProperty(ClientConfiguration.prototype, "polling", { + get: $util.oneOfGetter($oneOfFields = ["stopPolling", "pollingInterval", "pollingConfiguration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ClientConfiguration instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {google.bigtable.v2.IClientConfiguration=} [properties] Properties to set + * @returns {google.bigtable.v2.ClientConfiguration} ClientConfiguration instance + */ + ClientConfiguration.create = function create(properties) { + return new ClientConfiguration(properties); + }; + + /** + * Encodes the specified ClientConfiguration message. Does not implicitly {@link google.bigtable.v2.ClientConfiguration.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {google.bigtable.v2.IClientConfiguration} message ClientConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientConfiguration.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.sessionConfiguration != null && Object.hasOwnProperty.call(message, "sessionConfiguration")) + $root.google.bigtable.v2.SessionClientConfiguration.encode(message.sessionConfiguration, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.stopPolling != null && Object.hasOwnProperty.call(message, "stopPolling")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.stopPolling); + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) + $root.google.protobuf.Duration.encode(message.pollingInterval, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.pollingConfiguration != null && Object.hasOwnProperty.call(message, "pollingConfiguration")) + $root.google.bigtable.v2.ClientConfiguration.PollingConfiguration.encode(message.pollingConfiguration, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.telemetryConfiguration != null && Object.hasOwnProperty.call(message, "telemetryConfiguration")) + $root.google.bigtable.v2.TelemetryConfiguration.encode(message.telemetryConfiguration, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.ClientConfiguration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {google.bigtable.v2.IClientConfiguration} message ClientConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientConfiguration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ClientConfiguration message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ClientConfiguration} ClientConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientConfiguration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ClientConfiguration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.sessionConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.stopPolling = reader.bool(); + break; + } + case 4: { + message.pollingInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.pollingConfiguration = $root.google.bigtable.v2.ClientConfiguration.PollingConfiguration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.telemetryConfiguration = $root.google.bigtable.v2.TelemetryConfiguration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ClientConfiguration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ClientConfiguration} ClientConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientConfiguration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientConfiguration message. + * @function verify + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientConfiguration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.sessionConfiguration != null && Object.hasOwnProperty.call(message, "sessionConfiguration")) { + var error = $root.google.bigtable.v2.SessionClientConfiguration.verify(message.sessionConfiguration, long + 1); + if (error) + return "sessionConfiguration." + error; + } + if (message.stopPolling != null && Object.hasOwnProperty.call(message, "stopPolling")) { + properties.polling = 1; + if (typeof message.stopPolling !== "boolean") + return "stopPolling: boolean expected"; + } + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) { + if (properties.polling === 1) + return "polling: multiple values"; + properties.polling = 1; + { + var error = $root.google.protobuf.Duration.verify(message.pollingInterval, long + 1); + if (error) + return "pollingInterval." + error; + } + } + if (message.pollingConfiguration != null && Object.hasOwnProperty.call(message, "pollingConfiguration")) { + if (properties.polling === 1) + return "polling: multiple values"; + properties.polling = 1; + { + var error = $root.google.bigtable.v2.ClientConfiguration.PollingConfiguration.verify(message.pollingConfiguration, long + 1); + if (error) + return "pollingConfiguration." + error; + } + } + if (message.telemetryConfiguration != null && Object.hasOwnProperty.call(message, "telemetryConfiguration")) { + var error = $root.google.bigtable.v2.TelemetryConfiguration.verify(message.telemetryConfiguration, long + 1); + if (error) + return "telemetryConfiguration." + error; + } + return null; + }; + + /** + * Creates a ClientConfiguration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ClientConfiguration} ClientConfiguration + */ + ClientConfiguration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ClientConfiguration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ClientConfiguration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ClientConfiguration(); + if (object.sessionConfiguration != null) { + if (!$util.isObject(object.sessionConfiguration)) + throw TypeError(".google.bigtable.v2.ClientConfiguration.sessionConfiguration: object expected"); + message.sessionConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.fromObject(object.sessionConfiguration, long + 1); + } + if (object.stopPolling != null) + message.stopPolling = Boolean(object.stopPolling); + if (object.pollingInterval != null) { + if (!$util.isObject(object.pollingInterval)) + throw TypeError(".google.bigtable.v2.ClientConfiguration.pollingInterval: object expected"); + message.pollingInterval = $root.google.protobuf.Duration.fromObject(object.pollingInterval, long + 1); + } + if (object.pollingConfiguration != null) { + if (!$util.isObject(object.pollingConfiguration)) + throw TypeError(".google.bigtable.v2.ClientConfiguration.pollingConfiguration: object expected"); + message.pollingConfiguration = $root.google.bigtable.v2.ClientConfiguration.PollingConfiguration.fromObject(object.pollingConfiguration, long + 1); + } + if (object.telemetryConfiguration != null) { + if (!$util.isObject(object.telemetryConfiguration)) + throw TypeError(".google.bigtable.v2.ClientConfiguration.telemetryConfiguration: object expected"); + message.telemetryConfiguration = $root.google.bigtable.v2.TelemetryConfiguration.fromObject(object.telemetryConfiguration, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ClientConfiguration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {google.bigtable.v2.ClientConfiguration} message ClientConfiguration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientConfiguration.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.sessionConfiguration = null; + object.telemetryConfiguration = null; + } + if (message.sessionConfiguration != null && Object.hasOwnProperty.call(message, "sessionConfiguration")) + object.sessionConfiguration = $root.google.bigtable.v2.SessionClientConfiguration.toObject(message.sessionConfiguration, options, q + 1); + if (message.stopPolling != null && Object.hasOwnProperty.call(message, "stopPolling")) { + object.stopPolling = message.stopPolling; + if (options.oneofs) + object.polling = "stopPolling"; + } + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) { + object.pollingInterval = $root.google.protobuf.Duration.toObject(message.pollingInterval, options, q + 1); + if (options.oneofs) + object.polling = "pollingInterval"; + } + if (message.pollingConfiguration != null && Object.hasOwnProperty.call(message, "pollingConfiguration")) { + object.pollingConfiguration = $root.google.bigtable.v2.ClientConfiguration.PollingConfiguration.toObject(message.pollingConfiguration, options, q + 1); + if (options.oneofs) + object.polling = "pollingConfiguration"; + } + if (message.telemetryConfiguration != null && Object.hasOwnProperty.call(message, "telemetryConfiguration")) + object.telemetryConfiguration = $root.google.bigtable.v2.TelemetryConfiguration.toObject(message.telemetryConfiguration, options, q + 1); + return object; + }; + + /** + * Converts this ClientConfiguration to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ClientConfiguration + * @instance + * @returns {Object.} JSON object + */ + ClientConfiguration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientConfiguration + * @function getTypeUrl + * @memberof google.bigtable.v2.ClientConfiguration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientConfiguration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ClientConfiguration"; + }; + + ClientConfiguration.PollingConfiguration = (function() { + + /** + * Properties of a PollingConfiguration. + * @memberof google.bigtable.v2.ClientConfiguration + * @interface IPollingConfiguration + * @property {google.protobuf.IDuration|null} [pollingInterval] PollingConfiguration pollingInterval + * @property {google.protobuf.IDuration|null} [validityDuration] PollingConfiguration validityDuration + * @property {number|null} [maxRpcRetryCount] PollingConfiguration maxRpcRetryCount + */ + + /** + * Constructs a new PollingConfiguration. + * @memberof google.bigtable.v2.ClientConfiguration + * @classdesc Represents a PollingConfiguration. + * @implements IPollingConfiguration + * @constructor + * @param {google.bigtable.v2.ClientConfiguration.IPollingConfiguration=} [properties] Properties to set + */ + function PollingConfiguration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollingConfiguration pollingInterval. + * @member {google.protobuf.IDuration|null|undefined} pollingInterval + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @instance + */ + PollingConfiguration.prototype.pollingInterval = null; + + /** + * PollingConfiguration validityDuration. + * @member {google.protobuf.IDuration|null|undefined} validityDuration + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @instance + */ + PollingConfiguration.prototype.validityDuration = null; + + /** + * PollingConfiguration maxRpcRetryCount. + * @member {number} maxRpcRetryCount + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @instance + */ + PollingConfiguration.prototype.maxRpcRetryCount = 0; + + /** + * Creates a new PollingConfiguration instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {google.bigtable.v2.ClientConfiguration.IPollingConfiguration=} [properties] Properties to set + * @returns {google.bigtable.v2.ClientConfiguration.PollingConfiguration} PollingConfiguration instance + */ + PollingConfiguration.create = function create(properties) { + return new PollingConfiguration(properties); + }; + + /** + * Encodes the specified PollingConfiguration message. Does not implicitly {@link google.bigtable.v2.ClientConfiguration.PollingConfiguration.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {google.bigtable.v2.ClientConfiguration.IPollingConfiguration} message PollingConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollingConfiguration.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) + $root.google.protobuf.Duration.encode(message.pollingInterval, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.validityDuration != null && Object.hasOwnProperty.call(message, "validityDuration")) + $root.google.protobuf.Duration.encode(message.validityDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.maxRpcRetryCount != null && Object.hasOwnProperty.call(message, "maxRpcRetryCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.maxRpcRetryCount); + return writer; + }; + + /** + * Encodes the specified PollingConfiguration message, length delimited. Does not implicitly {@link google.bigtable.v2.ClientConfiguration.PollingConfiguration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {google.bigtable.v2.ClientConfiguration.IPollingConfiguration} message PollingConfiguration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollingConfiguration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PollingConfiguration message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ClientConfiguration.PollingConfiguration} PollingConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollingConfiguration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ClientConfiguration.PollingConfiguration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pollingInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.validityDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.maxRpcRetryCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PollingConfiguration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ClientConfiguration.PollingConfiguration} PollingConfiguration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollingConfiguration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollingConfiguration message. + * @function verify + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollingConfiguration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) { + var error = $root.google.protobuf.Duration.verify(message.pollingInterval, long + 1); + if (error) + return "pollingInterval." + error; + } + if (message.validityDuration != null && Object.hasOwnProperty.call(message, "validityDuration")) { + var error = $root.google.protobuf.Duration.verify(message.validityDuration, long + 1); + if (error) + return "validityDuration." + error; + } + if (message.maxRpcRetryCount != null && Object.hasOwnProperty.call(message, "maxRpcRetryCount")) + if (!$util.isInteger(message.maxRpcRetryCount)) + return "maxRpcRetryCount: integer expected"; + return null; + }; + + /** + * Creates a PollingConfiguration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ClientConfiguration.PollingConfiguration} PollingConfiguration + */ + PollingConfiguration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ClientConfiguration.PollingConfiguration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ClientConfiguration.PollingConfiguration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ClientConfiguration.PollingConfiguration(); + if (object.pollingInterval != null) { + if (!$util.isObject(object.pollingInterval)) + throw TypeError(".google.bigtable.v2.ClientConfiguration.PollingConfiguration.pollingInterval: object expected"); + message.pollingInterval = $root.google.protobuf.Duration.fromObject(object.pollingInterval, long + 1); + } + if (object.validityDuration != null) { + if (!$util.isObject(object.validityDuration)) + throw TypeError(".google.bigtable.v2.ClientConfiguration.PollingConfiguration.validityDuration: object expected"); + message.validityDuration = $root.google.protobuf.Duration.fromObject(object.validityDuration, long + 1); + } + if (object.maxRpcRetryCount != null) + message.maxRpcRetryCount = object.maxRpcRetryCount | 0; + return message; + }; + + /** + * Creates a plain object from a PollingConfiguration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {google.bigtable.v2.ClientConfiguration.PollingConfiguration} message PollingConfiguration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollingConfiguration.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.pollingInterval = null; + object.validityDuration = null; + object.maxRpcRetryCount = 0; + } + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) + object.pollingInterval = $root.google.protobuf.Duration.toObject(message.pollingInterval, options, q + 1); + if (message.validityDuration != null && Object.hasOwnProperty.call(message, "validityDuration")) + object.validityDuration = $root.google.protobuf.Duration.toObject(message.validityDuration, options, q + 1); + if (message.maxRpcRetryCount != null && Object.hasOwnProperty.call(message, "maxRpcRetryCount")) + object.maxRpcRetryCount = message.maxRpcRetryCount; + return object; + }; + + /** + * Converts this PollingConfiguration to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @instance + * @returns {Object.} JSON object + */ + PollingConfiguration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollingConfiguration + * @function getTypeUrl + * @memberof google.bigtable.v2.ClientConfiguration.PollingConfiguration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollingConfiguration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ClientConfiguration.PollingConfiguration"; + }; + + return PollingConfiguration; + })(); + + return ClientConfiguration; + })(); + + v2.SessionRequest = (function() { + + /** + * Properties of a SessionRequest. + * @memberof google.bigtable.v2 + * @interface ISessionRequest + * @property {google.bigtable.v2.IOpenSessionRequest|null} [openSession] SessionRequest openSession + * @property {google.bigtable.v2.ICloseSessionRequest|null} [closeSession] SessionRequest closeSession + * @property {google.bigtable.v2.IVirtualRpcRequest|null} [virtualRpc] SessionRequest virtualRpc + */ + + /** + * Constructs a new SessionRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionRequest. + * @implements ISessionRequest + * @constructor + * @param {google.bigtable.v2.ISessionRequest=} [properties] Properties to set + */ + function SessionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionRequest openSession. + * @member {google.bigtable.v2.IOpenSessionRequest|null|undefined} openSession + * @memberof google.bigtable.v2.SessionRequest + * @instance + */ + SessionRequest.prototype.openSession = null; + + /** + * SessionRequest closeSession. + * @member {google.bigtable.v2.ICloseSessionRequest|null|undefined} closeSession + * @memberof google.bigtable.v2.SessionRequest + * @instance + */ + SessionRequest.prototype.closeSession = null; + + /** + * SessionRequest virtualRpc. + * @member {google.bigtable.v2.IVirtualRpcRequest|null|undefined} virtualRpc + * @memberof google.bigtable.v2.SessionRequest + * @instance + */ + SessionRequest.prototype.virtualRpc = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionRequest payload. + * @member {"openSession"|"closeSession"|"virtualRpc"|undefined} payload + * @memberof google.bigtable.v2.SessionRequest + * @instance + */ + Object.defineProperty(SessionRequest.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["openSession", "closeSession", "virtualRpc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {google.bigtable.v2.ISessionRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionRequest} SessionRequest instance + */ + SessionRequest.create = function create(properties) { + return new SessionRequest(properties); + }; + + /** + * Encodes the specified SessionRequest message. Does not implicitly {@link google.bigtable.v2.SessionRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {google.bigtable.v2.ISessionRequest} message SessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.openSession != null && Object.hasOwnProperty.call(message, "openSession")) + $root.google.bigtable.v2.OpenSessionRequest.encode(message.openSession, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.closeSession != null && Object.hasOwnProperty.call(message, "closeSession")) + $root.google.bigtable.v2.CloseSessionRequest.encode(message.closeSession, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.virtualRpc != null && Object.hasOwnProperty.call(message, "virtualRpc")) + $root.google.bigtable.v2.VirtualRpcRequest.encode(message.virtualRpc, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {google.bigtable.v2.ISessionRequest} message SessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionRequest} SessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.openSession = $root.google.bigtable.v2.OpenSessionRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.closeSession = $root.google.bigtable.v2.CloseSessionRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.virtualRpc = $root.google.bigtable.v2.VirtualRpcRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionRequest} SessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionRequest message. + * @function verify + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.openSession != null && Object.hasOwnProperty.call(message, "openSession")) { + properties.payload = 1; + { + var error = $root.google.bigtable.v2.OpenSessionRequest.verify(message.openSession, long + 1); + if (error) + return "openSession." + error; + } + } + if (message.closeSession != null && Object.hasOwnProperty.call(message, "closeSession")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.CloseSessionRequest.verify(message.closeSession, long + 1); + if (error) + return "closeSession." + error; + } + } + if (message.virtualRpc != null && Object.hasOwnProperty.call(message, "virtualRpc")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.VirtualRpcRequest.verify(message.virtualRpc, long + 1); + if (error) + return "virtualRpc." + error; + } + } + return null; + }; + + /** + * Creates a SessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionRequest} SessionRequest + */ + SessionRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionRequest(); + if (object.openSession != null) { + if (!$util.isObject(object.openSession)) + throw TypeError(".google.bigtable.v2.SessionRequest.openSession: object expected"); + message.openSession = $root.google.bigtable.v2.OpenSessionRequest.fromObject(object.openSession, long + 1); + } + if (object.closeSession != null) { + if (!$util.isObject(object.closeSession)) + throw TypeError(".google.bigtable.v2.SessionRequest.closeSession: object expected"); + message.closeSession = $root.google.bigtable.v2.CloseSessionRequest.fromObject(object.closeSession, long + 1); + } + if (object.virtualRpc != null) { + if (!$util.isObject(object.virtualRpc)) + throw TypeError(".google.bigtable.v2.SessionRequest.virtualRpc: object expected"); + message.virtualRpc = $root.google.bigtable.v2.VirtualRpcRequest.fromObject(object.virtualRpc, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {google.bigtable.v2.SessionRequest} message SessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.openSession != null && Object.hasOwnProperty.call(message, "openSession")) { + object.openSession = $root.google.bigtable.v2.OpenSessionRequest.toObject(message.openSession, options, q + 1); + if (options.oneofs) + object.payload = "openSession"; + } + if (message.closeSession != null && Object.hasOwnProperty.call(message, "closeSession")) { + object.closeSession = $root.google.bigtable.v2.CloseSessionRequest.toObject(message.closeSession, options, q + 1); + if (options.oneofs) + object.payload = "closeSession"; + } + if (message.virtualRpc != null && Object.hasOwnProperty.call(message, "virtualRpc")) { + object.virtualRpc = $root.google.bigtable.v2.VirtualRpcRequest.toObject(message.virtualRpc, options, q + 1); + if (options.oneofs) + object.payload = "virtualRpc"; + } + return object; + }; + + /** + * Converts this SessionRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionRequest + * @instance + * @returns {Object.} JSON object + */ + SessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionRequest"; + }; + + return SessionRequest; + })(); + + v2.SessionResponse = (function() { + + /** + * Properties of a SessionResponse. + * @memberof google.bigtable.v2 + * @interface ISessionResponse + * @property {google.bigtable.v2.IOpenSessionResponse|null} [openSession] SessionResponse openSession + * @property {google.bigtable.v2.IVirtualRpcResponse|null} [virtualRpc] SessionResponse virtualRpc + * @property {google.bigtable.v2.IErrorResponse|null} [error] SessionResponse error + * @property {google.bigtable.v2.ISessionParametersResponse|null} [sessionParameters] SessionResponse sessionParameters + * @property {google.bigtable.v2.IHeartbeatResponse|null} [heartbeat] SessionResponse heartbeat + * @property {google.bigtable.v2.IGoAwayResponse|null} [goAway] SessionResponse goAway + * @property {google.bigtable.v2.ISessionRefreshConfig|null} [sessionRefreshConfig] SessionResponse sessionRefreshConfig + */ + + /** + * Constructs a new SessionResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionResponse. + * @implements ISessionResponse + * @constructor + * @param {google.bigtable.v2.ISessionResponse=} [properties] Properties to set + */ + function SessionResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionResponse openSession. + * @member {google.bigtable.v2.IOpenSessionResponse|null|undefined} openSession + * @memberof google.bigtable.v2.SessionResponse + * @instance + */ + SessionResponse.prototype.openSession = null; + + /** + * SessionResponse virtualRpc. + * @member {google.bigtable.v2.IVirtualRpcResponse|null|undefined} virtualRpc + * @memberof google.bigtable.v2.SessionResponse + * @instance + */ + SessionResponse.prototype.virtualRpc = null; + + /** + * SessionResponse error. + * @member {google.bigtable.v2.IErrorResponse|null|undefined} error + * @memberof google.bigtable.v2.SessionResponse + * @instance + */ + SessionResponse.prototype.error = null; + + /** + * SessionResponse sessionParameters. + * @member {google.bigtable.v2.ISessionParametersResponse|null|undefined} sessionParameters + * @memberof google.bigtable.v2.SessionResponse + * @instance + */ + SessionResponse.prototype.sessionParameters = null; + + /** + * SessionResponse heartbeat. + * @member {google.bigtable.v2.IHeartbeatResponse|null|undefined} heartbeat + * @memberof google.bigtable.v2.SessionResponse + * @instance + */ + SessionResponse.prototype.heartbeat = null; + + /** + * SessionResponse goAway. + * @member {google.bigtable.v2.IGoAwayResponse|null|undefined} goAway + * @memberof google.bigtable.v2.SessionResponse + * @instance + */ + SessionResponse.prototype.goAway = null; + + /** + * SessionResponse sessionRefreshConfig. + * @member {google.bigtable.v2.ISessionRefreshConfig|null|undefined} sessionRefreshConfig + * @memberof google.bigtable.v2.SessionResponse + * @instance + */ + SessionResponse.prototype.sessionRefreshConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionResponse payload. + * @member {"openSession"|"virtualRpc"|"error"|"sessionParameters"|"heartbeat"|"goAway"|"sessionRefreshConfig"|undefined} payload + * @memberof google.bigtable.v2.SessionResponse + * @instance + */ + Object.defineProperty(SessionResponse.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["openSession", "virtualRpc", "error", "sessionParameters", "heartbeat", "goAway", "sessionRefreshConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {google.bigtable.v2.ISessionResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionResponse} SessionResponse instance + */ + SessionResponse.create = function create(properties) { + return new SessionResponse(properties); + }; + + /** + * Encodes the specified SessionResponse message. Does not implicitly {@link google.bigtable.v2.SessionResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {google.bigtable.v2.ISessionResponse} message SessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.openSession != null && Object.hasOwnProperty.call(message, "openSession")) + $root.google.bigtable.v2.OpenSessionResponse.encode(message.openSession, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.virtualRpc != null && Object.hasOwnProperty.call(message, "virtualRpc")) + $root.google.bigtable.v2.VirtualRpcResponse.encode(message.virtualRpc, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.bigtable.v2.ErrorResponse.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.sessionParameters != null && Object.hasOwnProperty.call(message, "sessionParameters")) + $root.google.bigtable.v2.SessionParametersResponse.encode(message.sessionParameters, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) + $root.google.bigtable.v2.HeartbeatResponse.encode(message.heartbeat, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.goAway != null && Object.hasOwnProperty.call(message, "goAway")) + $root.google.bigtable.v2.GoAwayResponse.encode(message.goAway, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.sessionRefreshConfig != null && Object.hasOwnProperty.call(message, "sessionRefreshConfig")) + $root.google.bigtable.v2.SessionRefreshConfig.encode(message.sessionRefreshConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {google.bigtable.v2.ISessionResponse} message SessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionResponse} SessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.openSession = $root.google.bigtable.v2.OpenSessionResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.virtualRpc = $root.google.bigtable.v2.VirtualRpcResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.error = $root.google.bigtable.v2.ErrorResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.sessionParameters = $root.google.bigtable.v2.SessionParametersResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.heartbeat = $root.google.bigtable.v2.HeartbeatResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.goAway = $root.google.bigtable.v2.GoAwayResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.sessionRefreshConfig = $root.google.bigtable.v2.SessionRefreshConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionResponse} SessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionResponse message. + * @function verify + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.openSession != null && Object.hasOwnProperty.call(message, "openSession")) { + properties.payload = 1; + { + var error = $root.google.bigtable.v2.OpenSessionResponse.verify(message.openSession, long + 1); + if (error) + return "openSession." + error; + } + } + if (message.virtualRpc != null && Object.hasOwnProperty.call(message, "virtualRpc")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.VirtualRpcResponse.verify(message.virtualRpc, long + 1); + if (error) + return "virtualRpc." + error; + } + } + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.ErrorResponse.verify(message.error, long + 1); + if (error) + return "error." + error; + } + } + if (message.sessionParameters != null && Object.hasOwnProperty.call(message, "sessionParameters")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionParametersResponse.verify(message.sessionParameters, long + 1); + if (error) + return "sessionParameters." + error; + } + } + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.HeartbeatResponse.verify(message.heartbeat, long + 1); + if (error) + return "heartbeat." + error; + } + } + if (message.goAway != null && Object.hasOwnProperty.call(message, "goAway")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.GoAwayResponse.verify(message.goAway, long + 1); + if (error) + return "goAway." + error; + } + } + if (message.sessionRefreshConfig != null && Object.hasOwnProperty.call(message, "sessionRefreshConfig")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionRefreshConfig.verify(message.sessionRefreshConfig, long + 1); + if (error) + return "sessionRefreshConfig." + error; + } + } + return null; + }; + + /** + * Creates a SessionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionResponse} SessionResponse + */ + SessionResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionResponse(); + if (object.openSession != null) { + if (!$util.isObject(object.openSession)) + throw TypeError(".google.bigtable.v2.SessionResponse.openSession: object expected"); + message.openSession = $root.google.bigtable.v2.OpenSessionResponse.fromObject(object.openSession, long + 1); + } + if (object.virtualRpc != null) { + if (!$util.isObject(object.virtualRpc)) + throw TypeError(".google.bigtable.v2.SessionResponse.virtualRpc: object expected"); + message.virtualRpc = $root.google.bigtable.v2.VirtualRpcResponse.fromObject(object.virtualRpc, long + 1); + } + if (object.error != null) { + if (!$util.isObject(object.error)) + throw TypeError(".google.bigtable.v2.SessionResponse.error: object expected"); + message.error = $root.google.bigtable.v2.ErrorResponse.fromObject(object.error, long + 1); + } + if (object.sessionParameters != null) { + if (!$util.isObject(object.sessionParameters)) + throw TypeError(".google.bigtable.v2.SessionResponse.sessionParameters: object expected"); + message.sessionParameters = $root.google.bigtable.v2.SessionParametersResponse.fromObject(object.sessionParameters, long + 1); + } + if (object.heartbeat != null) { + if (!$util.isObject(object.heartbeat)) + throw TypeError(".google.bigtable.v2.SessionResponse.heartbeat: object expected"); + message.heartbeat = $root.google.bigtable.v2.HeartbeatResponse.fromObject(object.heartbeat, long + 1); + } + if (object.goAway != null) { + if (!$util.isObject(object.goAway)) + throw TypeError(".google.bigtable.v2.SessionResponse.goAway: object expected"); + message.goAway = $root.google.bigtable.v2.GoAwayResponse.fromObject(object.goAway, long + 1); + } + if (object.sessionRefreshConfig != null) { + if (!$util.isObject(object.sessionRefreshConfig)) + throw TypeError(".google.bigtable.v2.SessionResponse.sessionRefreshConfig: object expected"); + message.sessionRefreshConfig = $root.google.bigtable.v2.SessionRefreshConfig.fromObject(object.sessionRefreshConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SessionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {google.bigtable.v2.SessionResponse} message SessionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.openSession != null && Object.hasOwnProperty.call(message, "openSession")) { + object.openSession = $root.google.bigtable.v2.OpenSessionResponse.toObject(message.openSession, options, q + 1); + if (options.oneofs) + object.payload = "openSession"; + } + if (message.virtualRpc != null && Object.hasOwnProperty.call(message, "virtualRpc")) { + object.virtualRpc = $root.google.bigtable.v2.VirtualRpcResponse.toObject(message.virtualRpc, options, q + 1); + if (options.oneofs) + object.payload = "virtualRpc"; + } + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + object.error = $root.google.bigtable.v2.ErrorResponse.toObject(message.error, options, q + 1); + if (options.oneofs) + object.payload = "error"; + } + if (message.sessionParameters != null && Object.hasOwnProperty.call(message, "sessionParameters")) { + object.sessionParameters = $root.google.bigtable.v2.SessionParametersResponse.toObject(message.sessionParameters, options, q + 1); + if (options.oneofs) + object.payload = "sessionParameters"; + } + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) { + object.heartbeat = $root.google.bigtable.v2.HeartbeatResponse.toObject(message.heartbeat, options, q + 1); + if (options.oneofs) + object.payload = "heartbeat"; + } + if (message.goAway != null && Object.hasOwnProperty.call(message, "goAway")) { + object.goAway = $root.google.bigtable.v2.GoAwayResponse.toObject(message.goAway, options, q + 1); + if (options.oneofs) + object.payload = "goAway"; + } + if (message.sessionRefreshConfig != null && Object.hasOwnProperty.call(message, "sessionRefreshConfig")) { + object.sessionRefreshConfig = $root.google.bigtable.v2.SessionRefreshConfig.toObject(message.sessionRefreshConfig, options, q + 1); + if (options.oneofs) + object.payload = "sessionRefreshConfig"; + } + return object; + }; + + /** + * Converts this SessionResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionResponse + * @instance + * @returns {Object.} JSON object + */ + SessionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionResponse"; + }; + + return SessionResponse; + })(); + + v2.OpenSessionRequest = (function() { + + /** + * Properties of an OpenSessionRequest. + * @memberof google.bigtable.v2 + * @interface IOpenSessionRequest + * @property {number|Long|null} [protocolVersion] OpenSessionRequest protocolVersion + * @property {google.bigtable.v2.IFeatureFlags|null} [flags] OpenSessionRequest flags + * @property {number|Long|null} [consecutiveFailedConnectionAttempts] OpenSessionRequest consecutiveFailedConnectionAttempts + * @property {Uint8Array|null} [routingCookie] OpenSessionRequest routingCookie + * @property {Uint8Array|null} [payload] OpenSessionRequest payload + */ + + /** + * Constructs a new OpenSessionRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents an OpenSessionRequest. + * @implements IOpenSessionRequest + * @constructor + * @param {google.bigtable.v2.IOpenSessionRequest=} [properties] Properties to set + */ + function OpenSessionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpenSessionRequest protocolVersion. + * @member {number|Long} protocolVersion + * @memberof google.bigtable.v2.OpenSessionRequest + * @instance + */ + OpenSessionRequest.prototype.protocolVersion = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * OpenSessionRequest flags. + * @member {google.bigtable.v2.IFeatureFlags|null|undefined} flags + * @memberof google.bigtable.v2.OpenSessionRequest + * @instance + */ + OpenSessionRequest.prototype.flags = null; + + /** + * OpenSessionRequest consecutiveFailedConnectionAttempts. + * @member {number|Long} consecutiveFailedConnectionAttempts + * @memberof google.bigtable.v2.OpenSessionRequest + * @instance + */ + OpenSessionRequest.prototype.consecutiveFailedConnectionAttempts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * OpenSessionRequest routingCookie. + * @member {Uint8Array} routingCookie + * @memberof google.bigtable.v2.OpenSessionRequest + * @instance + */ + OpenSessionRequest.prototype.routingCookie = $util.newBuffer([]); + + /** + * OpenSessionRequest payload. + * @member {Uint8Array} payload + * @memberof google.bigtable.v2.OpenSessionRequest + * @instance + */ + OpenSessionRequest.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new OpenSessionRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {google.bigtable.v2.IOpenSessionRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.OpenSessionRequest} OpenSessionRequest instance + */ + OpenSessionRequest.create = function create(properties) { + return new OpenSessionRequest(properties); + }; + + /** + * Encodes the specified OpenSessionRequest message. Does not implicitly {@link google.bigtable.v2.OpenSessionRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {google.bigtable.v2.IOpenSessionRequest} message OpenSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenSessionRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.protocolVersion); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + $root.google.bigtable.v2.FeatureFlags.encode(message.flags, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.consecutiveFailedConnectionAttempts != null && Object.hasOwnProperty.call(message, "consecutiveFailedConnectionAttempts")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.consecutiveFailedConnectionAttempts); + if (message.routingCookie != null && Object.hasOwnProperty.call(message, "routingCookie")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.routingCookie); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.payload); + return writer; + }; + + /** + * Encodes the specified OpenSessionRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {google.bigtable.v2.IOpenSessionRequest} message OpenSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OpenSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.OpenSessionRequest} OpenSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenSessionRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.OpenSessionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.protocolVersion = reader.int64(); + break; + } + case 2: { + message.flags = $root.google.bigtable.v2.FeatureFlags.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.consecutiveFailedConnectionAttempts = reader.int64(); + break; + } + case 4: { + message.routingCookie = reader.bytes(); + break; + } + case 5: { + message.payload = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OpenSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.OpenSessionRequest} OpenSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenSessionRequest message. + * @function verify + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenSessionRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) + if (!$util.isInteger(message.protocolVersion) && !(message.protocolVersion && $util.isInteger(message.protocolVersion.low) && $util.isInteger(message.protocolVersion.high))) + return "protocolVersion: integer|Long expected"; + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) { + var error = $root.google.bigtable.v2.FeatureFlags.verify(message.flags, long + 1); + if (error) + return "flags." + error; + } + if (message.consecutiveFailedConnectionAttempts != null && Object.hasOwnProperty.call(message, "consecutiveFailedConnectionAttempts")) + if (!$util.isInteger(message.consecutiveFailedConnectionAttempts) && !(message.consecutiveFailedConnectionAttempts && $util.isInteger(message.consecutiveFailedConnectionAttempts.low) && $util.isInteger(message.consecutiveFailedConnectionAttempts.high))) + return "consecutiveFailedConnectionAttempts: integer|Long expected"; + if (message.routingCookie != null && Object.hasOwnProperty.call(message, "routingCookie")) + if (!(message.routingCookie && typeof message.routingCookie.length === "number" || $util.isString(message.routingCookie))) + return "routingCookie: buffer expected"; + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates an OpenSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.OpenSessionRequest} OpenSessionRequest + */ + OpenSessionRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.OpenSessionRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.OpenSessionRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.OpenSessionRequest(); + if (object.protocolVersion != null) + if ($util.Long) + message.protocolVersion = $util.Long.fromValue(object.protocolVersion, false); + else if (typeof object.protocolVersion === "string") + message.protocolVersion = parseInt(object.protocolVersion, 10); + else if (typeof object.protocolVersion === "number") + message.protocolVersion = object.protocolVersion; + else if (typeof object.protocolVersion === "object") + message.protocolVersion = new $util.LongBits(object.protocolVersion.low >>> 0, object.protocolVersion.high >>> 0).toNumber(); + if (object.flags != null) { + if (!$util.isObject(object.flags)) + throw TypeError(".google.bigtable.v2.OpenSessionRequest.flags: object expected"); + message.flags = $root.google.bigtable.v2.FeatureFlags.fromObject(object.flags, long + 1); + } + if (object.consecutiveFailedConnectionAttempts != null) + if ($util.Long) + message.consecutiveFailedConnectionAttempts = $util.Long.fromValue(object.consecutiveFailedConnectionAttempts, false); + else if (typeof object.consecutiveFailedConnectionAttempts === "string") + message.consecutiveFailedConnectionAttempts = parseInt(object.consecutiveFailedConnectionAttempts, 10); + else if (typeof object.consecutiveFailedConnectionAttempts === "number") + message.consecutiveFailedConnectionAttempts = object.consecutiveFailedConnectionAttempts; + else if (typeof object.consecutiveFailedConnectionAttempts === "object") + message.consecutiveFailedConnectionAttempts = new $util.LongBits(object.consecutiveFailedConnectionAttempts.low >>> 0, object.consecutiveFailedConnectionAttempts.high >>> 0).toNumber(); + if (object.routingCookie != null) + if (typeof object.routingCookie === "string") + $util.base64.decode(object.routingCookie, message.routingCookie = $util.newBuffer($util.base64.length(object.routingCookie)), 0); + else if (object.routingCookie.length >= 0) + message.routingCookie = object.routingCookie; + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length >= 0) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from an OpenSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {google.bigtable.v2.OpenSessionRequest} message OpenSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenSessionRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.protocolVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.protocolVersion = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.flags = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.consecutiveFailedConnectionAttempts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.consecutiveFailedConnectionAttempts = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (options.bytes === String) + object.routingCookie = ""; + else { + object.routingCookie = []; + if (options.bytes !== Array) + object.routingCookie = $util.newBuffer(object.routingCookie); + } + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.protocolVersion = typeof message.protocolVersion === "number" ? BigInt(message.protocolVersion) : $util.Long.fromBits(message.protocolVersion.low >>> 0, message.protocolVersion.high >>> 0, false).toBigInt(); + else if (typeof message.protocolVersion === "number") + object.protocolVersion = options.longs === String ? String(message.protocolVersion) : message.protocolVersion; + else + object.protocolVersion = options.longs === String ? $util.Long.prototype.toString.call(message.protocolVersion) : options.longs === Number ? new $util.LongBits(message.protocolVersion.low >>> 0, message.protocolVersion.high >>> 0).toNumber() : message.protocolVersion; + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + object.flags = $root.google.bigtable.v2.FeatureFlags.toObject(message.flags, options, q + 1); + if (message.consecutiveFailedConnectionAttempts != null && Object.hasOwnProperty.call(message, "consecutiveFailedConnectionAttempts")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.consecutiveFailedConnectionAttempts = typeof message.consecutiveFailedConnectionAttempts === "number" ? BigInt(message.consecutiveFailedConnectionAttempts) : $util.Long.fromBits(message.consecutiveFailedConnectionAttempts.low >>> 0, message.consecutiveFailedConnectionAttempts.high >>> 0, false).toBigInt(); + else if (typeof message.consecutiveFailedConnectionAttempts === "number") + object.consecutiveFailedConnectionAttempts = options.longs === String ? String(message.consecutiveFailedConnectionAttempts) : message.consecutiveFailedConnectionAttempts; + else + object.consecutiveFailedConnectionAttempts = options.longs === String ? $util.Long.prototype.toString.call(message.consecutiveFailedConnectionAttempts) : options.longs === Number ? new $util.LongBits(message.consecutiveFailedConnectionAttempts.low >>> 0, message.consecutiveFailedConnectionAttempts.high >>> 0).toNumber() : message.consecutiveFailedConnectionAttempts; + if (message.routingCookie != null && Object.hasOwnProperty.call(message, "routingCookie")) + object.routingCookie = options.bytes === String ? $util.base64.encode(message.routingCookie, 0, message.routingCookie.length) : options.bytes === Array ? Array.prototype.slice.call(message.routingCookie) : message.routingCookie; + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + return object; + }; + + /** + * Converts this OpenSessionRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.OpenSessionRequest + * @instance + * @returns {Object.} JSON object + */ + OpenSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenSessionRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.OpenSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.OpenSessionRequest"; + }; + + return OpenSessionRequest; + })(); + + v2.BackendIdentifier = (function() { + + /** + * Properties of a BackendIdentifier. + * @memberof google.bigtable.v2 + * @interface IBackendIdentifier + * @property {number|Long|null} [googleFrontendId] BackendIdentifier googleFrontendId + * @property {number|Long|null} [applicationFrontendId] BackendIdentifier applicationFrontendId + * @property {string|null} [applicationFrontendZone] BackendIdentifier applicationFrontendZone + */ + + /** + * Constructs a new BackendIdentifier. + * @memberof google.bigtable.v2 + * @classdesc Represents a BackendIdentifier. + * @implements IBackendIdentifier + * @constructor + * @param {google.bigtable.v2.IBackendIdentifier=} [properties] Properties to set + */ + function BackendIdentifier(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackendIdentifier googleFrontendId. + * @member {number|Long} googleFrontendId + * @memberof google.bigtable.v2.BackendIdentifier + * @instance + */ + BackendIdentifier.prototype.googleFrontendId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackendIdentifier applicationFrontendId. + * @member {number|Long} applicationFrontendId + * @memberof google.bigtable.v2.BackendIdentifier + * @instance + */ + BackendIdentifier.prototype.applicationFrontendId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackendIdentifier applicationFrontendZone. + * @member {string} applicationFrontendZone + * @memberof google.bigtable.v2.BackendIdentifier + * @instance + */ + BackendIdentifier.prototype.applicationFrontendZone = ""; + + /** + * Creates a new BackendIdentifier instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {google.bigtable.v2.IBackendIdentifier=} [properties] Properties to set + * @returns {google.bigtable.v2.BackendIdentifier} BackendIdentifier instance + */ + BackendIdentifier.create = function create(properties) { + return new BackendIdentifier(properties); + }; + + /** + * Encodes the specified BackendIdentifier message. Does not implicitly {@link google.bigtable.v2.BackendIdentifier.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {google.bigtable.v2.IBackendIdentifier} message BackendIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackendIdentifier.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.googleFrontendId); + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.applicationFrontendId); + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.applicationFrontendZone); + return writer; + }; + + /** + * Encodes the specified BackendIdentifier message, length delimited. Does not implicitly {@link google.bigtable.v2.BackendIdentifier.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {google.bigtable.v2.IBackendIdentifier} message BackendIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackendIdentifier.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a BackendIdentifier message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.BackendIdentifier} BackendIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackendIdentifier.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.BackendIdentifier(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.googleFrontendId = reader.int64(); + break; + } + case 2: { + message.applicationFrontendId = reader.int64(); + break; + } + case 3: { + message.applicationFrontendZone = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BackendIdentifier message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.BackendIdentifier} BackendIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackendIdentifier.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackendIdentifier message. + * @function verify + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackendIdentifier.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) + if (!$util.isInteger(message.googleFrontendId) && !(message.googleFrontendId && $util.isInteger(message.googleFrontendId.low) && $util.isInteger(message.googleFrontendId.high))) + return "googleFrontendId: integer|Long expected"; + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) + if (!$util.isInteger(message.applicationFrontendId) && !(message.applicationFrontendId && $util.isInteger(message.applicationFrontendId.low) && $util.isInteger(message.applicationFrontendId.high))) + return "applicationFrontendId: integer|Long expected"; + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) + if (!$util.isString(message.applicationFrontendZone)) + return "applicationFrontendZone: string expected"; + return null; + }; + + /** + * Creates a BackendIdentifier message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.BackendIdentifier} BackendIdentifier + */ + BackendIdentifier.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.BackendIdentifier) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.BackendIdentifier: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.BackendIdentifier(); + if (object.googleFrontendId != null) + if ($util.Long) + message.googleFrontendId = $util.Long.fromValue(object.googleFrontendId, false); + else if (typeof object.googleFrontendId === "string") + message.googleFrontendId = parseInt(object.googleFrontendId, 10); + else if (typeof object.googleFrontendId === "number") + message.googleFrontendId = object.googleFrontendId; + else if (typeof object.googleFrontendId === "object") + message.googleFrontendId = new $util.LongBits(object.googleFrontendId.low >>> 0, object.googleFrontendId.high >>> 0).toNumber(); + if (object.applicationFrontendId != null) + if ($util.Long) + message.applicationFrontendId = $util.Long.fromValue(object.applicationFrontendId, false); + else if (typeof object.applicationFrontendId === "string") + message.applicationFrontendId = parseInt(object.applicationFrontendId, 10); + else if (typeof object.applicationFrontendId === "number") + message.applicationFrontendId = object.applicationFrontendId; + else if (typeof object.applicationFrontendId === "object") + message.applicationFrontendId = new $util.LongBits(object.applicationFrontendId.low >>> 0, object.applicationFrontendId.high >>> 0).toNumber(); + if (object.applicationFrontendZone != null) + message.applicationFrontendZone = String(object.applicationFrontendZone); + return message; + }; + + /** + * Creates a plain object from a BackendIdentifier message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {google.bigtable.v2.BackendIdentifier} message BackendIdentifier + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackendIdentifier.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.googleFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.googleFrontendId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applicationFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.applicationFrontendId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.applicationFrontendZone = ""; + } + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.googleFrontendId = typeof message.googleFrontendId === "number" ? BigInt(message.googleFrontendId) : $util.Long.fromBits(message.googleFrontendId.low >>> 0, message.googleFrontendId.high >>> 0, false).toBigInt(); + else if (typeof message.googleFrontendId === "number") + object.googleFrontendId = options.longs === String ? String(message.googleFrontendId) : message.googleFrontendId; + else + object.googleFrontendId = options.longs === String ? $util.Long.prototype.toString.call(message.googleFrontendId) : options.longs === Number ? new $util.LongBits(message.googleFrontendId.low >>> 0, message.googleFrontendId.high >>> 0).toNumber() : message.googleFrontendId; + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.applicationFrontendId = typeof message.applicationFrontendId === "number" ? BigInt(message.applicationFrontendId) : $util.Long.fromBits(message.applicationFrontendId.low >>> 0, message.applicationFrontendId.high >>> 0, false).toBigInt(); + else if (typeof message.applicationFrontendId === "number") + object.applicationFrontendId = options.longs === String ? String(message.applicationFrontendId) : message.applicationFrontendId; + else + object.applicationFrontendId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationFrontendId) : options.longs === Number ? new $util.LongBits(message.applicationFrontendId.low >>> 0, message.applicationFrontendId.high >>> 0).toNumber() : message.applicationFrontendId; + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) + object.applicationFrontendZone = message.applicationFrontendZone; + return object; + }; + + /** + * Converts this BackendIdentifier to JSON. + * @function toJSON + * @memberof google.bigtable.v2.BackendIdentifier + * @instance + * @returns {Object.} JSON object + */ + BackendIdentifier.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackendIdentifier + * @function getTypeUrl + * @memberof google.bigtable.v2.BackendIdentifier + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackendIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.BackendIdentifier"; + }; + + return BackendIdentifier; + })(); + + v2.OpenSessionResponse = (function() { + + /** + * Properties of an OpenSessionResponse. + * @memberof google.bigtable.v2 + * @interface IOpenSessionResponse + * @property {google.bigtable.v2.IBackendIdentifier|null} [backend] OpenSessionResponse backend + * @property {Uint8Array|null} [payload] OpenSessionResponse payload + */ + + /** + * Constructs a new OpenSessionResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents an OpenSessionResponse. + * @implements IOpenSessionResponse + * @constructor + * @param {google.bigtable.v2.IOpenSessionResponse=} [properties] Properties to set + */ + function OpenSessionResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpenSessionResponse backend. + * @member {google.bigtable.v2.IBackendIdentifier|null|undefined} backend + * @memberof google.bigtable.v2.OpenSessionResponse + * @instance + */ + OpenSessionResponse.prototype.backend = null; + + /** + * OpenSessionResponse payload. + * @member {Uint8Array} payload + * @memberof google.bigtable.v2.OpenSessionResponse + * @instance + */ + OpenSessionResponse.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new OpenSessionResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {google.bigtable.v2.IOpenSessionResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.OpenSessionResponse} OpenSessionResponse instance + */ + OpenSessionResponse.create = function create(properties) { + return new OpenSessionResponse(properties); + }; + + /** + * Encodes the specified OpenSessionResponse message. Does not implicitly {@link google.bigtable.v2.OpenSessionResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {google.bigtable.v2.IOpenSessionResponse} message OpenSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenSessionResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.payload); + if (message.backend != null && Object.hasOwnProperty.call(message, "backend")) + $root.google.bigtable.v2.BackendIdentifier.encode(message.backend, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified OpenSessionResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenSessionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {google.bigtable.v2.IOpenSessionResponse} message OpenSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenSessionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OpenSessionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.OpenSessionResponse} OpenSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenSessionResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.OpenSessionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.backend = $root.google.bigtable.v2.BackendIdentifier.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 1: { + message.payload = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OpenSessionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.OpenSessionResponse} OpenSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenSessionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenSessionResponse message. + * @function verify + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenSessionResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.backend != null && Object.hasOwnProperty.call(message, "backend")) { + var error = $root.google.bigtable.v2.BackendIdentifier.verify(message.backend, long + 1); + if (error) + return "backend." + error; + } + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates an OpenSessionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.OpenSessionResponse} OpenSessionResponse + */ + OpenSessionResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.OpenSessionResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.OpenSessionResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.OpenSessionResponse(); + if (object.backend != null) { + if (!$util.isObject(object.backend)) + throw TypeError(".google.bigtable.v2.OpenSessionResponse.backend: object expected"); + message.backend = $root.google.bigtable.v2.BackendIdentifier.fromObject(object.backend, long + 1); + } + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length >= 0) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from an OpenSessionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {google.bigtable.v2.OpenSessionResponse} message OpenSessionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenSessionResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + object.backend = null; + } + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + if (message.backend != null && Object.hasOwnProperty.call(message, "backend")) + object.backend = $root.google.bigtable.v2.BackendIdentifier.toObject(message.backend, options, q + 1); + return object; + }; + + /** + * Converts this OpenSessionResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.OpenSessionResponse + * @instance + * @returns {Object.} JSON object + */ + OpenSessionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenSessionResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.OpenSessionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenSessionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.OpenSessionResponse"; + }; + + return OpenSessionResponse; + })(); + + v2.CloseSessionRequest = (function() { + + /** + * Properties of a CloseSessionRequest. + * @memberof google.bigtable.v2 + * @interface ICloseSessionRequest + * @property {google.bigtable.v2.CloseSessionRequest.CloseSessionReason|null} [reason] CloseSessionRequest reason + * @property {string|null} [description] CloseSessionRequest description + */ + + /** + * Constructs a new CloseSessionRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a CloseSessionRequest. + * @implements ICloseSessionRequest + * @constructor + * @param {google.bigtable.v2.ICloseSessionRequest=} [properties] Properties to set + */ + function CloseSessionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloseSessionRequest reason. + * @member {google.bigtable.v2.CloseSessionRequest.CloseSessionReason} reason + * @memberof google.bigtable.v2.CloseSessionRequest + * @instance + */ + CloseSessionRequest.prototype.reason = 0; + + /** + * CloseSessionRequest description. + * @member {string} description + * @memberof google.bigtable.v2.CloseSessionRequest + * @instance + */ + CloseSessionRequest.prototype.description = ""; + + /** + * Creates a new CloseSessionRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {google.bigtable.v2.ICloseSessionRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.CloseSessionRequest} CloseSessionRequest instance + */ + CloseSessionRequest.create = function create(properties) { + return new CloseSessionRequest(properties); + }; + + /** + * Encodes the specified CloseSessionRequest message. Does not implicitly {@link google.bigtable.v2.CloseSessionRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {google.bigtable.v2.ICloseSessionRequest} message CloseSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloseSessionRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified CloseSessionRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.CloseSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {google.bigtable.v2.ICloseSessionRequest} message CloseSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloseSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CloseSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.CloseSessionRequest} CloseSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloseSessionRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.CloseSessionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.reason = reader.int32(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloseSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.CloseSessionRequest} CloseSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloseSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloseSessionRequest message. + * @function verify + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloseSessionRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + switch (message.reason) { + default: + return "reason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a CloseSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.CloseSessionRequest} CloseSessionRequest + */ + CloseSessionRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.CloseSessionRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.CloseSessionRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.CloseSessionRequest(); + switch (object.reason) { + default: + if (typeof object.reason === "number") { + message.reason = object.reason; + break; + } + break; + case "CLOSE_SESSION_REASON_UNSET": + case 0: + message.reason = 0; + break; + case "CLOSE_SESSION_REASON_GOAWAY": + case 1: + message.reason = 1; + break; + case "CLOSE_SESSION_REASON_ERROR": + case 2: + message.reason = 2; + break; + case "CLOSE_SESSION_REASON_USER": + case 3: + message.reason = 3; + break; + case "CLOSE_SESSION_REASON_DOWNSIZE": + case 4: + message.reason = 4; + break; + case "CLOSE_SESSION_REASON_MISSED_HEARTBEAT": + case 5: + message.reason = 5; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a CloseSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {google.bigtable.v2.CloseSessionRequest} message CloseSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloseSessionRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.reason = options.enums === String ? "CLOSE_SESSION_REASON_UNSET" : 0; + object.description = ""; + } + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + object.reason = options.enums === String ? $root.google.bigtable.v2.CloseSessionRequest.CloseSessionReason[message.reason] === undefined ? message.reason : $root.google.bigtable.v2.CloseSessionRequest.CloseSessionReason[message.reason] : message.reason; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + return object; + }; + + /** + * Converts this CloseSessionRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.CloseSessionRequest + * @instance + * @returns {Object.} JSON object + */ + CloseSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloseSessionRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.CloseSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloseSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.CloseSessionRequest"; + }; + + /** + * CloseSessionReason enum. + * @name google.bigtable.v2.CloseSessionRequest.CloseSessionReason + * @enum {number} + * @property {number} CLOSE_SESSION_REASON_UNSET=0 CLOSE_SESSION_REASON_UNSET value + * @property {number} CLOSE_SESSION_REASON_GOAWAY=1 CLOSE_SESSION_REASON_GOAWAY value + * @property {number} CLOSE_SESSION_REASON_ERROR=2 CLOSE_SESSION_REASON_ERROR value + * @property {number} CLOSE_SESSION_REASON_USER=3 CLOSE_SESSION_REASON_USER value + * @property {number} CLOSE_SESSION_REASON_DOWNSIZE=4 CLOSE_SESSION_REASON_DOWNSIZE value + * @property {number} CLOSE_SESSION_REASON_MISSED_HEARTBEAT=5 CLOSE_SESSION_REASON_MISSED_HEARTBEAT value + */ + CloseSessionRequest.CloseSessionReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOSE_SESSION_REASON_UNSET"] = 0; + values[valuesById[1] = "CLOSE_SESSION_REASON_GOAWAY"] = 1; + values[valuesById[2] = "CLOSE_SESSION_REASON_ERROR"] = 2; + values[valuesById[3] = "CLOSE_SESSION_REASON_USER"] = 3; + values[valuesById[4] = "CLOSE_SESSION_REASON_DOWNSIZE"] = 4; + values[valuesById[5] = "CLOSE_SESSION_REASON_MISSED_HEARTBEAT"] = 5; + return values; + })(); + + return CloseSessionRequest; + })(); + + v2.OpenTableRequest = (function() { + + /** + * Properties of an OpenTableRequest. + * @memberof google.bigtable.v2 + * @interface IOpenTableRequest + * @property {string|null} [tableName] OpenTableRequest tableName + * @property {string|null} [appProfileId] OpenTableRequest appProfileId + * @property {google.bigtable.v2.OpenTableRequest.Permission|null} [permission] OpenTableRequest permission + */ + + /** + * Constructs a new OpenTableRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents an OpenTableRequest. + * @implements IOpenTableRequest + * @constructor + * @param {google.bigtable.v2.IOpenTableRequest=} [properties] Properties to set + */ + function OpenTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpenTableRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.OpenTableRequest + * @instance + */ + OpenTableRequest.prototype.tableName = ""; + + /** + * OpenTableRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.OpenTableRequest + * @instance + */ + OpenTableRequest.prototype.appProfileId = ""; + + /** + * OpenTableRequest permission. + * @member {google.bigtable.v2.OpenTableRequest.Permission} permission + * @memberof google.bigtable.v2.OpenTableRequest + * @instance + */ + OpenTableRequest.prototype.permission = 0; + + /** + * Creates a new OpenTableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {google.bigtable.v2.IOpenTableRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.OpenTableRequest} OpenTableRequest instance + */ + OpenTableRequest.create = function create(properties) { + return new OpenTableRequest(properties); + }; + + /** + * Encodes the specified OpenTableRequest message. Does not implicitly {@link google.bigtable.v2.OpenTableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {google.bigtable.v2.IOpenTableRequest} message OpenTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenTableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.permission); + return writer; + }; + + /** + * Encodes the specified OpenTableRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {google.bigtable.v2.IOpenTableRequest} message OpenTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OpenTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.OpenTableRequest} OpenTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenTableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.OpenTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + case 3: { + message.permission = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OpenTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.OpenTableRequest} OpenTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenTableRequest message. + * @function verify + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenTableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + switch (message.permission) { + default: + return "permission: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an OpenTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.OpenTableRequest} OpenTableRequest + */ + OpenTableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.OpenTableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.OpenTableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.OpenTableRequest(); + if (object.tableName != null) + message.tableName = String(object.tableName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + switch (object.permission) { + default: + if (typeof object.permission === "number") { + message.permission = object.permission; + break; + } + break; + case "PERMISSION_UNSET": + case 0: + message.permission = 0; + break; + case "PERMISSION_READ": + case 1: + message.permission = 1; + break; + case "PERMISSION_WRITE": + case 2: + message.permission = 2; + break; + case "PERMISSION_READ_WRITE": + case 3: + message.permission = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an OpenTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {google.bigtable.v2.OpenTableRequest} message OpenTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenTableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.tableName = ""; + object.appProfileId = ""; + object.permission = options.enums === String ? "PERMISSION_UNSET" : 0; + } + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + object.tableName = message.tableName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + object.permission = options.enums === String ? $root.google.bigtable.v2.OpenTableRequest.Permission[message.permission] === undefined ? message.permission : $root.google.bigtable.v2.OpenTableRequest.Permission[message.permission] : message.permission; + return object; + }; + + /** + * Converts this OpenTableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.OpenTableRequest + * @instance + * @returns {Object.} JSON object + */ + OpenTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenTableRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.OpenTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.OpenTableRequest"; + }; + + /** + * Permission enum. + * @name google.bigtable.v2.OpenTableRequest.Permission + * @enum {number} + * @property {number} PERMISSION_UNSET=0 PERMISSION_UNSET value + * @property {number} PERMISSION_READ=1 PERMISSION_READ value + * @property {number} PERMISSION_WRITE=2 PERMISSION_WRITE value + * @property {number} PERMISSION_READ_WRITE=3 PERMISSION_READ_WRITE value + */ + OpenTableRequest.Permission = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PERMISSION_UNSET"] = 0; + values[valuesById[1] = "PERMISSION_READ"] = 1; + values[valuesById[2] = "PERMISSION_WRITE"] = 2; + values[valuesById[3] = "PERMISSION_READ_WRITE"] = 3; + return values; + })(); + + return OpenTableRequest; + })(); + + v2.OpenTableResponse = (function() { + + /** + * Properties of an OpenTableResponse. + * @memberof google.bigtable.v2 + * @interface IOpenTableResponse + */ + + /** + * Constructs a new OpenTableResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents an OpenTableResponse. + * @implements IOpenTableResponse + * @constructor + * @param {google.bigtable.v2.IOpenTableResponse=} [properties] Properties to set + */ + function OpenTableResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new OpenTableResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {google.bigtable.v2.IOpenTableResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.OpenTableResponse} OpenTableResponse instance + */ + OpenTableResponse.create = function create(properties) { + return new OpenTableResponse(properties); + }; + + /** + * Encodes the specified OpenTableResponse message. Does not implicitly {@link google.bigtable.v2.OpenTableResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {google.bigtable.v2.IOpenTableResponse} message OpenTableResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenTableResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified OpenTableResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenTableResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {google.bigtable.v2.IOpenTableResponse} message OpenTableResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenTableResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OpenTableResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.OpenTableResponse} OpenTableResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenTableResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.OpenTableResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OpenTableResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.OpenTableResponse} OpenTableResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenTableResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenTableResponse message. + * @function verify + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenTableResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an OpenTableResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.OpenTableResponse} OpenTableResponse + */ + OpenTableResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.OpenTableResponse) + return object; + return new $root.google.bigtable.v2.OpenTableResponse(); + }; + + /** + * Creates a plain object from an OpenTableResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {google.bigtable.v2.OpenTableResponse} message OpenTableResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenTableResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OpenTableResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.OpenTableResponse + * @instance + * @returns {Object.} JSON object + */ + OpenTableResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenTableResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.OpenTableResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenTableResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.OpenTableResponse"; + }; + + return OpenTableResponse; + })(); + + v2.OpenAuthorizedViewRequest = (function() { + + /** + * Properties of an OpenAuthorizedViewRequest. + * @memberof google.bigtable.v2 + * @interface IOpenAuthorizedViewRequest + * @property {string|null} [authorizedViewName] OpenAuthorizedViewRequest authorizedViewName + * @property {string|null} [appProfileId] OpenAuthorizedViewRequest appProfileId + * @property {google.bigtable.v2.OpenAuthorizedViewRequest.Permission|null} [permission] OpenAuthorizedViewRequest permission + */ + + /** + * Constructs a new OpenAuthorizedViewRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents an OpenAuthorizedViewRequest. + * @implements IOpenAuthorizedViewRequest + * @constructor + * @param {google.bigtable.v2.IOpenAuthorizedViewRequest=} [properties] Properties to set + */ + function OpenAuthorizedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpenAuthorizedViewRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @instance + */ + OpenAuthorizedViewRequest.prototype.authorizedViewName = ""; + + /** + * OpenAuthorizedViewRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @instance + */ + OpenAuthorizedViewRequest.prototype.appProfileId = ""; + + /** + * OpenAuthorizedViewRequest permission. + * @member {google.bigtable.v2.OpenAuthorizedViewRequest.Permission} permission + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @instance + */ + OpenAuthorizedViewRequest.prototype.permission = 0; + + /** + * Creates a new OpenAuthorizedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {google.bigtable.v2.IOpenAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.OpenAuthorizedViewRequest} OpenAuthorizedViewRequest instance + */ + OpenAuthorizedViewRequest.create = function create(properties) { + return new OpenAuthorizedViewRequest(properties); + }; + + /** + * Encodes the specified OpenAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.v2.OpenAuthorizedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {google.bigtable.v2.IOpenAuthorizedViewRequest} message OpenAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenAuthorizedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.authorizedViewName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.permission); + return writer; + }; + + /** + * Encodes the specified OpenAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenAuthorizedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {google.bigtable.v2.IOpenAuthorizedViewRequest} message OpenAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OpenAuthorizedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.OpenAuthorizedViewRequest} OpenAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenAuthorizedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.OpenAuthorizedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.authorizedViewName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + case 3: { + message.permission = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OpenAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.OpenAuthorizedViewRequest} OpenAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenAuthorizedViewRequest message. + * @function verify + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenAuthorizedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + switch (message.permission) { + default: + return "permission: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an OpenAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.OpenAuthorizedViewRequest} OpenAuthorizedViewRequest + */ + OpenAuthorizedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.OpenAuthorizedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.OpenAuthorizedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.OpenAuthorizedViewRequest(); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + switch (object.permission) { + default: + if (typeof object.permission === "number") { + message.permission = object.permission; + break; + } + break; + case "PERMISSION_UNSET": + case 0: + message.permission = 0; + break; + case "PERMISSION_READ": + case 1: + message.permission = 1; + break; + case "PERMISSION_WRITE": + case 2: + message.permission = 2; + break; + case "PERMISSION_READ_WRITE": + case 3: + message.permission = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an OpenAuthorizedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {google.bigtable.v2.OpenAuthorizedViewRequest} message OpenAuthorizedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenAuthorizedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.authorizedViewName = ""; + object.appProfileId = ""; + object.permission = options.enums === String ? "PERMISSION_UNSET" : 0; + } + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + object.permission = options.enums === String ? $root.google.bigtable.v2.OpenAuthorizedViewRequest.Permission[message.permission] === undefined ? message.permission : $root.google.bigtable.v2.OpenAuthorizedViewRequest.Permission[message.permission] : message.permission; + return object; + }; + + /** + * Converts this OpenAuthorizedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @instance + * @returns {Object.} JSON object + */ + OpenAuthorizedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenAuthorizedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.OpenAuthorizedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.OpenAuthorizedViewRequest"; + }; + + /** + * Permission enum. + * @name google.bigtable.v2.OpenAuthorizedViewRequest.Permission + * @enum {number} + * @property {number} PERMISSION_UNSET=0 PERMISSION_UNSET value + * @property {number} PERMISSION_READ=1 PERMISSION_READ value + * @property {number} PERMISSION_WRITE=2 PERMISSION_WRITE value + * @property {number} PERMISSION_READ_WRITE=3 PERMISSION_READ_WRITE value + */ + OpenAuthorizedViewRequest.Permission = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PERMISSION_UNSET"] = 0; + values[valuesById[1] = "PERMISSION_READ"] = 1; + values[valuesById[2] = "PERMISSION_WRITE"] = 2; + values[valuesById[3] = "PERMISSION_READ_WRITE"] = 3; + return values; + })(); + + return OpenAuthorizedViewRequest; + })(); + + v2.OpenAuthorizedViewResponse = (function() { + + /** + * Properties of an OpenAuthorizedViewResponse. + * @memberof google.bigtable.v2 + * @interface IOpenAuthorizedViewResponse + */ + + /** + * Constructs a new OpenAuthorizedViewResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents an OpenAuthorizedViewResponse. + * @implements IOpenAuthorizedViewResponse + * @constructor + * @param {google.bigtable.v2.IOpenAuthorizedViewResponse=} [properties] Properties to set + */ + function OpenAuthorizedViewResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new OpenAuthorizedViewResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {google.bigtable.v2.IOpenAuthorizedViewResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.OpenAuthorizedViewResponse} OpenAuthorizedViewResponse instance + */ + OpenAuthorizedViewResponse.create = function create(properties) { + return new OpenAuthorizedViewResponse(properties); + }; + + /** + * Encodes the specified OpenAuthorizedViewResponse message. Does not implicitly {@link google.bigtable.v2.OpenAuthorizedViewResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {google.bigtable.v2.IOpenAuthorizedViewResponse} message OpenAuthorizedViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenAuthorizedViewResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified OpenAuthorizedViewResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenAuthorizedViewResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {google.bigtable.v2.IOpenAuthorizedViewResponse} message OpenAuthorizedViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenAuthorizedViewResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OpenAuthorizedViewResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.OpenAuthorizedViewResponse} OpenAuthorizedViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenAuthorizedViewResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.OpenAuthorizedViewResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OpenAuthorizedViewResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.OpenAuthorizedViewResponse} OpenAuthorizedViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenAuthorizedViewResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenAuthorizedViewResponse message. + * @function verify + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenAuthorizedViewResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an OpenAuthorizedViewResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.OpenAuthorizedViewResponse} OpenAuthorizedViewResponse + */ + OpenAuthorizedViewResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.OpenAuthorizedViewResponse) + return object; + return new $root.google.bigtable.v2.OpenAuthorizedViewResponse(); + }; + + /** + * Creates a plain object from an OpenAuthorizedViewResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {google.bigtable.v2.OpenAuthorizedViewResponse} message OpenAuthorizedViewResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenAuthorizedViewResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OpenAuthorizedViewResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @instance + * @returns {Object.} JSON object + */ + OpenAuthorizedViewResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenAuthorizedViewResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.OpenAuthorizedViewResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenAuthorizedViewResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.OpenAuthorizedViewResponse"; + }; + + return OpenAuthorizedViewResponse; + })(); + + v2.OpenMaterializedViewRequest = (function() { + + /** + * Properties of an OpenMaterializedViewRequest. + * @memberof google.bigtable.v2 + * @interface IOpenMaterializedViewRequest + * @property {string|null} [materializedViewName] OpenMaterializedViewRequest materializedViewName + * @property {string|null} [appProfileId] OpenMaterializedViewRequest appProfileId + * @property {google.bigtable.v2.OpenMaterializedViewRequest.Permission|null} [permission] OpenMaterializedViewRequest permission + */ + + /** + * Constructs a new OpenMaterializedViewRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents an OpenMaterializedViewRequest. + * @implements IOpenMaterializedViewRequest + * @constructor + * @param {google.bigtable.v2.IOpenMaterializedViewRequest=} [properties] Properties to set + */ + function OpenMaterializedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpenMaterializedViewRequest materializedViewName. + * @member {string} materializedViewName + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @instance + */ + OpenMaterializedViewRequest.prototype.materializedViewName = ""; + + /** + * OpenMaterializedViewRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @instance + */ + OpenMaterializedViewRequest.prototype.appProfileId = ""; + + /** + * OpenMaterializedViewRequest permission. + * @member {google.bigtable.v2.OpenMaterializedViewRequest.Permission} permission + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @instance + */ + OpenMaterializedViewRequest.prototype.permission = 0; + + /** + * Creates a new OpenMaterializedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {google.bigtable.v2.IOpenMaterializedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.OpenMaterializedViewRequest} OpenMaterializedViewRequest instance + */ + OpenMaterializedViewRequest.create = function create(properties) { + return new OpenMaterializedViewRequest(properties); + }; + + /** + * Encodes the specified OpenMaterializedViewRequest message. Does not implicitly {@link google.bigtable.v2.OpenMaterializedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {google.bigtable.v2.IOpenMaterializedViewRequest} message OpenMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenMaterializedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.materializedViewName); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.permission); + return writer; + }; + + /** + * Encodes the specified OpenMaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenMaterializedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {google.bigtable.v2.IOpenMaterializedViewRequest} message OpenMaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OpenMaterializedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.OpenMaterializedViewRequest} OpenMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenMaterializedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.OpenMaterializedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.materializedViewName = reader.string(); + break; + } + case 2: { + message.appProfileId = reader.string(); + break; + } + case 3: { + message.permission = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OpenMaterializedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.OpenMaterializedViewRequest} OpenMaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenMaterializedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenMaterializedViewRequest message. + * @function verify + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenMaterializedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + if (!$util.isString(message.materializedViewName)) + return "materializedViewName: string expected"; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + switch (message.permission) { + default: + return "permission: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an OpenMaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.OpenMaterializedViewRequest} OpenMaterializedViewRequest + */ + OpenMaterializedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.OpenMaterializedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.OpenMaterializedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.OpenMaterializedViewRequest(); + if (object.materializedViewName != null) + message.materializedViewName = String(object.materializedViewName); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + switch (object.permission) { + default: + if (typeof object.permission === "number") { + message.permission = object.permission; + break; + } + break; + case "PERMISSION_UNSET": + case 0: + message.permission = 0; + break; + case "PERMISSION_READ": + case 1: + message.permission = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an OpenMaterializedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {google.bigtable.v2.OpenMaterializedViewRequest} message OpenMaterializedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenMaterializedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.materializedViewName = ""; + object.appProfileId = ""; + object.permission = options.enums === String ? "PERMISSION_UNSET" : 0; + } + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) + object.materializedViewName = message.materializedViewName; + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + object.appProfileId = message.appProfileId; + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + object.permission = options.enums === String ? $root.google.bigtable.v2.OpenMaterializedViewRequest.Permission[message.permission] === undefined ? message.permission : $root.google.bigtable.v2.OpenMaterializedViewRequest.Permission[message.permission] : message.permission; + return object; + }; + + /** + * Converts this OpenMaterializedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @instance + * @returns {Object.} JSON object + */ + OpenMaterializedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenMaterializedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.OpenMaterializedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenMaterializedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.OpenMaterializedViewRequest"; + }; + + /** + * Permission enum. + * @name google.bigtable.v2.OpenMaterializedViewRequest.Permission + * @enum {number} + * @property {number} PERMISSION_UNSET=0 PERMISSION_UNSET value + * @property {number} PERMISSION_READ=1 PERMISSION_READ value + */ + OpenMaterializedViewRequest.Permission = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PERMISSION_UNSET"] = 0; + values[valuesById[1] = "PERMISSION_READ"] = 1; + return values; + })(); + + return OpenMaterializedViewRequest; + })(); + + v2.OpenMaterializedViewResponse = (function() { + + /** + * Properties of an OpenMaterializedViewResponse. + * @memberof google.bigtable.v2 + * @interface IOpenMaterializedViewResponse + */ + + /** + * Constructs a new OpenMaterializedViewResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents an OpenMaterializedViewResponse. + * @implements IOpenMaterializedViewResponse + * @constructor + * @param {google.bigtable.v2.IOpenMaterializedViewResponse=} [properties] Properties to set + */ + function OpenMaterializedViewResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new OpenMaterializedViewResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {google.bigtable.v2.IOpenMaterializedViewResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.OpenMaterializedViewResponse} OpenMaterializedViewResponse instance + */ + OpenMaterializedViewResponse.create = function create(properties) { + return new OpenMaterializedViewResponse(properties); + }; + + /** + * Encodes the specified OpenMaterializedViewResponse message. Does not implicitly {@link google.bigtable.v2.OpenMaterializedViewResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {google.bigtable.v2.IOpenMaterializedViewResponse} message OpenMaterializedViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenMaterializedViewResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified OpenMaterializedViewResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.OpenMaterializedViewResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {google.bigtable.v2.IOpenMaterializedViewResponse} message OpenMaterializedViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenMaterializedViewResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OpenMaterializedViewResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.OpenMaterializedViewResponse} OpenMaterializedViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenMaterializedViewResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.OpenMaterializedViewResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OpenMaterializedViewResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.OpenMaterializedViewResponse} OpenMaterializedViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenMaterializedViewResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenMaterializedViewResponse message. + * @function verify + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenMaterializedViewResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an OpenMaterializedViewResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.OpenMaterializedViewResponse} OpenMaterializedViewResponse + */ + OpenMaterializedViewResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.OpenMaterializedViewResponse) + return object; + return new $root.google.bigtable.v2.OpenMaterializedViewResponse(); + }; + + /** + * Creates a plain object from an OpenMaterializedViewResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {google.bigtable.v2.OpenMaterializedViewResponse} message OpenMaterializedViewResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenMaterializedViewResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OpenMaterializedViewResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @instance + * @returns {Object.} JSON object + */ + OpenMaterializedViewResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenMaterializedViewResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.OpenMaterializedViewResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenMaterializedViewResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.OpenMaterializedViewResponse"; + }; + + return OpenMaterializedViewResponse; + })(); + + v2.VirtualRpcRequest = (function() { + + /** + * Properties of a VirtualRpcRequest. + * @memberof google.bigtable.v2 + * @interface IVirtualRpcRequest + * @property {number|Long|null} [rpcId] VirtualRpcRequest rpcId + * @property {google.protobuf.IDuration|null} [deadline] VirtualRpcRequest deadline + * @property {google.bigtable.v2.VirtualRpcRequest.IMetadata|null} [metadata] VirtualRpcRequest metadata + * @property {Uint8Array|null} [payload] VirtualRpcRequest payload + */ + + /** + * Constructs a new VirtualRpcRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a VirtualRpcRequest. + * @implements IVirtualRpcRequest + * @constructor + * @param {google.bigtable.v2.IVirtualRpcRequest=} [properties] Properties to set + */ + function VirtualRpcRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * VirtualRpcRequest rpcId. + * @member {number|Long} rpcId + * @memberof google.bigtable.v2.VirtualRpcRequest + * @instance + */ + VirtualRpcRequest.prototype.rpcId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * VirtualRpcRequest deadline. + * @member {google.protobuf.IDuration|null|undefined} deadline + * @memberof google.bigtable.v2.VirtualRpcRequest + * @instance + */ + VirtualRpcRequest.prototype.deadline = null; + + /** + * VirtualRpcRequest metadata. + * @member {google.bigtable.v2.VirtualRpcRequest.IMetadata|null|undefined} metadata + * @memberof google.bigtable.v2.VirtualRpcRequest + * @instance + */ + VirtualRpcRequest.prototype.metadata = null; + + /** + * VirtualRpcRequest payload. + * @member {Uint8Array} payload + * @memberof google.bigtable.v2.VirtualRpcRequest + * @instance + */ + VirtualRpcRequest.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new VirtualRpcRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {google.bigtable.v2.IVirtualRpcRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.VirtualRpcRequest} VirtualRpcRequest instance + */ + VirtualRpcRequest.create = function create(properties) { + return new VirtualRpcRequest(properties); + }; + + /** + * Encodes the specified VirtualRpcRequest message. Does not implicitly {@link google.bigtable.v2.VirtualRpcRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {google.bigtable.v2.IVirtualRpcRequest} message VirtualRpcRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualRpcRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rpcId); + if (message.deadline != null && Object.hasOwnProperty.call(message, "deadline")) + $root.google.protobuf.Duration.encode(message.deadline, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.bigtable.v2.VirtualRpcRequest.Metadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.payload); + return writer; + }; + + /** + * Encodes the specified VirtualRpcRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.VirtualRpcRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {google.bigtable.v2.IVirtualRpcRequest} message VirtualRpcRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualRpcRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a VirtualRpcRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.VirtualRpcRequest} VirtualRpcRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualRpcRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.VirtualRpcRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rpcId = reader.int64(); + break; + } + case 2: { + message.deadline = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.metadata = $root.google.bigtable.v2.VirtualRpcRequest.Metadata.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.payload = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VirtualRpcRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.VirtualRpcRequest} VirtualRpcRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualRpcRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VirtualRpcRequest message. + * @function verify + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VirtualRpcRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + if (!$util.isInteger(message.rpcId) && !(message.rpcId && $util.isInteger(message.rpcId.low) && $util.isInteger(message.rpcId.high))) + return "rpcId: integer|Long expected"; + if (message.deadline != null && Object.hasOwnProperty.call(message, "deadline")) { + var error = $root.google.protobuf.Duration.verify(message.deadline, long + 1); + if (error) + return "deadline." + error; + } + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + var error = $root.google.bigtable.v2.VirtualRpcRequest.Metadata.verify(message.metadata, long + 1); + if (error) + return "metadata." + error; + } + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates a VirtualRpcRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.VirtualRpcRequest} VirtualRpcRequest + */ + VirtualRpcRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.VirtualRpcRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.VirtualRpcRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.VirtualRpcRequest(); + if (object.rpcId != null) + if ($util.Long) + message.rpcId = $util.Long.fromValue(object.rpcId, false); + else if (typeof object.rpcId === "string") + message.rpcId = parseInt(object.rpcId, 10); + else if (typeof object.rpcId === "number") + message.rpcId = object.rpcId; + else if (typeof object.rpcId === "object") + message.rpcId = new $util.LongBits(object.rpcId.low >>> 0, object.rpcId.high >>> 0).toNumber(); + if (object.deadline != null) { + if (!$util.isObject(object.deadline)) + throw TypeError(".google.bigtable.v2.VirtualRpcRequest.deadline: object expected"); + message.deadline = $root.google.protobuf.Duration.fromObject(object.deadline, long + 1); + } + if (object.metadata != null) { + if (!$util.isObject(object.metadata)) + throw TypeError(".google.bigtable.v2.VirtualRpcRequest.metadata: object expected"); + message.metadata = $root.google.bigtable.v2.VirtualRpcRequest.Metadata.fromObject(object.metadata, long + 1); + } + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length >= 0) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from a VirtualRpcRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {google.bigtable.v2.VirtualRpcRequest} message VirtualRpcRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VirtualRpcRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rpcId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.rpcId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.deadline = null; + object.metadata = null; + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rpcId = typeof message.rpcId === "number" ? BigInt(message.rpcId) : $util.Long.fromBits(message.rpcId.low >>> 0, message.rpcId.high >>> 0, false).toBigInt(); + else if (typeof message.rpcId === "number") + object.rpcId = options.longs === String ? String(message.rpcId) : message.rpcId; + else + object.rpcId = options.longs === String ? $util.Long.prototype.toString.call(message.rpcId) : options.longs === Number ? new $util.LongBits(message.rpcId.low >>> 0, message.rpcId.high >>> 0).toNumber() : message.rpcId; + if (message.deadline != null && Object.hasOwnProperty.call(message, "deadline")) + object.deadline = $root.google.protobuf.Duration.toObject(message.deadline, options, q + 1); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.bigtable.v2.VirtualRpcRequest.Metadata.toObject(message.metadata, options, q + 1); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + return object; + }; + + /** + * Converts this VirtualRpcRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.VirtualRpcRequest + * @instance + * @returns {Object.} JSON object + */ + VirtualRpcRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VirtualRpcRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.VirtualRpcRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VirtualRpcRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.VirtualRpcRequest"; + }; + + VirtualRpcRequest.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.bigtable.v2.VirtualRpcRequest + * @interface IMetadata + * @property {number|Long|null} [attemptNumber] Metadata attemptNumber + * @property {google.protobuf.ITimestamp|null} [attemptStart] Metadata attemptStart + * @property {string|null} [traceparent] Metadata traceparent + */ + + /** + * Constructs a new Metadata. + * @memberof google.bigtable.v2.VirtualRpcRequest + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.bigtable.v2.VirtualRpcRequest.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata attemptNumber. + * @member {number|Long} attemptNumber + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @instance + */ + Metadata.prototype.attemptNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Metadata attemptStart. + * @member {google.protobuf.ITimestamp|null|undefined} attemptStart + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @instance + */ + Metadata.prototype.attemptStart = null; + + /** + * Metadata traceparent. + * @member {string} traceparent + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @instance + */ + Metadata.prototype.traceparent = ""; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {google.bigtable.v2.VirtualRpcRequest.IMetadata=} [properties] Properties to set + * @returns {google.bigtable.v2.VirtualRpcRequest.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.bigtable.v2.VirtualRpcRequest.Metadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {google.bigtable.v2.VirtualRpcRequest.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.attemptNumber != null && Object.hasOwnProperty.call(message, "attemptNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.attemptNumber); + if (message.attemptStart != null && Object.hasOwnProperty.call(message, "attemptStart")) + $root.google.protobuf.Timestamp.encode(message.attemptStart, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.traceparent != null && Object.hasOwnProperty.call(message, "traceparent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.traceparent); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.bigtable.v2.VirtualRpcRequest.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {google.bigtable.v2.VirtualRpcRequest.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.VirtualRpcRequest.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.VirtualRpcRequest.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.attemptNumber = reader.int64(); + break; + } + case 2: { + message.attemptStart = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.traceparent = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.VirtualRpcRequest.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.attemptNumber != null && Object.hasOwnProperty.call(message, "attemptNumber")) + if (!$util.isInteger(message.attemptNumber) && !(message.attemptNumber && $util.isInteger(message.attemptNumber.low) && $util.isInteger(message.attemptNumber.high))) + return "attemptNumber: integer|Long expected"; + if (message.attemptStart != null && Object.hasOwnProperty.call(message, "attemptStart")) { + var error = $root.google.protobuf.Timestamp.verify(message.attemptStart, long + 1); + if (error) + return "attemptStart." + error; + } + if (message.traceparent != null && Object.hasOwnProperty.call(message, "traceparent")) + if (!$util.isString(message.traceparent)) + return "traceparent: string expected"; + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.VirtualRpcRequest.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.VirtualRpcRequest.Metadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.VirtualRpcRequest.Metadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.VirtualRpcRequest.Metadata(); + if (object.attemptNumber != null) + if ($util.Long) + message.attemptNumber = $util.Long.fromValue(object.attemptNumber, false); + else if (typeof object.attemptNumber === "string") + message.attemptNumber = parseInt(object.attemptNumber, 10); + else if (typeof object.attemptNumber === "number") + message.attemptNumber = object.attemptNumber; + else if (typeof object.attemptNumber === "object") + message.attemptNumber = new $util.LongBits(object.attemptNumber.low >>> 0, object.attemptNumber.high >>> 0).toNumber(); + if (object.attemptStart != null) { + if (!$util.isObject(object.attemptStart)) + throw TypeError(".google.bigtable.v2.VirtualRpcRequest.Metadata.attemptStart: object expected"); + message.attemptStart = $root.google.protobuf.Timestamp.fromObject(object.attemptStart, long + 1); + } + if (object.traceparent != null) + message.traceparent = String(object.traceparent); + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {google.bigtable.v2.VirtualRpcRequest.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.attemptNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.attemptNumber = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.attemptStart = null; + object.traceparent = ""; + } + if (message.attemptNumber != null && Object.hasOwnProperty.call(message, "attemptNumber")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.attemptNumber = typeof message.attemptNumber === "number" ? BigInt(message.attemptNumber) : $util.Long.fromBits(message.attemptNumber.low >>> 0, message.attemptNumber.high >>> 0, false).toBigInt(); + else if (typeof message.attemptNumber === "number") + object.attemptNumber = options.longs === String ? String(message.attemptNumber) : message.attemptNumber; + else + object.attemptNumber = options.longs === String ? $util.Long.prototype.toString.call(message.attemptNumber) : options.longs === Number ? new $util.LongBits(message.attemptNumber.low >>> 0, message.attemptNumber.high >>> 0).toNumber() : message.attemptNumber; + if (message.attemptStart != null && Object.hasOwnProperty.call(message, "attemptStart")) + object.attemptStart = $root.google.protobuf.Timestamp.toObject(message.attemptStart, options, q + 1); + if (message.traceparent != null && Object.hasOwnProperty.call(message, "traceparent")) + object.traceparent = message.traceparent; + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.bigtable.v2.VirtualRpcRequest.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.VirtualRpcRequest.Metadata"; + }; + + return Metadata; + })(); + + return VirtualRpcRequest; + })(); + + v2.ClusterInformation = (function() { + + /** + * Properties of a ClusterInformation. + * @memberof google.bigtable.v2 + * @interface IClusterInformation + * @property {string|null} [clusterId] ClusterInformation clusterId + * @property {string|null} [zoneId] ClusterInformation zoneId + */ + + /** + * Constructs a new ClusterInformation. + * @memberof google.bigtable.v2 + * @classdesc Represents a ClusterInformation. + * @implements IClusterInformation + * @constructor + * @param {google.bigtable.v2.IClusterInformation=} [properties] Properties to set + */ + function ClusterInformation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterInformation clusterId. + * @member {string} clusterId + * @memberof google.bigtable.v2.ClusterInformation + * @instance + */ + ClusterInformation.prototype.clusterId = ""; + + /** + * ClusterInformation zoneId. + * @member {string} zoneId + * @memberof google.bigtable.v2.ClusterInformation + * @instance + */ + ClusterInformation.prototype.zoneId = ""; + + /** + * Creates a new ClusterInformation instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {google.bigtable.v2.IClusterInformation=} [properties] Properties to set + * @returns {google.bigtable.v2.ClusterInformation} ClusterInformation instance + */ + ClusterInformation.create = function create(properties) { + return new ClusterInformation(properties); + }; + + /** + * Encodes the specified ClusterInformation message. Does not implicitly {@link google.bigtable.v2.ClusterInformation.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {google.bigtable.v2.IClusterInformation} message ClusterInformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterInformation.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); + return writer; + }; + + /** + * Encodes the specified ClusterInformation message, length delimited. Does not implicitly {@link google.bigtable.v2.ClusterInformation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {google.bigtable.v2.IClusterInformation} message ClusterInformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterInformation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ClusterInformation message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ClusterInformation} ClusterInformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterInformation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ClusterInformation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.clusterId = reader.string(); + break; + } + case 2: { + message.zoneId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterInformation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ClusterInformation} ClusterInformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterInformation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterInformation message. + * @function verify + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterInformation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + return null; + }; + + /** + * Creates a ClusterInformation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ClusterInformation} ClusterInformation + */ + ClusterInformation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ClusterInformation) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ClusterInformation: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ClusterInformation(); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + return message; + }; + + /** + * Creates a plain object from a ClusterInformation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {google.bigtable.v2.ClusterInformation} message ClusterInformation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterInformation.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.clusterId = ""; + object.zoneId = ""; + } + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + object.clusterId = message.clusterId; + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + object.zoneId = message.zoneId; + return object; + }; + + /** + * Converts this ClusterInformation to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ClusterInformation + * @instance + * @returns {Object.} JSON object + */ + ClusterInformation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterInformation + * @function getTypeUrl + * @memberof google.bigtable.v2.ClusterInformation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterInformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ClusterInformation"; + }; + + return ClusterInformation; + })(); + + v2.SessionRequestStats = (function() { + + /** + * Properties of a SessionRequestStats. + * @memberof google.bigtable.v2 + * @interface ISessionRequestStats + * @property {google.protobuf.IDuration|null} [backendLatency] SessionRequestStats backendLatency + */ + + /** + * Constructs a new SessionRequestStats. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionRequestStats. + * @implements ISessionRequestStats + * @constructor + * @param {google.bigtable.v2.ISessionRequestStats=} [properties] Properties to set + */ + function SessionRequestStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionRequestStats backendLatency. + * @member {google.protobuf.IDuration|null|undefined} backendLatency + * @memberof google.bigtable.v2.SessionRequestStats + * @instance + */ + SessionRequestStats.prototype.backendLatency = null; + + /** + * Creates a new SessionRequestStats instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {google.bigtable.v2.ISessionRequestStats=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionRequestStats} SessionRequestStats instance + */ + SessionRequestStats.create = function create(properties) { + return new SessionRequestStats(properties); + }; + + /** + * Encodes the specified SessionRequestStats message. Does not implicitly {@link google.bigtable.v2.SessionRequestStats.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {google.bigtable.v2.ISessionRequestStats} message SessionRequestStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionRequestStats.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.backendLatency != null && Object.hasOwnProperty.call(message, "backendLatency")) + $root.google.protobuf.Duration.encode(message.backendLatency, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionRequestStats message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionRequestStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {google.bigtable.v2.ISessionRequestStats} message SessionRequestStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionRequestStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionRequestStats message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionRequestStats} SessionRequestStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionRequestStats.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionRequestStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.backendLatency = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionRequestStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionRequestStats} SessionRequestStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionRequestStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionRequestStats message. + * @function verify + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionRequestStats.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.backendLatency != null && Object.hasOwnProperty.call(message, "backendLatency")) { + var error = $root.google.protobuf.Duration.verify(message.backendLatency, long + 1); + if (error) + return "backendLatency." + error; + } + return null; + }; + + /** + * Creates a SessionRequestStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionRequestStats} SessionRequestStats + */ + SessionRequestStats.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionRequestStats) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionRequestStats: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionRequestStats(); + if (object.backendLatency != null) { + if (!$util.isObject(object.backendLatency)) + throw TypeError(".google.bigtable.v2.SessionRequestStats.backendLatency: object expected"); + message.backendLatency = $root.google.protobuf.Duration.fromObject(object.backendLatency, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SessionRequestStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {google.bigtable.v2.SessionRequestStats} message SessionRequestStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionRequestStats.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.backendLatency = null; + if (message.backendLatency != null && Object.hasOwnProperty.call(message, "backendLatency")) + object.backendLatency = $root.google.protobuf.Duration.toObject(message.backendLatency, options, q + 1); + return object; + }; + + /** + * Converts this SessionRequestStats to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionRequestStats + * @instance + * @returns {Object.} JSON object + */ + SessionRequestStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionRequestStats + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionRequestStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionRequestStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionRequestStats"; + }; + + return SessionRequestStats; + })(); + + v2.VirtualRpcResponse = (function() { + + /** + * Properties of a VirtualRpcResponse. + * @memberof google.bigtable.v2 + * @interface IVirtualRpcResponse + * @property {number|Long|null} [rpcId] VirtualRpcResponse rpcId + * @property {google.bigtable.v2.IClusterInformation|null} [clusterInfo] VirtualRpcResponse clusterInfo + * @property {google.bigtable.v2.ISessionRequestStats|null} [stats] VirtualRpcResponse stats + * @property {Uint8Array|null} [payload] VirtualRpcResponse payload + */ + + /** + * Constructs a new VirtualRpcResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a VirtualRpcResponse. + * @implements IVirtualRpcResponse + * @constructor + * @param {google.bigtable.v2.IVirtualRpcResponse=} [properties] Properties to set + */ + function VirtualRpcResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * VirtualRpcResponse rpcId. + * @member {number|Long} rpcId + * @memberof google.bigtable.v2.VirtualRpcResponse + * @instance + */ + VirtualRpcResponse.prototype.rpcId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * VirtualRpcResponse clusterInfo. + * @member {google.bigtable.v2.IClusterInformation|null|undefined} clusterInfo + * @memberof google.bigtable.v2.VirtualRpcResponse + * @instance + */ + VirtualRpcResponse.prototype.clusterInfo = null; + + /** + * VirtualRpcResponse stats. + * @member {google.bigtable.v2.ISessionRequestStats|null|undefined} stats + * @memberof google.bigtable.v2.VirtualRpcResponse + * @instance + */ + VirtualRpcResponse.prototype.stats = null; + + /** + * VirtualRpcResponse payload. + * @member {Uint8Array} payload + * @memberof google.bigtable.v2.VirtualRpcResponse + * @instance + */ + VirtualRpcResponse.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new VirtualRpcResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {google.bigtable.v2.IVirtualRpcResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.VirtualRpcResponse} VirtualRpcResponse instance + */ + VirtualRpcResponse.create = function create(properties) { + return new VirtualRpcResponse(properties); + }; + + /** + * Encodes the specified VirtualRpcResponse message. Does not implicitly {@link google.bigtable.v2.VirtualRpcResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {google.bigtable.v2.IVirtualRpcResponse} message VirtualRpcResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualRpcResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rpcId); + if (message.clusterInfo != null && Object.hasOwnProperty.call(message, "clusterInfo")) + $root.google.bigtable.v2.ClusterInformation.encode(message.clusterInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.bigtable.v2.SessionRequestStats.encode(message.stats, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified VirtualRpcResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.VirtualRpcResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {google.bigtable.v2.IVirtualRpcResponse} message VirtualRpcResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualRpcResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a VirtualRpcResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.VirtualRpcResponse} VirtualRpcResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualRpcResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.VirtualRpcResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rpcId = reader.int64(); + break; + } + case 2: { + message.clusterInfo = $root.google.bigtable.v2.ClusterInformation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.stats = $root.google.bigtable.v2.SessionRequestStats.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.payload = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VirtualRpcResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.VirtualRpcResponse} VirtualRpcResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualRpcResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VirtualRpcResponse message. + * @function verify + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VirtualRpcResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + if (!$util.isInteger(message.rpcId) && !(message.rpcId && $util.isInteger(message.rpcId.low) && $util.isInteger(message.rpcId.high))) + return "rpcId: integer|Long expected"; + if (message.clusterInfo != null && Object.hasOwnProperty.call(message, "clusterInfo")) { + var error = $root.google.bigtable.v2.ClusterInformation.verify(message.clusterInfo, long + 1); + if (error) + return "clusterInfo." + error; + } + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) { + var error = $root.google.bigtable.v2.SessionRequestStats.verify(message.stats, long + 1); + if (error) + return "stats." + error; + } + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates a VirtualRpcResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.VirtualRpcResponse} VirtualRpcResponse + */ + VirtualRpcResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.VirtualRpcResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.VirtualRpcResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.VirtualRpcResponse(); + if (object.rpcId != null) + if ($util.Long) + message.rpcId = $util.Long.fromValue(object.rpcId, false); + else if (typeof object.rpcId === "string") + message.rpcId = parseInt(object.rpcId, 10); + else if (typeof object.rpcId === "number") + message.rpcId = object.rpcId; + else if (typeof object.rpcId === "object") + message.rpcId = new $util.LongBits(object.rpcId.low >>> 0, object.rpcId.high >>> 0).toNumber(); + if (object.clusterInfo != null) { + if (!$util.isObject(object.clusterInfo)) + throw TypeError(".google.bigtable.v2.VirtualRpcResponse.clusterInfo: object expected"); + message.clusterInfo = $root.google.bigtable.v2.ClusterInformation.fromObject(object.clusterInfo, long + 1); + } + if (object.stats != null) { + if (!$util.isObject(object.stats)) + throw TypeError(".google.bigtable.v2.VirtualRpcResponse.stats: object expected"); + message.stats = $root.google.bigtable.v2.SessionRequestStats.fromObject(object.stats, long + 1); + } + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length >= 0) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from a VirtualRpcResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {google.bigtable.v2.VirtualRpcResponse} message VirtualRpcResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VirtualRpcResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rpcId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.rpcId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.clusterInfo = null; + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + object.stats = null; + } + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rpcId = typeof message.rpcId === "number" ? BigInt(message.rpcId) : $util.Long.fromBits(message.rpcId.low >>> 0, message.rpcId.high >>> 0, false).toBigInt(); + else if (typeof message.rpcId === "number") + object.rpcId = options.longs === String ? String(message.rpcId) : message.rpcId; + else + object.rpcId = options.longs === String ? $util.Long.prototype.toString.call(message.rpcId) : options.longs === Number ? new $util.LongBits(message.rpcId.low >>> 0, message.rpcId.high >>> 0).toNumber() : message.rpcId; + if (message.clusterInfo != null && Object.hasOwnProperty.call(message, "clusterInfo")) + object.clusterInfo = $root.google.bigtable.v2.ClusterInformation.toObject(message.clusterInfo, options, q + 1); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + object.stats = $root.google.bigtable.v2.SessionRequestStats.toObject(message.stats, options, q + 1); + return object; + }; + + /** + * Converts this VirtualRpcResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.VirtualRpcResponse + * @instance + * @returns {Object.} JSON object + */ + VirtualRpcResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VirtualRpcResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.VirtualRpcResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VirtualRpcResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.VirtualRpcResponse"; + }; + + return VirtualRpcResponse; + })(); + + v2.ErrorResponse = (function() { + + /** + * Properties of an ErrorResponse. + * @memberof google.bigtable.v2 + * @interface IErrorResponse + * @property {number|Long|null} [rpcId] ErrorResponse rpcId + * @property {google.bigtable.v2.IClusterInformation|null} [clusterInfo] ErrorResponse clusterInfo + * @property {google.rpc.IStatus|null} [status] ErrorResponse status + * @property {google.rpc.IRetryInfo|null} [retryInfo] ErrorResponse retryInfo + */ + + /** + * Constructs a new ErrorResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents an ErrorResponse. + * @implements IErrorResponse + * @constructor + * @param {google.bigtable.v2.IErrorResponse=} [properties] Properties to set + */ + function ErrorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorResponse rpcId. + * @member {number|Long} rpcId + * @memberof google.bigtable.v2.ErrorResponse + * @instance + */ + ErrorResponse.prototype.rpcId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ErrorResponse clusterInfo. + * @member {google.bigtable.v2.IClusterInformation|null|undefined} clusterInfo + * @memberof google.bigtable.v2.ErrorResponse + * @instance + */ + ErrorResponse.prototype.clusterInfo = null; + + /** + * ErrorResponse status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.bigtable.v2.ErrorResponse + * @instance + */ + ErrorResponse.prototype.status = null; + + /** + * ErrorResponse retryInfo. + * @member {google.rpc.IRetryInfo|null|undefined} retryInfo + * @memberof google.bigtable.v2.ErrorResponse + * @instance + */ + ErrorResponse.prototype.retryInfo = null; + + /** + * Creates a new ErrorResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {google.bigtable.v2.IErrorResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.ErrorResponse} ErrorResponse instance + */ + ErrorResponse.create = function create(properties) { + return new ErrorResponse(properties); + }; + + /** + * Encodes the specified ErrorResponse message. Does not implicitly {@link google.bigtable.v2.ErrorResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {google.bigtable.v2.IErrorResponse} message ErrorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rpcId); + if (message.clusterInfo != null && Object.hasOwnProperty.call(message, "clusterInfo")) + $root.google.bigtable.v2.ClusterInformation.encode(message.clusterInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) + $root.google.rpc.RetryInfo.encode(message.retryInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.ErrorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {google.bigtable.v2.IErrorResponse} message ErrorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an ErrorResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ErrorResponse} ErrorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ErrorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rpcId = reader.int64(); + break; + } + case 2: { + message.clusterInfo = $root.google.bigtable.v2.ClusterInformation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.retryInfo = $root.google.rpc.RetryInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ErrorResponse} ErrorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorResponse message. + * @function verify + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + if (!$util.isInteger(message.rpcId) && !(message.rpcId && $util.isInteger(message.rpcId.low) && $util.isInteger(message.rpcId.high))) + return "rpcId: integer|Long expected"; + if (message.clusterInfo != null && Object.hasOwnProperty.call(message, "clusterInfo")) { + var error = $root.google.bigtable.v2.ClusterInformation.verify(message.clusterInfo, long + 1); + if (error) + return "clusterInfo." + error; + } + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { + var error = $root.google.rpc.Status.verify(message.status, long + 1); + if (error) + return "status." + error; + } + if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) { + var error = $root.google.rpc.RetryInfo.verify(message.retryInfo, long + 1); + if (error) + return "retryInfo." + error; + } + return null; + }; + + /** + * Creates an ErrorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ErrorResponse} ErrorResponse + */ + ErrorResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ErrorResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ErrorResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ErrorResponse(); + if (object.rpcId != null) + if ($util.Long) + message.rpcId = $util.Long.fromValue(object.rpcId, false); + else if (typeof object.rpcId === "string") + message.rpcId = parseInt(object.rpcId, 10); + else if (typeof object.rpcId === "number") + message.rpcId = object.rpcId; + else if (typeof object.rpcId === "object") + message.rpcId = new $util.LongBits(object.rpcId.low >>> 0, object.rpcId.high >>> 0).toNumber(); + if (object.clusterInfo != null) { + if (!$util.isObject(object.clusterInfo)) + throw TypeError(".google.bigtable.v2.ErrorResponse.clusterInfo: object expected"); + message.clusterInfo = $root.google.bigtable.v2.ClusterInformation.fromObject(object.clusterInfo, long + 1); + } + if (object.status != null) { + if (!$util.isObject(object.status)) + throw TypeError(".google.bigtable.v2.ErrorResponse.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status, long + 1); + } + if (object.retryInfo != null) { + if (!$util.isObject(object.retryInfo)) + throw TypeError(".google.bigtable.v2.ErrorResponse.retryInfo: object expected"); + message.retryInfo = $root.google.rpc.RetryInfo.fromObject(object.retryInfo, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ErrorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {google.bigtable.v2.ErrorResponse} message ErrorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rpcId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.rpcId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.clusterInfo = null; + object.status = null; + object.retryInfo = null; + } + if (message.rpcId != null && Object.hasOwnProperty.call(message, "rpcId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rpcId = typeof message.rpcId === "number" ? BigInt(message.rpcId) : $util.Long.fromBits(message.rpcId.low >>> 0, message.rpcId.high >>> 0, false).toBigInt(); + else if (typeof message.rpcId === "number") + object.rpcId = options.longs === String ? String(message.rpcId) : message.rpcId; + else + object.rpcId = options.longs === String ? $util.Long.prototype.toString.call(message.rpcId) : options.longs === Number ? new $util.LongBits(message.rpcId.low >>> 0, message.rpcId.high >>> 0).toNumber() : message.rpcId; + if (message.clusterInfo != null && Object.hasOwnProperty.call(message, "clusterInfo")) + object.clusterInfo = $root.google.bigtable.v2.ClusterInformation.toObject(message.clusterInfo, options, q + 1); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + object.status = $root.google.rpc.Status.toObject(message.status, options, q + 1); + if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) + object.retryInfo = $root.google.rpc.RetryInfo.toObject(message.retryInfo, options, q + 1); + return object; + }; + + /** + * Converts this ErrorResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ErrorResponse + * @instance + * @returns {Object.} JSON object + */ + ErrorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.ErrorResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ErrorResponse"; + }; + + return ErrorResponse; + })(); + + v2.TableRequest = (function() { + + /** + * Properties of a TableRequest. + * @memberof google.bigtable.v2 + * @interface ITableRequest + * @property {google.bigtable.v2.ISessionReadRowRequest|null} [readRow] TableRequest readRow + * @property {google.bigtable.v2.ISessionMutateRowRequest|null} [mutateRow] TableRequest mutateRow + */ + + /** + * Constructs a new TableRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a TableRequest. + * @implements ITableRequest + * @constructor + * @param {google.bigtable.v2.ITableRequest=} [properties] Properties to set + */ + function TableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableRequest readRow. + * @member {google.bigtable.v2.ISessionReadRowRequest|null|undefined} readRow + * @memberof google.bigtable.v2.TableRequest + * @instance + */ + TableRequest.prototype.readRow = null; + + /** + * TableRequest mutateRow. + * @member {google.bigtable.v2.ISessionMutateRowRequest|null|undefined} mutateRow + * @memberof google.bigtable.v2.TableRequest + * @instance + */ + TableRequest.prototype.mutateRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TableRequest payload. + * @member {"readRow"|"mutateRow"|undefined} payload + * @memberof google.bigtable.v2.TableRequest + * @instance + */ + Object.defineProperty(TableRequest.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["readRow", "mutateRow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TableRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {google.bigtable.v2.ITableRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.TableRequest} TableRequest instance + */ + TableRequest.create = function create(properties) { + return new TableRequest(properties); + }; + + /** + * Encodes the specified TableRequest message. Does not implicitly {@link google.bigtable.v2.TableRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {google.bigtable.v2.ITableRequest} message TableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) + $root.google.bigtable.v2.SessionReadRowRequest.encode(message.readRow, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) + $root.google.bigtable.v2.SessionMutateRowRequest.encode(message.mutateRow, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified TableRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.TableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {google.bigtable.v2.ITableRequest} message TableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.TableRequest} TableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.TableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.readRow = $root.google.bigtable.v2.SessionReadRowRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.mutateRow = $root.google.bigtable.v2.SessionMutateRowRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.TableRequest} TableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableRequest message. + * @function verify + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionReadRowRequest.verify(message.readRow, long + 1); + if (error) + return "readRow." + error; + } + } + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionMutateRowRequest.verify(message.mutateRow, long + 1); + if (error) + return "mutateRow." + error; + } + } + return null; + }; + + /** + * Creates a TableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.TableRequest} TableRequest + */ + TableRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.TableRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.TableRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.TableRequest(); + if (object.readRow != null) { + if (!$util.isObject(object.readRow)) + throw TypeError(".google.bigtable.v2.TableRequest.readRow: object expected"); + message.readRow = $root.google.bigtable.v2.SessionReadRowRequest.fromObject(object.readRow, long + 1); + } + if (object.mutateRow != null) { + if (!$util.isObject(object.mutateRow)) + throw TypeError(".google.bigtable.v2.TableRequest.mutateRow: object expected"); + message.mutateRow = $root.google.bigtable.v2.SessionMutateRowRequest.fromObject(object.mutateRow, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {google.bigtable.v2.TableRequest} message TableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + object.readRow = $root.google.bigtable.v2.SessionReadRowRequest.toObject(message.readRow, options, q + 1); + if (options.oneofs) + object.payload = "readRow"; + } + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) { + object.mutateRow = $root.google.bigtable.v2.SessionMutateRowRequest.toObject(message.mutateRow, options, q + 1); + if (options.oneofs) + object.payload = "mutateRow"; + } + return object; + }; + + /** + * Converts this TableRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.TableRequest + * @instance + * @returns {Object.} JSON object + */ + TableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.TableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.TableRequest"; + }; + + return TableRequest; + })(); + + v2.TableResponse = (function() { + + /** + * Properties of a TableResponse. + * @memberof google.bigtable.v2 + * @interface ITableResponse + * @property {google.bigtable.v2.ISessionReadRowResponse|null} [readRow] TableResponse readRow + * @property {google.bigtable.v2.ISessionMutateRowResponse|null} [mutateRow] TableResponse mutateRow + */ + + /** + * Constructs a new TableResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a TableResponse. + * @implements ITableResponse + * @constructor + * @param {google.bigtable.v2.ITableResponse=} [properties] Properties to set + */ + function TableResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableResponse readRow. + * @member {google.bigtable.v2.ISessionReadRowResponse|null|undefined} readRow + * @memberof google.bigtable.v2.TableResponse + * @instance + */ + TableResponse.prototype.readRow = null; + + /** + * TableResponse mutateRow. + * @member {google.bigtable.v2.ISessionMutateRowResponse|null|undefined} mutateRow + * @memberof google.bigtable.v2.TableResponse + * @instance + */ + TableResponse.prototype.mutateRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TableResponse payload. + * @member {"readRow"|"mutateRow"|undefined} payload + * @memberof google.bigtable.v2.TableResponse + * @instance + */ + Object.defineProperty(TableResponse.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["readRow", "mutateRow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TableResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {google.bigtable.v2.ITableResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.TableResponse} TableResponse instance + */ + TableResponse.create = function create(properties) { + return new TableResponse(properties); + }; + + /** + * Encodes the specified TableResponse message. Does not implicitly {@link google.bigtable.v2.TableResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {google.bigtable.v2.ITableResponse} message TableResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) + $root.google.bigtable.v2.SessionReadRowResponse.encode(message.readRow, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) + $root.google.bigtable.v2.SessionMutateRowResponse.encode(message.mutateRow, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified TableResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.TableResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {google.bigtable.v2.ITableResponse} message TableResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TableResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.TableResponse} TableResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.TableResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.readRow = $root.google.bigtable.v2.SessionReadRowResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.mutateRow = $root.google.bigtable.v2.SessionMutateRowResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TableResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.TableResponse} TableResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableResponse message. + * @function verify + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionReadRowResponse.verify(message.readRow, long + 1); + if (error) + return "readRow." + error; + } + } + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionMutateRowResponse.verify(message.mutateRow, long + 1); + if (error) + return "mutateRow." + error; + } + } + return null; + }; + + /** + * Creates a TableResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.TableResponse} TableResponse + */ + TableResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.TableResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.TableResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.TableResponse(); + if (object.readRow != null) { + if (!$util.isObject(object.readRow)) + throw TypeError(".google.bigtable.v2.TableResponse.readRow: object expected"); + message.readRow = $root.google.bigtable.v2.SessionReadRowResponse.fromObject(object.readRow, long + 1); + } + if (object.mutateRow != null) { + if (!$util.isObject(object.mutateRow)) + throw TypeError(".google.bigtable.v2.TableResponse.mutateRow: object expected"); + message.mutateRow = $root.google.bigtable.v2.SessionMutateRowResponse.fromObject(object.mutateRow, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TableResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {google.bigtable.v2.TableResponse} message TableResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + object.readRow = $root.google.bigtable.v2.SessionReadRowResponse.toObject(message.readRow, options, q + 1); + if (options.oneofs) + object.payload = "readRow"; + } + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) { + object.mutateRow = $root.google.bigtable.v2.SessionMutateRowResponse.toObject(message.mutateRow, options, q + 1); + if (options.oneofs) + object.payload = "mutateRow"; + } + return object; + }; + + /** + * Converts this TableResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.TableResponse + * @instance + * @returns {Object.} JSON object + */ + TableResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.TableResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.TableResponse"; + }; + + return TableResponse; + })(); + + v2.AuthorizedViewRequest = (function() { + + /** + * Properties of an AuthorizedViewRequest. + * @memberof google.bigtable.v2 + * @interface IAuthorizedViewRequest + * @property {google.bigtable.v2.ISessionReadRowRequest|null} [readRow] AuthorizedViewRequest readRow + * @property {google.bigtable.v2.ISessionMutateRowRequest|null} [mutateRow] AuthorizedViewRequest mutateRow + */ + + /** + * Constructs a new AuthorizedViewRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents an AuthorizedViewRequest. + * @implements IAuthorizedViewRequest + * @constructor + * @param {google.bigtable.v2.IAuthorizedViewRequest=} [properties] Properties to set + */ + function AuthorizedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthorizedViewRequest readRow. + * @member {google.bigtable.v2.ISessionReadRowRequest|null|undefined} readRow + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @instance + */ + AuthorizedViewRequest.prototype.readRow = null; + + /** + * AuthorizedViewRequest mutateRow. + * @member {google.bigtable.v2.ISessionMutateRowRequest|null|undefined} mutateRow + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @instance + */ + AuthorizedViewRequest.prototype.mutateRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AuthorizedViewRequest payload. + * @member {"readRow"|"mutateRow"|undefined} payload + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @instance + */ + Object.defineProperty(AuthorizedViewRequest.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["readRow", "mutateRow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AuthorizedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {google.bigtable.v2.IAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.AuthorizedViewRequest} AuthorizedViewRequest instance + */ + AuthorizedViewRequest.create = function create(properties) { + return new AuthorizedViewRequest(properties); + }; + + /** + * Encodes the specified AuthorizedViewRequest message. Does not implicitly {@link google.bigtable.v2.AuthorizedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {google.bigtable.v2.IAuthorizedViewRequest} message AuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) + $root.google.bigtable.v2.SessionReadRowRequest.encode(message.readRow, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) + $root.google.bigtable.v2.SessionMutateRowRequest.encode(message.mutateRow, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.AuthorizedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {google.bigtable.v2.IAuthorizedViewRequest} message AuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AuthorizedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.AuthorizedViewRequest} AuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.AuthorizedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.readRow = $root.google.bigtable.v2.SessionReadRowRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.mutateRow = $root.google.bigtable.v2.SessionMutateRowRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.AuthorizedViewRequest} AuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthorizedViewRequest message. + * @function verify + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorizedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionReadRowRequest.verify(message.readRow, long + 1); + if (error) + return "readRow." + error; + } + } + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionMutateRowRequest.verify(message.mutateRow, long + 1); + if (error) + return "mutateRow." + error; + } + } + return null; + }; + + /** + * Creates an AuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.AuthorizedViewRequest} AuthorizedViewRequest + */ + AuthorizedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.AuthorizedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.AuthorizedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.AuthorizedViewRequest(); + if (object.readRow != null) { + if (!$util.isObject(object.readRow)) + throw TypeError(".google.bigtable.v2.AuthorizedViewRequest.readRow: object expected"); + message.readRow = $root.google.bigtable.v2.SessionReadRowRequest.fromObject(object.readRow, long + 1); + } + if (object.mutateRow != null) { + if (!$util.isObject(object.mutateRow)) + throw TypeError(".google.bigtable.v2.AuthorizedViewRequest.mutateRow: object expected"); + message.mutateRow = $root.google.bigtable.v2.SessionMutateRowRequest.fromObject(object.mutateRow, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an AuthorizedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {google.bigtable.v2.AuthorizedViewRequest} message AuthorizedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorizedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + object.readRow = $root.google.bigtable.v2.SessionReadRowRequest.toObject(message.readRow, options, q + 1); + if (options.oneofs) + object.payload = "readRow"; + } + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) { + object.mutateRow = $root.google.bigtable.v2.SessionMutateRowRequest.toObject(message.mutateRow, options, q + 1); + if (options.oneofs) + object.payload = "mutateRow"; + } + return object; + }; + + /** + * Converts this AuthorizedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @instance + * @returns {Object.} JSON object + */ + AuthorizedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuthorizedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.AuthorizedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.AuthorizedViewRequest"; + }; + + return AuthorizedViewRequest; + })(); + + v2.AuthorizedViewResponse = (function() { + + /** + * Properties of an AuthorizedViewResponse. + * @memberof google.bigtable.v2 + * @interface IAuthorizedViewResponse + * @property {google.bigtable.v2.ISessionReadRowResponse|null} [readRow] AuthorizedViewResponse readRow + * @property {google.bigtable.v2.ISessionMutateRowResponse|null} [mutateRow] AuthorizedViewResponse mutateRow + */ + + /** + * Constructs a new AuthorizedViewResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents an AuthorizedViewResponse. + * @implements IAuthorizedViewResponse + * @constructor + * @param {google.bigtable.v2.IAuthorizedViewResponse=} [properties] Properties to set + */ + function AuthorizedViewResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthorizedViewResponse readRow. + * @member {google.bigtable.v2.ISessionReadRowResponse|null|undefined} readRow + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @instance + */ + AuthorizedViewResponse.prototype.readRow = null; + + /** + * AuthorizedViewResponse mutateRow. + * @member {google.bigtable.v2.ISessionMutateRowResponse|null|undefined} mutateRow + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @instance + */ + AuthorizedViewResponse.prototype.mutateRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AuthorizedViewResponse payload. + * @member {"readRow"|"mutateRow"|undefined} payload + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @instance + */ + Object.defineProperty(AuthorizedViewResponse.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["readRow", "mutateRow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AuthorizedViewResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {google.bigtable.v2.IAuthorizedViewResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.AuthorizedViewResponse} AuthorizedViewResponse instance + */ + AuthorizedViewResponse.create = function create(properties) { + return new AuthorizedViewResponse(properties); + }; + + /** + * Encodes the specified AuthorizedViewResponse message. Does not implicitly {@link google.bigtable.v2.AuthorizedViewResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {google.bigtable.v2.IAuthorizedViewResponse} message AuthorizedViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizedViewResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) + $root.google.bigtable.v2.SessionReadRowResponse.encode(message.readRow, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) + $root.google.bigtable.v2.SessionMutateRowResponse.encode(message.mutateRow, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthorizedViewResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.AuthorizedViewResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {google.bigtable.v2.IAuthorizedViewResponse} message AuthorizedViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizedViewResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AuthorizedViewResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.AuthorizedViewResponse} AuthorizedViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizedViewResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.AuthorizedViewResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.readRow = $root.google.bigtable.v2.SessionReadRowResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.mutateRow = $root.google.bigtable.v2.SessionMutateRowResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AuthorizedViewResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.AuthorizedViewResponse} AuthorizedViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizedViewResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthorizedViewResponse message. + * @function verify + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorizedViewResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionReadRowResponse.verify(message.readRow, long + 1); + if (error) + return "readRow." + error; + } + } + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionMutateRowResponse.verify(message.mutateRow, long + 1); + if (error) + return "mutateRow." + error; + } + } + return null; + }; + + /** + * Creates an AuthorizedViewResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.AuthorizedViewResponse} AuthorizedViewResponse + */ + AuthorizedViewResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.AuthorizedViewResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.AuthorizedViewResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.AuthorizedViewResponse(); + if (object.readRow != null) { + if (!$util.isObject(object.readRow)) + throw TypeError(".google.bigtable.v2.AuthorizedViewResponse.readRow: object expected"); + message.readRow = $root.google.bigtable.v2.SessionReadRowResponse.fromObject(object.readRow, long + 1); + } + if (object.mutateRow != null) { + if (!$util.isObject(object.mutateRow)) + throw TypeError(".google.bigtable.v2.AuthorizedViewResponse.mutateRow: object expected"); + message.mutateRow = $root.google.bigtable.v2.SessionMutateRowResponse.fromObject(object.mutateRow, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an AuthorizedViewResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {google.bigtable.v2.AuthorizedViewResponse} message AuthorizedViewResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorizedViewResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + object.readRow = $root.google.bigtable.v2.SessionReadRowResponse.toObject(message.readRow, options, q + 1); + if (options.oneofs) + object.payload = "readRow"; + } + if (message.mutateRow != null && Object.hasOwnProperty.call(message, "mutateRow")) { + object.mutateRow = $root.google.bigtable.v2.SessionMutateRowResponse.toObject(message.mutateRow, options, q + 1); + if (options.oneofs) + object.payload = "mutateRow"; + } + return object; + }; + + /** + * Converts this AuthorizedViewResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @instance + * @returns {Object.} JSON object + */ + AuthorizedViewResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuthorizedViewResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.AuthorizedViewResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorizedViewResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.AuthorizedViewResponse"; + }; + + return AuthorizedViewResponse; + })(); + + v2.MaterializedViewRequest = (function() { + + /** + * Properties of a MaterializedViewRequest. + * @memberof google.bigtable.v2 + * @interface IMaterializedViewRequest + * @property {google.bigtable.v2.ISessionReadRowRequest|null} [readRow] MaterializedViewRequest readRow + */ + + /** + * Constructs a new MaterializedViewRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a MaterializedViewRequest. + * @implements IMaterializedViewRequest + * @constructor + * @param {google.bigtable.v2.IMaterializedViewRequest=} [properties] Properties to set + */ + function MaterializedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaterializedViewRequest readRow. + * @member {google.bigtable.v2.ISessionReadRowRequest|null|undefined} readRow + * @memberof google.bigtable.v2.MaterializedViewRequest + * @instance + */ + MaterializedViewRequest.prototype.readRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MaterializedViewRequest payload. + * @member {"readRow"|undefined} payload + * @memberof google.bigtable.v2.MaterializedViewRequest + * @instance + */ + Object.defineProperty(MaterializedViewRequest.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["readRow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MaterializedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {google.bigtable.v2.IMaterializedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.MaterializedViewRequest} MaterializedViewRequest instance + */ + MaterializedViewRequest.create = function create(properties) { + return new MaterializedViewRequest(properties); + }; + + /** + * Encodes the specified MaterializedViewRequest message. Does not implicitly {@link google.bigtable.v2.MaterializedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {google.bigtable.v2.IMaterializedViewRequest} message MaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaterializedViewRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) + $root.google.bigtable.v2.SessionReadRowRequest.encode(message.readRow, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified MaterializedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.MaterializedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {google.bigtable.v2.IMaterializedViewRequest} message MaterializedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MaterializedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.MaterializedViewRequest} MaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaterializedViewRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MaterializedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.readRow = $root.google.bigtable.v2.SessionReadRowRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MaterializedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.MaterializedViewRequest} MaterializedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaterializedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaterializedViewRequest message. + * @function verify + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaterializedViewRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionReadRowRequest.verify(message.readRow, long + 1); + if (error) + return "readRow." + error; + } + } + return null; + }; + + /** + * Creates a MaterializedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.MaterializedViewRequest} MaterializedViewRequest + */ + MaterializedViewRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.MaterializedViewRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MaterializedViewRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.MaterializedViewRequest(); + if (object.readRow != null) { + if (!$util.isObject(object.readRow)) + throw TypeError(".google.bigtable.v2.MaterializedViewRequest.readRow: object expected"); + message.readRow = $root.google.bigtable.v2.SessionReadRowRequest.fromObject(object.readRow, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MaterializedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {google.bigtable.v2.MaterializedViewRequest} message MaterializedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaterializedViewRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + object.readRow = $root.google.bigtable.v2.SessionReadRowRequest.toObject(message.readRow, options, q + 1); + if (options.oneofs) + object.payload = "readRow"; + } + return object; + }; + + /** + * Converts this MaterializedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.MaterializedViewRequest + * @instance + * @returns {Object.} JSON object + */ + MaterializedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaterializedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.MaterializedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaterializedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.MaterializedViewRequest"; + }; + + return MaterializedViewRequest; + })(); + + v2.MaterializedViewResponse = (function() { + + /** + * Properties of a MaterializedViewResponse. + * @memberof google.bigtable.v2 + * @interface IMaterializedViewResponse + * @property {google.bigtable.v2.ISessionReadRowResponse|null} [readRow] MaterializedViewResponse readRow + */ + + /** + * Constructs a new MaterializedViewResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a MaterializedViewResponse. + * @implements IMaterializedViewResponse + * @constructor + * @param {google.bigtable.v2.IMaterializedViewResponse=} [properties] Properties to set + */ + function MaterializedViewResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaterializedViewResponse readRow. + * @member {google.bigtable.v2.ISessionReadRowResponse|null|undefined} readRow + * @memberof google.bigtable.v2.MaterializedViewResponse + * @instance + */ + MaterializedViewResponse.prototype.readRow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MaterializedViewResponse payload. + * @member {"readRow"|undefined} payload + * @memberof google.bigtable.v2.MaterializedViewResponse + * @instance + */ + Object.defineProperty(MaterializedViewResponse.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["readRow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MaterializedViewResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {google.bigtable.v2.IMaterializedViewResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.MaterializedViewResponse} MaterializedViewResponse instance + */ + MaterializedViewResponse.create = function create(properties) { + return new MaterializedViewResponse(properties); + }; + + /** + * Encodes the specified MaterializedViewResponse message. Does not implicitly {@link google.bigtable.v2.MaterializedViewResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {google.bigtable.v2.IMaterializedViewResponse} message MaterializedViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaterializedViewResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) + $root.google.bigtable.v2.SessionReadRowResponse.encode(message.readRow, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified MaterializedViewResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.MaterializedViewResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {google.bigtable.v2.IMaterializedViewResponse} message MaterializedViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaterializedViewResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MaterializedViewResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.MaterializedViewResponse} MaterializedViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaterializedViewResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.MaterializedViewResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.readRow = $root.google.bigtable.v2.SessionReadRowResponse.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MaterializedViewResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.MaterializedViewResponse} MaterializedViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaterializedViewResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaterializedViewResponse message. + * @function verify + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaterializedViewResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + properties.payload = 1; + { + var error = $root.google.bigtable.v2.SessionReadRowResponse.verify(message.readRow, long + 1); + if (error) + return "readRow." + error; + } + } + return null; + }; + + /** + * Creates a MaterializedViewResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.MaterializedViewResponse} MaterializedViewResponse + */ + MaterializedViewResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.MaterializedViewResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MaterializedViewResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.MaterializedViewResponse(); + if (object.readRow != null) { + if (!$util.isObject(object.readRow)) + throw TypeError(".google.bigtable.v2.MaterializedViewResponse.readRow: object expected"); + message.readRow = $root.google.bigtable.v2.SessionReadRowResponse.fromObject(object.readRow, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MaterializedViewResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {google.bigtable.v2.MaterializedViewResponse} message MaterializedViewResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaterializedViewResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.readRow != null && Object.hasOwnProperty.call(message, "readRow")) { + object.readRow = $root.google.bigtable.v2.SessionReadRowResponse.toObject(message.readRow, options, q + 1); + if (options.oneofs) + object.payload = "readRow"; + } + return object; + }; + + /** + * Converts this MaterializedViewResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.MaterializedViewResponse + * @instance + * @returns {Object.} JSON object + */ + MaterializedViewResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaterializedViewResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.MaterializedViewResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaterializedViewResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.MaterializedViewResponse"; + }; + + return MaterializedViewResponse; + })(); + + v2.SessionReadRowRequest = (function() { + + /** + * Properties of a SessionReadRowRequest. + * @memberof google.bigtable.v2 + * @interface ISessionReadRowRequest + * @property {Uint8Array|null} [key] SessionReadRowRequest key + * @property {google.bigtable.v2.IRowFilter|null} [filter] SessionReadRowRequest filter + */ + + /** + * Constructs a new SessionReadRowRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionReadRowRequest. + * @implements ISessionReadRowRequest + * @constructor + * @param {google.bigtable.v2.ISessionReadRowRequest=} [properties] Properties to set + */ + function SessionReadRowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionReadRowRequest key. + * @member {Uint8Array} key + * @memberof google.bigtable.v2.SessionReadRowRequest + * @instance + */ + SessionReadRowRequest.prototype.key = $util.newBuffer([]); + + /** + * SessionReadRowRequest filter. + * @member {google.bigtable.v2.IRowFilter|null|undefined} filter + * @memberof google.bigtable.v2.SessionReadRowRequest + * @instance + */ + SessionReadRowRequest.prototype.filter = null; + + /** + * Creates a new SessionReadRowRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {google.bigtable.v2.ISessionReadRowRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionReadRowRequest} SessionReadRowRequest instance + */ + SessionReadRowRequest.create = function create(properties) { + return new SessionReadRowRequest(properties); + }; + + /** + * Encodes the specified SessionReadRowRequest message. Does not implicitly {@link google.bigtable.v2.SessionReadRowRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {google.bigtable.v2.ISessionReadRowRequest} message SessionReadRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionReadRowRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.bigtable.v2.RowFilter.encode(message.filter, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionReadRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionReadRowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {google.bigtable.v2.ISessionReadRowRequest} message SessionReadRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionReadRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionReadRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionReadRowRequest} SessionReadRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionReadRowRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionReadRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.bytes(); + break; + } + case 2: { + message.filter = $root.google.bigtable.v2.RowFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionReadRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionReadRowRequest} SessionReadRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionReadRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionReadRowRequest message. + * @function verify + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionReadRowRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) { + var error = $root.google.bigtable.v2.RowFilter.verify(message.filter, long + 1); + if (error) + return "filter." + error; + } + return null; + }; + + /** + * Creates a SessionReadRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionReadRowRequest} SessionReadRowRequest + */ + SessionReadRowRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionReadRowRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionReadRowRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionReadRowRequest(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length >= 0) + message.key = object.key; + if (object.filter != null) { + if (!$util.isObject(object.filter)) + throw TypeError(".google.bigtable.v2.SessionReadRowRequest.filter: object expected"); + message.filter = $root.google.bigtable.v2.RowFilter.fromObject(object.filter, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SessionReadRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {google.bigtable.v2.SessionReadRowRequest} message SessionReadRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionReadRowRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + object.filter = null; + } + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + object.filter = $root.google.bigtable.v2.RowFilter.toObject(message.filter, options, q + 1); + return object; + }; + + /** + * Converts this SessionReadRowRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionReadRowRequest + * @instance + * @returns {Object.} JSON object + */ + SessionReadRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionReadRowRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionReadRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionReadRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionReadRowRequest"; + }; + + return SessionReadRowRequest; + })(); + + v2.SessionReadRowResponse = (function() { + + /** + * Properties of a SessionReadRowResponse. + * @memberof google.bigtable.v2 + * @interface ISessionReadRowResponse + * @property {google.bigtable.v2.IRow|null} [row] SessionReadRowResponse row + * @property {google.bigtable.v2.IRequestStats|null} [stats] SessionReadRowResponse stats + */ + + /** + * Constructs a new SessionReadRowResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionReadRowResponse. + * @implements ISessionReadRowResponse + * @constructor + * @param {google.bigtable.v2.ISessionReadRowResponse=} [properties] Properties to set + */ + function SessionReadRowResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionReadRowResponse row. + * @member {google.bigtable.v2.IRow|null|undefined} row + * @memberof google.bigtable.v2.SessionReadRowResponse + * @instance + */ + SessionReadRowResponse.prototype.row = null; + + /** + * SessionReadRowResponse stats. + * @member {google.bigtable.v2.IRequestStats|null|undefined} stats + * @memberof google.bigtable.v2.SessionReadRowResponse + * @instance + */ + SessionReadRowResponse.prototype.stats = null; + + /** + * Creates a new SessionReadRowResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {google.bigtable.v2.ISessionReadRowResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionReadRowResponse} SessionReadRowResponse instance + */ + SessionReadRowResponse.create = function create(properties) { + return new SessionReadRowResponse(properties); + }; + + /** + * Encodes the specified SessionReadRowResponse message. Does not implicitly {@link google.bigtable.v2.SessionReadRowResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {google.bigtable.v2.ISessionReadRowResponse} message SessionReadRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionReadRowResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.row != null && Object.hasOwnProperty.call(message, "row")) + $root.google.bigtable.v2.Row.encode(message.row, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.bigtable.v2.RequestStats.encode(message.stats, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionReadRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionReadRowResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {google.bigtable.v2.ISessionReadRowResponse} message SessionReadRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionReadRowResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionReadRowResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionReadRowResponse} SessionReadRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionReadRowResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionReadRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.row = $root.google.bigtable.v2.Row.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.stats = $root.google.bigtable.v2.RequestStats.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionReadRowResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionReadRowResponse} SessionReadRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionReadRowResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionReadRowResponse message. + * @function verify + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionReadRowResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.row != null && Object.hasOwnProperty.call(message, "row")) { + var error = $root.google.bigtable.v2.Row.verify(message.row, long + 1); + if (error) + return "row." + error; + } + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) { + var error = $root.google.bigtable.v2.RequestStats.verify(message.stats, long + 1); + if (error) + return "stats." + error; + } + return null; + }; + + /** + * Creates a SessionReadRowResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionReadRowResponse} SessionReadRowResponse + */ + SessionReadRowResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionReadRowResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionReadRowResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionReadRowResponse(); + if (object.row != null) { + if (!$util.isObject(object.row)) + throw TypeError(".google.bigtable.v2.SessionReadRowResponse.row: object expected"); + message.row = $root.google.bigtable.v2.Row.fromObject(object.row, long + 1); + } + if (object.stats != null) { + if (!$util.isObject(object.stats)) + throw TypeError(".google.bigtable.v2.SessionReadRowResponse.stats: object expected"); + message.stats = $root.google.bigtable.v2.RequestStats.fromObject(object.stats, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SessionReadRowResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {google.bigtable.v2.SessionReadRowResponse} message SessionReadRowResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionReadRowResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.row = null; + object.stats = null; + } + if (message.row != null && Object.hasOwnProperty.call(message, "row")) + object.row = $root.google.bigtable.v2.Row.toObject(message.row, options, q + 1); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + object.stats = $root.google.bigtable.v2.RequestStats.toObject(message.stats, options, q + 1); + return object; + }; + + /** + * Converts this SessionReadRowResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionReadRowResponse + * @instance + * @returns {Object.} JSON object + */ + SessionReadRowResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionReadRowResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionReadRowResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionReadRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionReadRowResponse"; + }; + + return SessionReadRowResponse; + })(); + + v2.SessionMutateRowRequest = (function() { + + /** + * Properties of a SessionMutateRowRequest. + * @memberof google.bigtable.v2 + * @interface ISessionMutateRowRequest + * @property {Uint8Array|null} [key] SessionMutateRowRequest key + * @property {Array.|null} [mutations] SessionMutateRowRequest mutations + */ + + /** + * Constructs a new SessionMutateRowRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionMutateRowRequest. + * @implements ISessionMutateRowRequest + * @constructor + * @param {google.bigtable.v2.ISessionMutateRowRequest=} [properties] Properties to set + */ + function SessionMutateRowRequest(properties) { + this.mutations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionMutateRowRequest key. + * @member {Uint8Array} key + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @instance + */ + SessionMutateRowRequest.prototype.key = $util.newBuffer([]); + + /** + * SessionMutateRowRequest mutations. + * @member {Array.} mutations + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @instance + */ + SessionMutateRowRequest.prototype.mutations = $util.emptyArray; + + /** + * Creates a new SessionMutateRowRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {google.bigtable.v2.ISessionMutateRowRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionMutateRowRequest} SessionMutateRowRequest instance + */ + SessionMutateRowRequest.create = function create(properties) { + return new SessionMutateRowRequest(properties); + }; + + /** + * Encodes the specified SessionMutateRowRequest message. Does not implicitly {@link google.bigtable.v2.SessionMutateRowRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {google.bigtable.v2.ISessionMutateRowRequest} message SessionMutateRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionMutateRowRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.mutations != null && message.mutations.length) + for (var i = 0; i < message.mutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.mutations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionMutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionMutateRowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {google.bigtable.v2.ISessionMutateRowRequest} message SessionMutateRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionMutateRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionMutateRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionMutateRowRequest} SessionMutateRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionMutateRowRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionMutateRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.bytes(); + break; + } + case 2: { + if (!(message.mutations && message.mutations.length)) + message.mutations = []; + message.mutations.push($root.google.bigtable.v2.Mutation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionMutateRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionMutateRowRequest} SessionMutateRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionMutateRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionMutateRowRequest message. + * @function verify + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionMutateRowRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.mutations != null && Object.hasOwnProperty.call(message, "mutations")) { + if (!Array.isArray(message.mutations)) + return "mutations: array expected"; + for (var i = 0; i < message.mutations.length; ++i) { + var error = $root.google.bigtable.v2.Mutation.verify(message.mutations[i], long + 1); + if (error) + return "mutations." + error; + } + } + return null; + }; + + /** + * Creates a SessionMutateRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionMutateRowRequest} SessionMutateRowRequest + */ + SessionMutateRowRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionMutateRowRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionMutateRowRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionMutateRowRequest(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length >= 0) + message.key = object.key; + if (object.mutations) { + if (!Array.isArray(object.mutations)) + throw TypeError(".google.bigtable.v2.SessionMutateRowRequest.mutations: array expected"); + message.mutations = []; + for (var i = 0; i < object.mutations.length; ++i) { + if (!$util.isObject(object.mutations[i])) + throw TypeError(".google.bigtable.v2.SessionMutateRowRequest.mutations: object expected"); + message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a SessionMutateRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {google.bigtable.v2.SessionMutateRowRequest} message SessionMutateRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionMutateRowRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.mutations = []; + if (options.defaults) + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.mutations && message.mutations.length) { + object.mutations = []; + for (var j = 0; j < message.mutations.length; ++j) + object.mutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.mutations[j], options, q + 1); + } + return object; + }; + + /** + * Converts this SessionMutateRowRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @instance + * @returns {Object.} JSON object + */ + SessionMutateRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionMutateRowRequest + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionMutateRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionMutateRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionMutateRowRequest"; + }; + + return SessionMutateRowRequest; + })(); + + v2.SessionMutateRowResponse = (function() { + + /** + * Properties of a SessionMutateRowResponse. + * @memberof google.bigtable.v2 + * @interface ISessionMutateRowResponse + */ + + /** + * Constructs a new SessionMutateRowResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionMutateRowResponse. + * @implements ISessionMutateRowResponse + * @constructor + * @param {google.bigtable.v2.ISessionMutateRowResponse=} [properties] Properties to set + */ + function SessionMutateRowResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new SessionMutateRowResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {google.bigtable.v2.ISessionMutateRowResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionMutateRowResponse} SessionMutateRowResponse instance + */ + SessionMutateRowResponse.create = function create(properties) { + return new SessionMutateRowResponse(properties); + }; + + /** + * Encodes the specified SessionMutateRowResponse message. Does not implicitly {@link google.bigtable.v2.SessionMutateRowResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {google.bigtable.v2.ISessionMutateRowResponse} message SessionMutateRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionMutateRowResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified SessionMutateRowResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionMutateRowResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {google.bigtable.v2.ISessionMutateRowResponse} message SessionMutateRowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionMutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionMutateRowResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionMutateRowResponse} SessionMutateRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionMutateRowResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionMutateRowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionMutateRowResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionMutateRowResponse} SessionMutateRowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionMutateRowResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionMutateRowResponse message. + * @function verify + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionMutateRowResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a SessionMutateRowResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionMutateRowResponse} SessionMutateRowResponse + */ + SessionMutateRowResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionMutateRowResponse) + return object; + return new $root.google.bigtable.v2.SessionMutateRowResponse(); + }; + + /** + * Creates a plain object from a SessionMutateRowResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {google.bigtable.v2.SessionMutateRowResponse} message SessionMutateRowResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionMutateRowResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SessionMutateRowResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @instance + * @returns {Object.} JSON object + */ + SessionMutateRowResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionMutateRowResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionMutateRowResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionMutateRowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionMutateRowResponse"; + }; + + return SessionMutateRowResponse; + })(); + + v2.SessionParametersResponse = (function() { + + /** + * Properties of a SessionParametersResponse. + * @memberof google.bigtable.v2 + * @interface ISessionParametersResponse + * @property {google.protobuf.IDuration|null} [keepAlive] SessionParametersResponse keepAlive + */ + + /** + * Constructs a new SessionParametersResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionParametersResponse. + * @implements ISessionParametersResponse + * @constructor + * @param {google.bigtable.v2.ISessionParametersResponse=} [properties] Properties to set + */ + function SessionParametersResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionParametersResponse keepAlive. + * @member {google.protobuf.IDuration|null|undefined} keepAlive + * @memberof google.bigtable.v2.SessionParametersResponse + * @instance + */ + SessionParametersResponse.prototype.keepAlive = null; + + /** + * Creates a new SessionParametersResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {google.bigtable.v2.ISessionParametersResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionParametersResponse} SessionParametersResponse instance + */ + SessionParametersResponse.create = function create(properties) { + return new SessionParametersResponse(properties); + }; + + /** + * Encodes the specified SessionParametersResponse message. Does not implicitly {@link google.bigtable.v2.SessionParametersResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {google.bigtable.v2.ISessionParametersResponse} message SessionParametersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionParametersResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.keepAlive != null && Object.hasOwnProperty.call(message, "keepAlive")) + $root.google.protobuf.Duration.encode(message.keepAlive, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionParametersResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionParametersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {google.bigtable.v2.ISessionParametersResponse} message SessionParametersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionParametersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionParametersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionParametersResponse} SessionParametersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionParametersResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionParametersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.keepAlive = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionParametersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionParametersResponse} SessionParametersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionParametersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionParametersResponse message. + * @function verify + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionParametersResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.keepAlive != null && Object.hasOwnProperty.call(message, "keepAlive")) { + var error = $root.google.protobuf.Duration.verify(message.keepAlive, long + 1); + if (error) + return "keepAlive." + error; + } + return null; + }; + + /** + * Creates a SessionParametersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionParametersResponse} SessionParametersResponse + */ + SessionParametersResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionParametersResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionParametersResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionParametersResponse(); + if (object.keepAlive != null) { + if (!$util.isObject(object.keepAlive)) + throw TypeError(".google.bigtable.v2.SessionParametersResponse.keepAlive: object expected"); + message.keepAlive = $root.google.protobuf.Duration.fromObject(object.keepAlive, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SessionParametersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {google.bigtable.v2.SessionParametersResponse} message SessionParametersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionParametersResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.keepAlive = null; + if (message.keepAlive != null && Object.hasOwnProperty.call(message, "keepAlive")) + object.keepAlive = $root.google.protobuf.Duration.toObject(message.keepAlive, options, q + 1); + return object; + }; + + /** + * Converts this SessionParametersResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionParametersResponse + * @instance + * @returns {Object.} JSON object + */ + SessionParametersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionParametersResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionParametersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionParametersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionParametersResponse"; + }; + + return SessionParametersResponse; + })(); + + v2.HeartbeatResponse = (function() { + + /** + * Properties of a HeartbeatResponse. + * @memberof google.bigtable.v2 + * @interface IHeartbeatResponse + */ + + /** + * Constructs a new HeartbeatResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a HeartbeatResponse. + * @implements IHeartbeatResponse + * @constructor + * @param {google.bigtable.v2.IHeartbeatResponse=} [properties] Properties to set + */ + function HeartbeatResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new HeartbeatResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {google.bigtable.v2.IHeartbeatResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.HeartbeatResponse} HeartbeatResponse instance + */ + HeartbeatResponse.create = function create(properties) { + return new HeartbeatResponse(properties); + }; + + /** + * Encodes the specified HeartbeatResponse message. Does not implicitly {@link google.bigtable.v2.HeartbeatResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {google.bigtable.v2.IHeartbeatResponse} message HeartbeatResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified HeartbeatResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.HeartbeatResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {google.bigtable.v2.IHeartbeatResponse} message HeartbeatResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a HeartbeatResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.HeartbeatResponse} HeartbeatResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.HeartbeatResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HeartbeatResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.HeartbeatResponse} HeartbeatResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HeartbeatResponse message. + * @function verify + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HeartbeatResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a HeartbeatResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.HeartbeatResponse} HeartbeatResponse + */ + HeartbeatResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.HeartbeatResponse) + return object; + return new $root.google.bigtable.v2.HeartbeatResponse(); + }; + + /** + * Creates a plain object from a HeartbeatResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {google.bigtable.v2.HeartbeatResponse} message HeartbeatResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HeartbeatResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this HeartbeatResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.HeartbeatResponse + * @instance + * @returns {Object.} JSON object + */ + HeartbeatResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HeartbeatResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.HeartbeatResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HeartbeatResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.HeartbeatResponse"; + }; + + return HeartbeatResponse; + })(); + + v2.GoAwayResponse = (function() { + + /** + * Properties of a GoAwayResponse. + * @memberof google.bigtable.v2 + * @interface IGoAwayResponse + * @property {string|null} [reason] GoAwayResponse reason + * @property {string|null} [description] GoAwayResponse description + * @property {number|Long|null} [lastRpcIdAdmitted] GoAwayResponse lastRpcIdAdmitted + */ + + /** + * Constructs a new GoAwayResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a GoAwayResponse. + * @implements IGoAwayResponse + * @constructor + * @param {google.bigtable.v2.IGoAwayResponse=} [properties] Properties to set + */ + function GoAwayResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoAwayResponse reason. + * @member {string} reason + * @memberof google.bigtable.v2.GoAwayResponse + * @instance + */ + GoAwayResponse.prototype.reason = ""; + + /** + * GoAwayResponse description. + * @member {string} description + * @memberof google.bigtable.v2.GoAwayResponse + * @instance + */ + GoAwayResponse.prototype.description = ""; + + /** + * GoAwayResponse lastRpcIdAdmitted. + * @member {number|Long} lastRpcIdAdmitted + * @memberof google.bigtable.v2.GoAwayResponse + * @instance + */ + GoAwayResponse.prototype.lastRpcIdAdmitted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GoAwayResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {google.bigtable.v2.IGoAwayResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.GoAwayResponse} GoAwayResponse instance + */ + GoAwayResponse.create = function create(properties) { + return new GoAwayResponse(properties); + }; + + /** + * Encodes the specified GoAwayResponse message. Does not implicitly {@link google.bigtable.v2.GoAwayResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {google.bigtable.v2.IGoAwayResponse} message GoAwayResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoAwayResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reason); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.lastRpcIdAdmitted != null && Object.hasOwnProperty.call(message, "lastRpcIdAdmitted")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lastRpcIdAdmitted); + return writer; + }; + + /** + * Encodes the specified GoAwayResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.GoAwayResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {google.bigtable.v2.IGoAwayResponse} message GoAwayResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoAwayResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GoAwayResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.GoAwayResponse} GoAwayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoAwayResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.GoAwayResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.reason = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.lastRpcIdAdmitted = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GoAwayResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.GoAwayResponse} GoAwayResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoAwayResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoAwayResponse message. + * @function verify + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoAwayResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.lastRpcIdAdmitted != null && Object.hasOwnProperty.call(message, "lastRpcIdAdmitted")) + if (!$util.isInteger(message.lastRpcIdAdmitted) && !(message.lastRpcIdAdmitted && $util.isInteger(message.lastRpcIdAdmitted.low) && $util.isInteger(message.lastRpcIdAdmitted.high))) + return "lastRpcIdAdmitted: integer|Long expected"; + return null; + }; + + /** + * Creates a GoAwayResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.GoAwayResponse} GoAwayResponse + */ + GoAwayResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.GoAwayResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.GoAwayResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.GoAwayResponse(); + if (object.reason != null) + message.reason = String(object.reason); + if (object.description != null) + message.description = String(object.description); + if (object.lastRpcIdAdmitted != null) + if ($util.Long) + message.lastRpcIdAdmitted = $util.Long.fromValue(object.lastRpcIdAdmitted, false); + else if (typeof object.lastRpcIdAdmitted === "string") + message.lastRpcIdAdmitted = parseInt(object.lastRpcIdAdmitted, 10); + else if (typeof object.lastRpcIdAdmitted === "number") + message.lastRpcIdAdmitted = object.lastRpcIdAdmitted; + else if (typeof object.lastRpcIdAdmitted === "object") + message.lastRpcIdAdmitted = new $util.LongBits(object.lastRpcIdAdmitted.low >>> 0, object.lastRpcIdAdmitted.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GoAwayResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {google.bigtable.v2.GoAwayResponse} message GoAwayResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoAwayResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.reason = ""; + object.description = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastRpcIdAdmitted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.lastRpcIdAdmitted = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + } + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + object.reason = message.reason; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.lastRpcIdAdmitted != null && Object.hasOwnProperty.call(message, "lastRpcIdAdmitted")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.lastRpcIdAdmitted = typeof message.lastRpcIdAdmitted === "number" ? BigInt(message.lastRpcIdAdmitted) : $util.Long.fromBits(message.lastRpcIdAdmitted.low >>> 0, message.lastRpcIdAdmitted.high >>> 0, false).toBigInt(); + else if (typeof message.lastRpcIdAdmitted === "number") + object.lastRpcIdAdmitted = options.longs === String ? String(message.lastRpcIdAdmitted) : message.lastRpcIdAdmitted; + else + object.lastRpcIdAdmitted = options.longs === String ? $util.Long.prototype.toString.call(message.lastRpcIdAdmitted) : options.longs === Number ? new $util.LongBits(message.lastRpcIdAdmitted.low >>> 0, message.lastRpcIdAdmitted.high >>> 0).toNumber() : message.lastRpcIdAdmitted; + return object; + }; + + /** + * Converts this GoAwayResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.GoAwayResponse + * @instance + * @returns {Object.} JSON object + */ + GoAwayResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoAwayResponse + * @function getTypeUrl + * @memberof google.bigtable.v2.GoAwayResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoAwayResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.GoAwayResponse"; + }; + + return GoAwayResponse; + })(); + + v2.SessionRefreshConfig = (function() { + + /** + * Properties of a SessionRefreshConfig. + * @memberof google.bigtable.v2 + * @interface ISessionRefreshConfig + * @property {google.bigtable.v2.IOpenSessionRequest|null} [optimizedOpenRequest] SessionRefreshConfig optimizedOpenRequest + * @property {Array.|null} [metadata] SessionRefreshConfig metadata + */ + + /** + * Constructs a new SessionRefreshConfig. + * @memberof google.bigtable.v2 + * @classdesc Represents a SessionRefreshConfig. + * @implements ISessionRefreshConfig + * @constructor + * @param {google.bigtable.v2.ISessionRefreshConfig=} [properties] Properties to set + */ + function SessionRefreshConfig(properties) { + this.metadata = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionRefreshConfig optimizedOpenRequest. + * @member {google.bigtable.v2.IOpenSessionRequest|null|undefined} optimizedOpenRequest + * @memberof google.bigtable.v2.SessionRefreshConfig + * @instance + */ + SessionRefreshConfig.prototype.optimizedOpenRequest = null; + + /** + * SessionRefreshConfig metadata. + * @member {Array.} metadata + * @memberof google.bigtable.v2.SessionRefreshConfig + * @instance + */ + SessionRefreshConfig.prototype.metadata = $util.emptyArray; + + /** + * Creates a new SessionRefreshConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {google.bigtable.v2.ISessionRefreshConfig=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionRefreshConfig} SessionRefreshConfig instance + */ + SessionRefreshConfig.create = function create(properties) { + return new SessionRefreshConfig(properties); + }; + + /** + * Encodes the specified SessionRefreshConfig message. Does not implicitly {@link google.bigtable.v2.SessionRefreshConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {google.bigtable.v2.ISessionRefreshConfig} message SessionRefreshConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionRefreshConfig.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.optimizedOpenRequest != null && Object.hasOwnProperty.call(message, "optimizedOpenRequest")) + $root.google.bigtable.v2.OpenSessionRequest.encode(message.optimizedOpenRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.metadata != null && message.metadata.length) + for (var i = 0; i < message.metadata.length; ++i) + $root.google.bigtable.v2.SessionRefreshConfig.Metadata.encode(message.metadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionRefreshConfig message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionRefreshConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {google.bigtable.v2.ISessionRefreshConfig} message SessionRefreshConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionRefreshConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SessionRefreshConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionRefreshConfig} SessionRefreshConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionRefreshConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionRefreshConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.optimizedOpenRequest = $root.google.bigtable.v2.OpenSessionRequest.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (!(message.metadata && message.metadata.length)) + message.metadata = []; + message.metadata.push($root.google.bigtable.v2.SessionRefreshConfig.Metadata.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SessionRefreshConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionRefreshConfig} SessionRefreshConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionRefreshConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionRefreshConfig message. + * @function verify + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionRefreshConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.optimizedOpenRequest != null && Object.hasOwnProperty.call(message, "optimizedOpenRequest")) { + var error = $root.google.bigtable.v2.OpenSessionRequest.verify(message.optimizedOpenRequest, long + 1); + if (error) + return "optimizedOpenRequest." + error; + } + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (!Array.isArray(message.metadata)) + return "metadata: array expected"; + for (var i = 0; i < message.metadata.length; ++i) { + var error = $root.google.bigtable.v2.SessionRefreshConfig.Metadata.verify(message.metadata[i], long + 1); + if (error) + return "metadata." + error; + } + } + return null; + }; + + /** + * Creates a SessionRefreshConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionRefreshConfig} SessionRefreshConfig + */ + SessionRefreshConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionRefreshConfig) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionRefreshConfig: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionRefreshConfig(); + if (object.optimizedOpenRequest != null) { + if (!$util.isObject(object.optimizedOpenRequest)) + throw TypeError(".google.bigtable.v2.SessionRefreshConfig.optimizedOpenRequest: object expected"); + message.optimizedOpenRequest = $root.google.bigtable.v2.OpenSessionRequest.fromObject(object.optimizedOpenRequest, long + 1); + } + if (object.metadata) { + if (!Array.isArray(object.metadata)) + throw TypeError(".google.bigtable.v2.SessionRefreshConfig.metadata: array expected"); + message.metadata = []; + for (var i = 0; i < object.metadata.length; ++i) { + if (!$util.isObject(object.metadata[i])) + throw TypeError(".google.bigtable.v2.SessionRefreshConfig.metadata: object expected"); + message.metadata[i] = $root.google.bigtable.v2.SessionRefreshConfig.Metadata.fromObject(object.metadata[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a SessionRefreshConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {google.bigtable.v2.SessionRefreshConfig} message SessionRefreshConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionRefreshConfig.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.metadata = []; + if (options.defaults) + object.optimizedOpenRequest = null; + if (message.optimizedOpenRequest != null && Object.hasOwnProperty.call(message, "optimizedOpenRequest")) + object.optimizedOpenRequest = $root.google.bigtable.v2.OpenSessionRequest.toObject(message.optimizedOpenRequest, options, q + 1); + if (message.metadata && message.metadata.length) { + object.metadata = []; + for (var j = 0; j < message.metadata.length; ++j) + object.metadata[j] = $root.google.bigtable.v2.SessionRefreshConfig.Metadata.toObject(message.metadata[j], options, q + 1); + } + return object; + }; + + /** + * Converts this SessionRefreshConfig to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionRefreshConfig + * @instance + * @returns {Object.} JSON object + */ + SessionRefreshConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionRefreshConfig + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionRefreshConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionRefreshConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionRefreshConfig"; + }; + + SessionRefreshConfig.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.bigtable.v2.SessionRefreshConfig + * @interface IMetadata + * @property {string|null} [key] Metadata key + * @property {Uint8Array|null} [value] Metadata value + */ + + /** + * Constructs a new Metadata. + * @memberof google.bigtable.v2.SessionRefreshConfig + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.bigtable.v2.SessionRefreshConfig.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata key. + * @member {string} key + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @instance + */ + Metadata.prototype.key = ""; + + /** + * Metadata value. + * @member {Uint8Array} value + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @instance + */ + Metadata.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {google.bigtable.v2.SessionRefreshConfig.IMetadata=} [properties] Properties to set + * @returns {google.bigtable.v2.SessionRefreshConfig.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.bigtable.v2.SessionRefreshConfig.Metadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {google.bigtable.v2.SessionRefreshConfig.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.bigtable.v2.SessionRefreshConfig.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {google.bigtable.v2.SessionRefreshConfig.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.SessionRefreshConfig.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.SessionRefreshConfig.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.SessionRefreshConfig.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.SessionRefreshConfig.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.SessionRefreshConfig.Metadata) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SessionRefreshConfig.Metadata: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.SessionRefreshConfig.Metadata(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {google.bigtable.v2.SessionRefreshConfig.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.key = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + object.key = message.key; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.bigtable.v2.SessionRefreshConfig.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.SessionRefreshConfig.Metadata"; + }; + + return Metadata; + })(); + + return SessionRefreshConfig; + })(); + + v2.FeatureFlags = (function() { + + /** + * Properties of a FeatureFlags. + * @memberof google.bigtable.v2 + * @interface IFeatureFlags + * @property {boolean|null} [reverseScans] FeatureFlags reverseScans + * @property {boolean|null} [mutateRowsRateLimit] FeatureFlags mutateRowsRateLimit + * @property {boolean|null} [mutateRowsRateLimit2] FeatureFlags mutateRowsRateLimit2 + * @property {boolean|null} [lastScannedRowResponses] FeatureFlags lastScannedRowResponses + * @property {boolean|null} [routingCookie] FeatureFlags routingCookie + * @property {boolean|null} [retryInfo] FeatureFlags retryInfo + * @property {boolean|null} [clientSideMetricsEnabled] FeatureFlags clientSideMetricsEnabled + * @property {boolean|null} [trafficDirectorEnabled] FeatureFlags trafficDirectorEnabled + * @property {boolean|null} [directAccessRequested] FeatureFlags directAccessRequested + * @property {boolean|null} [peerInfo] FeatureFlags peerInfo + * @property {boolean|null} [sessionsCompatible] FeatureFlags sessionsCompatible + * @property {boolean|null} [sessionsRequired] FeatureFlags sessionsRequired + */ + + /** + * Constructs a new FeatureFlags. + * @memberof google.bigtable.v2 + * @classdesc Represents a FeatureFlags. + * @implements IFeatureFlags + * @constructor + * @param {google.bigtable.v2.IFeatureFlags=} [properties] Properties to set + */ + function FeatureFlags(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureFlags reverseScans. + * @member {boolean} reverseScans + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.reverseScans = false; + + /** + * FeatureFlags mutateRowsRateLimit. + * @member {boolean} mutateRowsRateLimit + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.mutateRowsRateLimit = false; + + /** + * FeatureFlags mutateRowsRateLimit2. + * @member {boolean} mutateRowsRateLimit2 + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.mutateRowsRateLimit2 = false; + + /** + * FeatureFlags lastScannedRowResponses. + * @member {boolean} lastScannedRowResponses + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.lastScannedRowResponses = false; + + /** + * FeatureFlags routingCookie. + * @member {boolean} routingCookie + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.routingCookie = false; + + /** + * FeatureFlags retryInfo. + * @member {boolean} retryInfo + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.retryInfo = false; + + /** + * FeatureFlags clientSideMetricsEnabled. + * @member {boolean} clientSideMetricsEnabled + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.clientSideMetricsEnabled = false; + + /** + * FeatureFlags trafficDirectorEnabled. + * @member {boolean} trafficDirectorEnabled + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.trafficDirectorEnabled = false; + + /** + * FeatureFlags directAccessRequested. + * @member {boolean} directAccessRequested + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.directAccessRequested = false; + + /** + * FeatureFlags peerInfo. + * @member {boolean} peerInfo + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.peerInfo = false; + + /** + * FeatureFlags sessionsCompatible. + * @member {boolean} sessionsCompatible + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.sessionsCompatible = false; + + /** + * FeatureFlags sessionsRequired. + * @member {boolean} sessionsRequired + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.sessionsRequired = false; + + /** + * 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 + */ + FeatureFlags.create = function create(properties) { + return new FeatureFlags(properties); + }; + + /** + * 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.reverseScans != null && Object.hasOwnProperty.call(message, "reverseScans")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.reverseScans); + if (message.mutateRowsRateLimit != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.mutateRowsRateLimit); + if (message.lastScannedRowResponses != null && Object.hasOwnProperty.call(message, "lastScannedRowResponses")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.lastScannedRowResponses); + if (message.mutateRowsRateLimit2 != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit2")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.mutateRowsRateLimit2); + if (message.routingCookie != null && Object.hasOwnProperty.call(message, "routingCookie")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.routingCookie); + if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.retryInfo); + if (message.clientSideMetricsEnabled != null && Object.hasOwnProperty.call(message, "clientSideMetricsEnabled")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.clientSideMetricsEnabled); + if (message.trafficDirectorEnabled != null && Object.hasOwnProperty.call(message, "trafficDirectorEnabled")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.trafficDirectorEnabled); + if (message.directAccessRequested != null && Object.hasOwnProperty.call(message, "directAccessRequested")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.directAccessRequested); + if (message.peerInfo != null && Object.hasOwnProperty.call(message, "peerInfo")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.peerInfo); + if (message.sessionsCompatible != null && Object.hasOwnProperty.call(message, "sessionsCompatible")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.sessionsCompatible); + if (message.sessionsRequired != null && Object.hasOwnProperty.call(message, "sessionsRequired")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.sessionsRequired); + 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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.FeatureFlags(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.reverseScans = reader.bool(); + break; + } + case 3: { + message.mutateRowsRateLimit = reader.bool(); + break; + } + case 5: { + message.mutateRowsRateLimit2 = reader.bool(); + break; + } + case 4: { + message.lastScannedRowResponses = reader.bool(); + break; + } + case 6: { + message.routingCookie = reader.bool(); + break; + } + case 7: { + message.retryInfo = reader.bool(); + break; + } + case 8: { + message.clientSideMetricsEnabled = reader.bool(); + break; + } + case 9: { + message.trafficDirectorEnabled = reader.bool(); + break; + } + case 10: { + message.directAccessRequested = reader.bool(); + break; + } + case 11: { + message.peerInfo = reader.bool(); + break; + } + case 12: { + message.sessionsCompatible = reader.bool(); + break; + } + case 13: { + message.sessionsRequired = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.reverseScans != null && Object.hasOwnProperty.call(message, "reverseScans")) + if (typeof message.reverseScans !== "boolean") + return "reverseScans: boolean expected"; + if (message.mutateRowsRateLimit != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit")) + if (typeof message.mutateRowsRateLimit !== "boolean") + return "mutateRowsRateLimit: boolean expected"; + if (message.mutateRowsRateLimit2 != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit2")) + if (typeof message.mutateRowsRateLimit2 !== "boolean") + return "mutateRowsRateLimit2: boolean expected"; + if (message.lastScannedRowResponses != null && Object.hasOwnProperty.call(message, "lastScannedRowResponses")) + if (typeof message.lastScannedRowResponses !== "boolean") + return "lastScannedRowResponses: boolean expected"; + if (message.routingCookie != null && Object.hasOwnProperty.call(message, "routingCookie")) + if (typeof message.routingCookie !== "boolean") + return "routingCookie: boolean expected"; + if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) + if (typeof message.retryInfo !== "boolean") + return "retryInfo: boolean expected"; + if (message.clientSideMetricsEnabled != null && Object.hasOwnProperty.call(message, "clientSideMetricsEnabled")) + if (typeof message.clientSideMetricsEnabled !== "boolean") + return "clientSideMetricsEnabled: boolean expected"; + if (message.trafficDirectorEnabled != null && Object.hasOwnProperty.call(message, "trafficDirectorEnabled")) + if (typeof message.trafficDirectorEnabled !== "boolean") + return "trafficDirectorEnabled: boolean expected"; + if (message.directAccessRequested != null && Object.hasOwnProperty.call(message, "directAccessRequested")) + if (typeof message.directAccessRequested !== "boolean") + return "directAccessRequested: boolean expected"; + if (message.peerInfo != null && Object.hasOwnProperty.call(message, "peerInfo")) + if (typeof message.peerInfo !== "boolean") + return "peerInfo: boolean expected"; + if (message.sessionsCompatible != null && Object.hasOwnProperty.call(message, "sessionsCompatible")) + if (typeof message.sessionsCompatible !== "boolean") + return "sessionsCompatible: boolean expected"; + if (message.sessionsRequired != null && Object.hasOwnProperty.call(message, "sessionsRequired")) + if (typeof message.sessionsRequired !== "boolean") + return "sessionsRequired: 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, long) { + if (object instanceof $root.google.bigtable.v2.FeatureFlags) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.FeatureFlags: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.FeatureFlags(); + if (object.reverseScans != null) + message.reverseScans = Boolean(object.reverseScans); + if (object.mutateRowsRateLimit != null) + message.mutateRowsRateLimit = Boolean(object.mutateRowsRateLimit); + if (object.mutateRowsRateLimit2 != null) + message.mutateRowsRateLimit2 = Boolean(object.mutateRowsRateLimit2); + if (object.lastScannedRowResponses != null) + message.lastScannedRowResponses = Boolean(object.lastScannedRowResponses); + if (object.routingCookie != null) + message.routingCookie = Boolean(object.routingCookie); + if (object.retryInfo != null) + message.retryInfo = Boolean(object.retryInfo); + if (object.clientSideMetricsEnabled != null) + message.clientSideMetricsEnabled = Boolean(object.clientSideMetricsEnabled); + if (object.trafficDirectorEnabled != null) + message.trafficDirectorEnabled = Boolean(object.trafficDirectorEnabled); + if (object.directAccessRequested != null) + message.directAccessRequested = Boolean(object.directAccessRequested); + if (object.peerInfo != null) + message.peerInfo = Boolean(object.peerInfo); + if (object.sessionsCompatible != null) + message.sessionsCompatible = Boolean(object.sessionsCompatible); + if (object.sessionsRequired != null) + message.sessionsRequired = Boolean(object.sessionsRequired); + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.reverseScans = false; + object.mutateRowsRateLimit = false; + object.lastScannedRowResponses = false; + object.mutateRowsRateLimit2 = false; + object.routingCookie = false; + object.retryInfo = false; + object.clientSideMetricsEnabled = false; + object.trafficDirectorEnabled = false; + object.directAccessRequested = false; + object.peerInfo = false; + object.sessionsCompatible = false; + object.sessionsRequired = false; + } + if (message.reverseScans != null && Object.hasOwnProperty.call(message, "reverseScans")) + object.reverseScans = message.reverseScans; + if (message.mutateRowsRateLimit != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit")) + object.mutateRowsRateLimit = message.mutateRowsRateLimit; + if (message.lastScannedRowResponses != null && Object.hasOwnProperty.call(message, "lastScannedRowResponses")) + object.lastScannedRowResponses = message.lastScannedRowResponses; + if (message.mutateRowsRateLimit2 != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit2")) + object.mutateRowsRateLimit2 = message.mutateRowsRateLimit2; + if (message.routingCookie != null && Object.hasOwnProperty.call(message, "routingCookie")) + object.routingCookie = message.routingCookie; + if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) + object.retryInfo = message.retryInfo; + if (message.clientSideMetricsEnabled != null && Object.hasOwnProperty.call(message, "clientSideMetricsEnabled")) + object.clientSideMetricsEnabled = message.clientSideMetricsEnabled; + if (message.trafficDirectorEnabled != null && Object.hasOwnProperty.call(message, "trafficDirectorEnabled")) + object.trafficDirectorEnabled = message.trafficDirectorEnabled; + if (message.directAccessRequested != null && Object.hasOwnProperty.call(message, "directAccessRequested")) + object.directAccessRequested = message.directAccessRequested; + if (message.peerInfo != null && Object.hasOwnProperty.call(message, "peerInfo")) + object.peerInfo = message.peerInfo; + if (message.sessionsCompatible != null && Object.hasOwnProperty.call(message, "sessionsCompatible")) + object.sessionsCompatible = message.sessionsCompatible; + if (message.sessionsRequired != null && Object.hasOwnProperty.call(message, "sessionsRequired")) + object.sessionsRequired = message.sessionsRequired; + 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.PeerInfo = (function() { + + /** + * Properties of a PeerInfo. + * @memberof google.bigtable.v2 + * @interface IPeerInfo + * @property {number|Long|null} [googleFrontendId] PeerInfo googleFrontendId + * @property {number|Long|null} [applicationFrontendId] PeerInfo applicationFrontendId + * @property {string|null} [applicationFrontendRegion] PeerInfo applicationFrontendRegion + * @property {string|null} [applicationFrontendZone] PeerInfo applicationFrontendZone + * @property {string|null} [applicationFrontendSubzone] PeerInfo applicationFrontendSubzone + * @property {google.bigtable.v2.PeerInfo.TransportType|null} [transportType] PeerInfo transportType + */ + + /** + * Constructs a new PeerInfo. + * @memberof google.bigtable.v2 + * @classdesc Represents a PeerInfo. + * @implements IPeerInfo + * @constructor + * @param {google.bigtable.v2.IPeerInfo=} [properties] Properties to set + */ + function PeerInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PeerInfo googleFrontendId. + * @member {number|Long} googleFrontendId + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.googleFrontendId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PeerInfo applicationFrontendId. + * @member {number|Long} applicationFrontendId + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.applicationFrontendId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PeerInfo applicationFrontendRegion. + * @member {string} applicationFrontendRegion + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.applicationFrontendRegion = ""; + + /** + * PeerInfo applicationFrontendZone. + * @member {string} applicationFrontendZone + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.applicationFrontendZone = ""; + + /** + * PeerInfo applicationFrontendSubzone. + * @member {string} applicationFrontendSubzone + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.applicationFrontendSubzone = ""; + + /** + * PeerInfo transportType. + * @member {google.bigtable.v2.PeerInfo.TransportType} transportType + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.transportType = 0; + + /** + * Creates a new PeerInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {google.bigtable.v2.IPeerInfo=} [properties] Properties to set + * @returns {google.bigtable.v2.PeerInfo} PeerInfo instance + */ + PeerInfo.create = function create(properties) { + return new PeerInfo(properties); + }; + + /** + * Encodes the specified PeerInfo message. Does not implicitly {@link google.bigtable.v2.PeerInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {google.bigtable.v2.IPeerInfo} message PeerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeerInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.googleFrontendId); + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.applicationFrontendId); + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.applicationFrontendZone); + if (message.applicationFrontendSubzone != null && Object.hasOwnProperty.call(message, "applicationFrontendSubzone")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationFrontendSubzone); + if (message.transportType != null && Object.hasOwnProperty.call(message, "transportType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.transportType); + if (message.applicationFrontendRegion != null && Object.hasOwnProperty.call(message, "applicationFrontendRegion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.applicationFrontendRegion); + return writer; + }; + + /** + * Encodes the specified PeerInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.PeerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {google.bigtable.v2.IPeerInfo} message PeerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PeerInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PeerInfo} PeerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeerInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PeerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.googleFrontendId = reader.int64(); + break; + } + case 2: { + message.applicationFrontendId = reader.int64(); + break; + } + case 6: { + message.applicationFrontendRegion = reader.string(); + break; + } + case 3: { + message.applicationFrontendZone = reader.string(); + break; + } + case 4: { + message.applicationFrontendSubzone = reader.string(); + break; + } + case 5: { + message.transportType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PeerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PeerInfo} PeerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PeerInfo message. + * @function verify + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PeerInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) + if (!$util.isInteger(message.googleFrontendId) && !(message.googleFrontendId && $util.isInteger(message.googleFrontendId.low) && $util.isInteger(message.googleFrontendId.high))) + return "googleFrontendId: integer|Long expected"; + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) + if (!$util.isInteger(message.applicationFrontendId) && !(message.applicationFrontendId && $util.isInteger(message.applicationFrontendId.low) && $util.isInteger(message.applicationFrontendId.high))) + return "applicationFrontendId: integer|Long expected"; + if (message.applicationFrontendRegion != null && Object.hasOwnProperty.call(message, "applicationFrontendRegion")) + if (!$util.isString(message.applicationFrontendRegion)) + return "applicationFrontendRegion: string expected"; + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) + if (!$util.isString(message.applicationFrontendZone)) + return "applicationFrontendZone: string expected"; + if (message.applicationFrontendSubzone != null && Object.hasOwnProperty.call(message, "applicationFrontendSubzone")) + if (!$util.isString(message.applicationFrontendSubzone)) + return "applicationFrontendSubzone: string expected"; + if (message.transportType != null && Object.hasOwnProperty.call(message, "transportType")) + switch (message.transportType) { + default: + return "transportType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a PeerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PeerInfo} PeerInfo + */ + PeerInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.PeerInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PeerInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.PeerInfo(); + if (object.googleFrontendId != null) + if ($util.Long) + message.googleFrontendId = $util.Long.fromValue(object.googleFrontendId, false); + else if (typeof object.googleFrontendId === "string") + message.googleFrontendId = parseInt(object.googleFrontendId, 10); + else if (typeof object.googleFrontendId === "number") + message.googleFrontendId = object.googleFrontendId; + else if (typeof object.googleFrontendId === "object") + message.googleFrontendId = new $util.LongBits(object.googleFrontendId.low >>> 0, object.googleFrontendId.high >>> 0).toNumber(); + if (object.applicationFrontendId != null) + if ($util.Long) + message.applicationFrontendId = $util.Long.fromValue(object.applicationFrontendId, false); + else if (typeof object.applicationFrontendId === "string") + message.applicationFrontendId = parseInt(object.applicationFrontendId, 10); + else if (typeof object.applicationFrontendId === "number") + message.applicationFrontendId = object.applicationFrontendId; + else if (typeof object.applicationFrontendId === "object") + message.applicationFrontendId = new $util.LongBits(object.applicationFrontendId.low >>> 0, object.applicationFrontendId.high >>> 0).toNumber(); + if (object.applicationFrontendRegion != null) + message.applicationFrontendRegion = String(object.applicationFrontendRegion); + if (object.applicationFrontendZone != null) + message.applicationFrontendZone = String(object.applicationFrontendZone); + if (object.applicationFrontendSubzone != null) + message.applicationFrontendSubzone = String(object.applicationFrontendSubzone); + switch (object.transportType) { + default: + if (typeof object.transportType === "number") { + message.transportType = object.transportType; + break; + } + break; + case "TRANSPORT_TYPE_UNKNOWN": + case 0: + message.transportType = 0; + break; + case "TRANSPORT_TYPE_EXTERNAL": + case 1: + message.transportType = 1; + break; + case "TRANSPORT_TYPE_CLOUD_PATH": + case 2: + message.transportType = 2; + break; + case "TRANSPORT_TYPE_DIRECT_ACCESS": + case 3: + message.transportType = 3; + break; + case "TRANSPORT_TYPE_SESSION_UNKNOWN": + case 4: + message.transportType = 4; + break; + case "TRANSPORT_TYPE_SESSION_EXTERNAL": + case 5: + message.transportType = 5; + break; + case "TRANSPORT_TYPE_SESSION_CLOUD_PATH": + case 6: + message.transportType = 6; + break; + case "TRANSPORT_TYPE_SESSION_DIRECT_ACCESS": + case 7: + message.transportType = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a PeerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {google.bigtable.v2.PeerInfo} message PeerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PeerInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.googleFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.googleFrontendId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applicationFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.applicationFrontendId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.applicationFrontendZone = ""; + object.applicationFrontendSubzone = ""; + object.transportType = options.enums === String ? "TRANSPORT_TYPE_UNKNOWN" : 0; + object.applicationFrontendRegion = ""; + } + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.googleFrontendId = typeof message.googleFrontendId === "number" ? BigInt(message.googleFrontendId) : $util.Long.fromBits(message.googleFrontendId.low >>> 0, message.googleFrontendId.high >>> 0, false).toBigInt(); + else if (typeof message.googleFrontendId === "number") + object.googleFrontendId = options.longs === String ? String(message.googleFrontendId) : message.googleFrontendId; + else + object.googleFrontendId = options.longs === String ? $util.Long.prototype.toString.call(message.googleFrontendId) : options.longs === Number ? new $util.LongBits(message.googleFrontendId.low >>> 0, message.googleFrontendId.high >>> 0).toNumber() : message.googleFrontendId; + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.applicationFrontendId = typeof message.applicationFrontendId === "number" ? BigInt(message.applicationFrontendId) : $util.Long.fromBits(message.applicationFrontendId.low >>> 0, message.applicationFrontendId.high >>> 0, false).toBigInt(); + else if (typeof message.applicationFrontendId === "number") + object.applicationFrontendId = options.longs === String ? String(message.applicationFrontendId) : message.applicationFrontendId; + else + object.applicationFrontendId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationFrontendId) : options.longs === Number ? new $util.LongBits(message.applicationFrontendId.low >>> 0, message.applicationFrontendId.high >>> 0).toNumber() : message.applicationFrontendId; + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) + object.applicationFrontendZone = message.applicationFrontendZone; + if (message.applicationFrontendSubzone != null && Object.hasOwnProperty.call(message, "applicationFrontendSubzone")) + object.applicationFrontendSubzone = message.applicationFrontendSubzone; + if (message.transportType != null && Object.hasOwnProperty.call(message, "transportType")) + object.transportType = options.enums === String ? $root.google.bigtable.v2.PeerInfo.TransportType[message.transportType] === undefined ? message.transportType : $root.google.bigtable.v2.PeerInfo.TransportType[message.transportType] : message.transportType; + if (message.applicationFrontendRegion != null && Object.hasOwnProperty.call(message, "applicationFrontendRegion")) + object.applicationFrontendRegion = message.applicationFrontendRegion; + return object; + }; + + /** + * Converts this PeerInfo to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PeerInfo + * @instance + * @returns {Object.} JSON object + */ + PeerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PeerInfo + * @function getTypeUrl + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PeerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.PeerInfo"; + }; + + /** + * TransportType enum. + * @name google.bigtable.v2.PeerInfo.TransportType + * @enum {number} + * @property {number} TRANSPORT_TYPE_UNKNOWN=0 TRANSPORT_TYPE_UNKNOWN value + * @property {number} TRANSPORT_TYPE_EXTERNAL=1 TRANSPORT_TYPE_EXTERNAL value + * @property {number} TRANSPORT_TYPE_CLOUD_PATH=2 TRANSPORT_TYPE_CLOUD_PATH value + * @property {number} TRANSPORT_TYPE_DIRECT_ACCESS=3 TRANSPORT_TYPE_DIRECT_ACCESS value + * @property {number} TRANSPORT_TYPE_SESSION_UNKNOWN=4 TRANSPORT_TYPE_SESSION_UNKNOWN value + * @property {number} TRANSPORT_TYPE_SESSION_EXTERNAL=5 TRANSPORT_TYPE_SESSION_EXTERNAL value + * @property {number} TRANSPORT_TYPE_SESSION_CLOUD_PATH=6 TRANSPORT_TYPE_SESSION_CLOUD_PATH value + * @property {number} TRANSPORT_TYPE_SESSION_DIRECT_ACCESS=7 TRANSPORT_TYPE_SESSION_DIRECT_ACCESS value + */ + PeerInfo.TransportType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSPORT_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TRANSPORT_TYPE_EXTERNAL"] = 1; + values[valuesById[2] = "TRANSPORT_TYPE_CLOUD_PATH"] = 2; + values[valuesById[3] = "TRANSPORT_TYPE_DIRECT_ACCESS"] = 3; + values[valuesById[4] = "TRANSPORT_TYPE_SESSION_UNKNOWN"] = 4; + values[valuesById[5] = "TRANSPORT_TYPE_SESSION_EXTERNAL"] = 5; + values[valuesById[6] = "TRANSPORT_TYPE_SESSION_CLOUD_PATH"] = 6; + values[valuesById[7] = "TRANSPORT_TYPE_SESSION_DIRECT_ACCESS"] = 7; + return values; + })(); + + return PeerInfo; + })(); + + 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 + * @property {number|Long|null} [afeId] ResponseParams afeId + */ + + /** + * 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 && keys[i] !== "__proto__") + 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; + + /** + * ResponseParams afeId. + * @member {number|Long|null|undefined} afeId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ + ResponseParams.prototype.afeId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseParams.prototype, "_zoneId", { + get: $util.oneOfGetter($oneOfFields = ["zoneId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseParams.prototype, "_clusterId", { + get: $util.oneOfGetter($oneOfFields = ["clusterId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseParams.prototype, "_afeId", { + get: $util.oneOfGetter($oneOfFields = ["afeId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseParams instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {google.bigtable.v2.IResponseParams=} [properties] Properties to set + * @returns {google.bigtable.v2.ResponseParams} ResponseParams instance + */ + ResponseParams.create = function create(properties) { + return new ResponseParams(properties); + }; + + /** + * Encodes the specified ResponseParams message. Does not implicitly {@link google.bigtable.v2.ResponseParams.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {google.bigtable.v2.IResponseParams} message ResponseParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseParams.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.zoneId); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterId); + if (message.afeId != null && Object.hasOwnProperty.call(message, "afeId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.afeId); + return writer; + }; + + /** + * Encodes the specified ResponseParams message, length delimited. Does not implicitly {@link google.bigtable.v2.ResponseParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {google.bigtable.v2.IResponseParams} message ResponseParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ResponseParams message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.ResponseParams} ResponseParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseParams.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.ResponseParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.zoneId = reader.string(); + break; + } + case 2: { + message.clusterId = reader.string(); + break; + } + case 3: { + message.afeId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.ResponseParams} ResponseParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseParams message. + * @function verify + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseParams.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) { + properties._zoneId = 1; + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + } + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) { + properties._clusterId = 1; + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + } + if (message.afeId != null && Object.hasOwnProperty.call(message, "afeId")) { + properties._afeId = 1; + if (!$util.isInteger(message.afeId) && !(message.afeId && $util.isInteger(message.afeId.low) && $util.isInteger(message.afeId.high))) + return "afeId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a ResponseParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.ResponseParams} ResponseParams + */ + ResponseParams.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.bigtable.v2.ResponseParams) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ResponseParams: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.bigtable.v2.ResponseParams(); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.afeId != null) + if ($util.Long) + message.afeId = $util.Long.fromValue(object.afeId, false); + else if (typeof object.afeId === "string") + message.afeId = parseInt(object.afeId, 10); + else if (typeof object.afeId === "number") + message.afeId = object.afeId; + else if (typeof object.afeId === "object") + message.afeId = new $util.LongBits(object.afeId.low >>> 0, object.afeId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ResponseParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {google.bigtable.v2.ResponseParams} message ResponseParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseParams.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) { + object.zoneId = message.zoneId; + if (options.oneofs) + object._zoneId = "zoneId"; + } + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) { + object.clusterId = message.clusterId; + if (options.oneofs) + object._clusterId = "clusterId"; + } + if (message.afeId != null && Object.hasOwnProperty.call(message, "afeId")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.afeId = typeof message.afeId === "number" ? BigInt(message.afeId) : $util.Long.fromBits(message.afeId.low >>> 0, message.afeId.high >>> 0, false).toBigInt(); + else if (typeof message.afeId === "number") + object.afeId = options.longs === String ? String(message.afeId) : message.afeId; + else + object.afeId = options.longs === String ? $util.Long.prototype.toString.call(message.afeId) : options.longs === Number ? new $util.LongBits(message.afeId.low >>> 0, message.afeId.high >>> 0).toNumber() : message.afeId; + if (options.oneofs) + object._afeId = "afeId"; + } + return object; + }; + + /** + * Converts this ResponseParams to JSON. + * @function toJSON + * @memberof google.bigtable.v2.ResponseParams + * @instance + * @returns {Object.} JSON object + */ + ResponseParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseParams + * @function getTypeUrl + * @memberof google.bigtable.v2.ResponseParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.ResponseParams"; + }; + + return ResponseParams; + })(); + + return v2; + })(); + + return bigtable; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i], long + 1); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.Http) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.Http: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (!$util.isObject(object.rules[i])) + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i], long + 1); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options, q + 1); + } + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && Object.hasOwnProperty.call(message, "get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && Object.hasOwnProperty.call(message, "put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && Object.hasOwnProperty.call(message, "post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom, long + 1); + if (error) + return "custom." + error; + } + } + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && Object.hasOwnProperty.call(message, "additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i], long + 1); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.HttpRule) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.HttpRule: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (!$util.isObject(object.custom)) + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom, long + 1); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (!$util.isObject(object.additionalBindings[i])) + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + object.selector = message.selector; + if (message.get != null && Object.hasOwnProperty.call(message, "get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && Object.hasOwnProperty.call(message, "put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && Object.hasOwnProperty.call(message, "post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + object.body = message.body; + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options, q + 1); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options, q + 1); + } + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CustomHttpPattern: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + object.kind = message.kind; + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + + /** + * 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 + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * 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 + */ + CommonLanguageSettings.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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(); + } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * 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 + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * 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 + */ + CommonLanguageSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && Object.hasOwnProperty.call(message, "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; + } + } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration, long + 1); + if (error) + return "selectiveGapicGeneration." + error; + } + 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, long) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CommonLanguageSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + 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; + } + } + if (object.selectiveGapicGeneration != null) { + if (!$util.isObject(object.selectiveGapicGeneration)) + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) { + object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "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]; + } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options, q + 1); + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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(), q + 1).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(), q + 1).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(), q + 1).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(), q + 1).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(), q + 1).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(), q + 1).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(), q + 1).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(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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(), undefined, long + 1); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings, long + 1); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings, long + 1); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings, long + 1); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings, long + 1); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings, long + 1); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings, long + 1); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings, long + 1); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings, long + 1); + 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, long) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ClientLibrarySettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + 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 (!$util.isObject(object.javaSettings)) + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings, long + 1); + } + if (object.cppSettings != null) { + if (!$util.isObject(object.cppSettings)) + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings, long + 1); + } + if (object.phpSettings != null) { + if (!$util.isObject(object.phpSettings)) + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings, long + 1); + } + if (object.pythonSettings != null) { + if (!$util.isObject(object.pythonSettings)) + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings, long + 1); + } + if (object.nodeSettings != null) { + if (!$util.isObject(object.nodeSettings)) + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings, long + 1); + } + if (object.dotnetSettings != null) { + if (!$util.isObject(object.dotnetSettings)) + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings, long + 1); + } + if (object.rubySettings != null) { + if (!$util.isObject(object.rubySettings)) + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings, long + 1); + } + if (object.goSettings != null) { + if (!$util.isObject(object.goSettings)) + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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 && Object.hasOwnProperty.call(message, "version")) + object.version = message.version; + if (message.launchStage != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options, q + 1); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options, q + 1); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options, q + 1); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options, q + 1); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options, q + 1); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options, q + 1); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options, q + 1); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options, q + 1); + 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 + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * 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 && keys[i] !== "__proto__") + 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; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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(), q + 1).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(), q + 1).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + 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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32(), undefined, long + 1)); + 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(), undefined, long + 1)); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.methodSettings != null && Object.hasOwnProperty.call(message, "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], long + 1); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && Object.hasOwnProperty.call(message, "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], long + 1); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + 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, long) { + if (object instanceof $root.google.api.Publishing) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.Publishing: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + 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 (!$util.isObject(object.methodSettings[i])) + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i], long + 1); + } + } + 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; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + 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 (!$util.isObject(object.librarySettings[i])) + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i], long + 1); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + 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, q + 1); + } + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && Object.hasOwnProperty.call(message, "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, q + 1); + } + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + 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(); + if (tag === error) + break; + 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, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.serviceClassNames, key); + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + 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, long) { + if (object instanceof $root.google.api.JavaSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.JavaSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (!$util.isObject(object.serviceClassNames)) + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.serviceClassNames, keys[i]); + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + } + if (object.common != null) { + if (!$util.isObject(object.common)) + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "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) { + if (keys2[j] === "__proto__") + $util.makeProp(object.serviceClassNames, keys2[j]); + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + } + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + 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, long) { + if (object instanceof $root.google.api.CppSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CppSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (!$util.isObject(object.common)) + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + 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, long) { + if (object instanceof $root.google.api.PhpSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PhpSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (!$util.isObject(object.common)) + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + 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 + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures + */ + + /** + * 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 && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures, long + 1); + if (error) + return "experimentalFeatures." + 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, long) { + if (object instanceof $root.google.api.PythonSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PythonSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (!$util.isObject(object.common)) + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + if (object.experimentalFeatures != null) { + if (!$util.isObject(object.experimentalFeatures)) + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.common = null; + object.experimentalFeatures = null; + } + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options, q + 1); + 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"; + }; + + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PythonSettings.ExperimentalFeatures: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + 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, long) { + if (object instanceof $root.google.api.NodeSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.NodeSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (!$util.isObject(object.common)) + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + 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 + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * 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) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), 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.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + 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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.renamedServices, key); + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.renamedResources, key); + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && Object.hasOwnProperty.call(message, "ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && Object.hasOwnProperty.call(message, "forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && Object.hasOwnProperty.call(message, "handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + 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, long) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.DotnetSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (!$util.isObject(object.common)) + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + if (object.renamedServices) { + if (!$util.isObject(object.renamedServices)) + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.renamedServices, keys[i]); + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + } + if (object.renamedResources) { + if (!$util.isObject(object.renamedResources)) + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.renamedResources, keys[i]); + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.renamedServices, keys2[j]); + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.renamedResources, keys2[j]); + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + 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, long) { + if (object instanceof $root.google.api.RubySettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.RubySettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (!$util.isObject(object.common)) + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + 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 + * @property {Object.|null} [renamedServices] GoSettings renamedServices + */ + + /** + * 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) { + this.renamedServices = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + + /** + * 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), 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.renamedServices[keys[i]]).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.renamedServices, key); + message.renamedServices[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + 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, long) { + if (object instanceof $root.google.api.GoSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.GoSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (!$util.isObject(object.common)) + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + if (object.renamedServices) { + if (!$util.isObject(object.renamedServices)) + throw TypeError(".google.api.GoSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.renamedServices, keys[i]); + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; + if (options.defaults) + object.common = null; + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.renamedServices, keys2[j]); + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + } + 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 + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * 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) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + 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; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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(), q + 1).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + 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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning, long + 1); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && Object.hasOwnProperty.call(message, "autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + 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, long) { + if (object instanceof $root.google.api.MethodSettings) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.MethodSettings: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (!$util.isObject(object.longRunning)) + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning, long + 1); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + object.selector = message.selector; + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options, q + 1); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).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(), q + 1).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(), q + 1).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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay, long + 1); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay, long + 1); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout, long + 1); + 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, long) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.MethodSettings.LongRunning: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (!$util.isObject(object.initialPollDelay)) + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay, long + 1); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (!$util.isObject(object.maxPollDelay)) + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay, long + 1); + } + if (object.totalPollTimeout != null) { + if (!$util.isObject(object.totalPollTimeout)) + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout, long + 1); + } + 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options, q + 1); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options, q + 1); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options, q + 1); + 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 + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI 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; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + 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; + })(); + + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.methods != null && Object.hasOwnProperty.call(message, "methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.SelectiveGapicGeneration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + + /** + * 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 + * @property {number} IDENTIFIER=8 IDENTIFIER 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; + values[valuesById[8] = "IDENTIFIER"] = 8; + 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 && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && Object.hasOwnProperty.call(message, "style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ResourceDescriptor: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + object.nameField = message.nameField; + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + object.plural = message.plural; + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.ResourceReference) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ResourceReference: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = message.type; + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + api.RoutingRule = (function() { + + /** + * Properties of a RoutingRule. + * @memberof google.api + * @interface IRoutingRule + * @property {Array.|null} [routingParameters] RoutingRule routingParameters + */ + + /** + * Constructs a new RoutingRule. + * @memberof google.api + * @classdesc Represents a RoutingRule. + * @implements IRoutingRule + * @constructor + * @param {google.api.IRoutingRule=} [properties] Properties to set + */ + function RoutingRule(properties) { + this.routingParameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RoutingRule routingParameters. + * @member {Array.} routingParameters + * @memberof google.api.RoutingRule + * @instance + */ + RoutingRule.prototype.routingParameters = $util.emptyArray; + + /** + * Creates a new RoutingRule instance using the specified properties. + * @function create + * @memberof google.api.RoutingRule + * @static + * @param {google.api.IRoutingRule=} [properties] Properties to set + * @returns {google.api.RoutingRule} RoutingRule instance + */ + RoutingRule.create = function create(properties) { + return new RoutingRule(properties); + }; + + /** + * Encodes the specified RoutingRule message. Does not implicitly {@link google.api.RoutingRule.verify|verify} messages. + * @function encode + * @memberof google.api.RoutingRule + * @static + * @param {google.api.IRoutingRule} message RoutingRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RoutingRule.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.routingParameters != null && message.routingParameters.length) + for (var i = 0; i < message.routingParameters.length; ++i) + $root.google.api.RoutingParameter.encode(message.routingParameters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link google.api.RoutingRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RoutingRule + * @static + * @param {google.api.IRoutingRule} message RoutingRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RoutingRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RoutingRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.RoutingRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RoutingRule} RoutingRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RoutingRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RoutingRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.routingParameters && message.routingParameters.length)) + message.routingParameters = []; + message.routingParameters.push($root.google.api.RoutingParameter.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RoutingRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RoutingRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RoutingRule} RoutingRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RoutingRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RoutingRule message. + * @function verify + * @memberof google.api.RoutingRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RoutingRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.routingParameters != null && Object.hasOwnProperty.call(message, "routingParameters")) { + if (!Array.isArray(message.routingParameters)) + return "routingParameters: array expected"; + for (var i = 0; i < message.routingParameters.length; ++i) { + var error = $root.google.api.RoutingParameter.verify(message.routingParameters[i], long + 1); + if (error) + return "routingParameters." + error; + } + } + return null; + }; + + /** + * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RoutingRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.RoutingRule} RoutingRule + */ + RoutingRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.RoutingRule) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.RoutingRule: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.RoutingRule(); + if (object.routingParameters) { + if (!Array.isArray(object.routingParameters)) + throw TypeError(".google.api.RoutingRule.routingParameters: array expected"); + message.routingParameters = []; + for (var i = 0; i < object.routingParameters.length; ++i) { + if (!$util.isObject(object.routingParameters[i])) + throw TypeError(".google.api.RoutingRule.routingParameters: object expected"); + message.routingParameters[i] = $root.google.api.RoutingParameter.fromObject(object.routingParameters[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RoutingRule + * @static + * @param {google.api.RoutingRule} message RoutingRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RoutingRule.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.routingParameters = []; + if (message.routingParameters && message.routingParameters.length) { + object.routingParameters = []; + for (var j = 0; j < message.routingParameters.length; ++j) + object.routingParameters[j] = $root.google.api.RoutingParameter.toObject(message.routingParameters[j], options, q + 1); + } + return object; + }; + + /** + * Converts this RoutingRule to JSON. + * @function toJSON + * @memberof google.api.RoutingRule + * @instance + * @returns {Object.} JSON object + */ + RoutingRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RoutingRule + * @function getTypeUrl + * @memberof google.api.RoutingRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RoutingRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RoutingRule"; + }; + + return RoutingRule; + })(); + + api.RoutingParameter = (function() { + + /** + * Properties of a RoutingParameter. + * @memberof google.api + * @interface IRoutingParameter + * @property {string|null} [field] RoutingParameter field + * @property {string|null} [pathTemplate] RoutingParameter pathTemplate + */ + + /** + * Constructs a new RoutingParameter. + * @memberof google.api + * @classdesc Represents a RoutingParameter. + * @implements IRoutingParameter + * @constructor + * @param {google.api.IRoutingParameter=} [properties] Properties to set + */ + function RoutingParameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RoutingParameter field. + * @member {string} field + * @memberof google.api.RoutingParameter + * @instance + */ + RoutingParameter.prototype.field = ""; + + /** + * RoutingParameter pathTemplate. + * @member {string} pathTemplate + * @memberof google.api.RoutingParameter + * @instance + */ + RoutingParameter.prototype.pathTemplate = ""; + + /** + * Creates a new RoutingParameter instance using the specified properties. + * @function create + * @memberof google.api.RoutingParameter + * @static + * @param {google.api.IRoutingParameter=} [properties] Properties to set + * @returns {google.api.RoutingParameter} RoutingParameter instance + */ + RoutingParameter.create = function create(properties) { + return new RoutingParameter(properties); + }; + + /** + * Encodes the specified RoutingParameter message. Does not implicitly {@link google.api.RoutingParameter.verify|verify} messages. + * @function encode + * @memberof google.api.RoutingParameter + * @static + * @param {google.api.IRoutingParameter} message RoutingParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RoutingParameter.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.pathTemplate != null && Object.hasOwnProperty.call(message, "pathTemplate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pathTemplate); + return writer; + }; + + /** + * Encodes the specified RoutingParameter message, length delimited. Does not implicitly {@link google.api.RoutingParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RoutingParameter + * @static + * @param {google.api.IRoutingParameter} message RoutingParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RoutingParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RoutingParameter message from the specified reader or buffer. + * @function decode + * @memberof google.api.RoutingParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RoutingParameter} RoutingParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RoutingParameter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RoutingParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.pathTemplate = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RoutingParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RoutingParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RoutingParameter} RoutingParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RoutingParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RoutingParameter message. + * @function verify + * @memberof google.api.RoutingParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RoutingParameter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.pathTemplate != null && Object.hasOwnProperty.call(message, "pathTemplate")) + if (!$util.isString(message.pathTemplate)) + return "pathTemplate: string expected"; + return null; + }; + + /** + * Creates a RoutingParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RoutingParameter + * @static + * @param {Object.} object Plain object + * @returns {google.api.RoutingParameter} RoutingParameter + */ + RoutingParameter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.RoutingParameter) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.RoutingParameter: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.RoutingParameter(); + if (object.field != null) + message.field = String(object.field); + if (object.pathTemplate != null) + message.pathTemplate = String(object.pathTemplate); + return message; + }; + + /** + * Creates a plain object from a RoutingParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RoutingParameter + * @static + * @param {google.api.RoutingParameter} message RoutingParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RoutingParameter.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.field = ""; + object.pathTemplate = ""; + } + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + object.field = message.field; + if (message.pathTemplate != null && Object.hasOwnProperty.call(message, "pathTemplate")) + object.pathTemplate = message.pathTemplate; + return object; + }; + + /** + * Converts this RoutingParameter to JSON. + * @function toJSON + * @memberof google.api.RoutingParameter + * @instance + * @returns {Object.} JSON object + */ + RoutingParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RoutingParameter + * @function getTypeUrl + * @memberof google.api.RoutingParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RoutingParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RoutingParameter"; + }; + + return RoutingParameter; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.file != null && Object.hasOwnProperty.call(message, "file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], long + 1); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileDescriptorSet: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (!$util.isObject(object.file[i])) + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, q + 1); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.optionDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && Object.hasOwnProperty.call(message, "dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && Object.hasOwnProperty.call(message, "publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && Object.hasOwnProperty.call(message, "weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.optionDependency != null && Object.hasOwnProperty.call(message, "optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i], long + 1); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i], long + 1); + if (error) + return "enumType." + error; + } + } + if (message.service != null && Object.hasOwnProperty.call(message, "service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], long + 1); + if (error) + return "service." + error; + } + } + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], long + 1); + if (error) + return "extension." + error; + } + } + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo, long + 1); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileDescriptorProto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (!$util.isObject(object.messageType[i])) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i], long + 1); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (!$util.isObject(object.enumType[i])) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (!$util.isObject(object.service[i])) + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], long + 1); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (!$util.isObject(object.extension[i])) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); + } + } + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options, long + 1); + } + if (object.sourceCodeInfo != null) { + if (!$util.isObject(object.sourceCodeInfo)) + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo, long + 1); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + object.optionDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options, q + 1); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options, q + 1); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, q + 1); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); + } + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, q + 1); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options, q + 1); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + object.syntax = message.syntax; + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 11: { + message.visibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && Object.hasOwnProperty.call(message, "field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], long + 1); + if (error) + return "field." + error; + } + } + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], long + 1); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && Object.hasOwnProperty.call(message, "nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i], long + 1); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i], long + 1); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && Object.hasOwnProperty.call(message, "extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i], long + 1); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && Object.hasOwnProperty.call(message, "oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i], long + 1); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i], long + 1); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (!$util.isObject(object.field[i])) + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], long + 1); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (!$util.isObject(object.extension[i])) + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (!$util.isObject(object.nestedType[i])) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i], long + 1); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (!$util.isObject(object.enumType[i])) + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (!$util.isObject(object.extensionRange[i])) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i], long + 1); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (!$util.isObject(object.oneofDecl[i])) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i], long + 1); + } + } + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, long + 1); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (!$util.isObject(object.reservedRange[i])) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i], long + 1); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, q + 1); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options, q + 1); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options, q + 1); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options, q + 1); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); + } + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, q + 1); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options, q + 1); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options, q + 1); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + object.start = message.start; + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + object.end = message.end; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options, q + 1); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto.ReservedRange: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + object.start = message.start; + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i], long + 1); + if (error) + return "declaration." + error; + } + } + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ExtensionRangeOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (!$util.isObject(object.declaration[i])) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i], long + 1); + } + } + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options, q + 1); + } + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.Declaration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + object.number = message.number; + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + object.fullName = message.fullName; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = message.type; + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + object.reserved = message.reserved; + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldDescriptorProto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, long + 1); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + object.extendee = message.extendee; + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + object.number = message.number; + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, q + 1); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.OneofDescriptorProto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options, q + 1); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 6: { + message.visibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], long + 1); + if (error) + return "value." + error; + } + } + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i], long + 1); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumDescriptorProto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (!$util.isObject(object.value[i])) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], long + 1); + } + } + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, long + 1); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (!$util.isObject(object.reservedRange[i])) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i], long + 1); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, q + 1); + } + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, q + 1); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options, q + 1); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumDescriptorProto.EnumReservedRange: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + object.start = message.start; + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + object.number = message.number; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, q + 1); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && Object.hasOwnProperty.call(message, "method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], long + 1); + if (error) + return "method." + error; + } + } + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (!$util.isObject(object.method[i])) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], long + 1); + } + } + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, q + 1); + } + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, q + 1); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MethodDescriptorProto: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, long + 1); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + object.inputType = message.inputType; + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + object.outputType = message.outputType; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, q + 1); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i], long + 1); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (!$util.isObject(object[".google.api.resourceDefinition"][i])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options, q + 1); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.bigtable.v2.SessionType|null} [".google.bigtable.v2.openSessionType"] MessageOptions .google.bigtable.v2.openSessionType + * @property {Array.|null} [".google.bigtable.v2.vrpcSessionType"] MessageOptions .google.bigtable.v2.vrpcSessionType + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + this[".google.bigtable.v2.vrpcSessionType"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.bigtable.v2.openSessionType. + * @member {google.bigtable.v2.SessionType} .google.bigtable.v2.openSessionType + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.bigtable.v2.openSessionType"] = 0; + + /** + * MessageOptions .google.bigtable.v2.vrpcSessionType. + * @member {Array.} .google.bigtable.v2.vrpcSessionType + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.bigtable.v2.vrpcSessionType"] = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); + if (message[".google.bigtable.v2.openSessionType"] != null && Object.hasOwnProperty.call(message, ".google.bigtable.v2.openSessionType")) + writer.uint32(/* id 138898474, wireType 0 =*/1111187792).int32(message[".google.bigtable.v2.openSessionType"]); + if (message[".google.bigtable.v2.vrpcSessionType"] != null && message[".google.bigtable.v2.vrpcSessionType"].length) + for (var i = 0; i < message[".google.bigtable.v2.vrpcSessionType"].length; ++i) + writer.uint32(/* id 138899157, wireType 0 =*/1111193256).int32(message[".google.bigtable.v2.vrpcSessionType"][i]); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 138898474: { + message[".google.bigtable.v2.openSessionType"] = reader.int32(); + break; + } + case 138899157: { + if (!(message[".google.bigtable.v2.vrpcSessionType"] && message[".google.bigtable.v2.vrpcSessionType"].length)) + message[".google.bigtable.v2.vrpcSessionType"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.bigtable.v2.vrpcSessionType"].push(reader.int32()); + } else + message[".google.bigtable.v2.vrpcSessionType"].push(reader.int32()); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.bigtable.v2.openSessionType"] != null && Object.hasOwnProperty.call(message, ".google.bigtable.v2.openSessionType")) + switch (message[".google.bigtable.v2.openSessionType"]) { + default: + return ".google.bigtable.v2.openSessionType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 9999: + break; + } + if (message[".google.bigtable.v2.vrpcSessionType"] != null && Object.hasOwnProperty.call(message, ".google.bigtable.v2.vrpcSessionType")) { + if (!Array.isArray(message[".google.bigtable.v2.vrpcSessionType"])) + return ".google.bigtable.v2.vrpcSessionType: array expected"; + for (var i = 0; i < message[".google.bigtable.v2.vrpcSessionType"].length; ++i) + switch (message[".google.bigtable.v2.vrpcSessionType"][i]) { + default: + return ".google.bigtable.v2.vrpcSessionType: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 9999: + break; + } + } + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"], long + 1); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MessageOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + switch (object[".google.bigtable.v2.openSessionType"]) { + default: + if (typeof object[".google.bigtable.v2.openSessionType"] === "number") { + message[".google.bigtable.v2.openSessionType"] = object[".google.bigtable.v2.openSessionType"]; + break; + } + break; + case "SESSION_TYPE_UNSET": + case 0: + message[".google.bigtable.v2.openSessionType"] = 0; + break; + case "SESSION_TYPE_TABLE": + case 1: + message[".google.bigtable.v2.openSessionType"] = 1; + break; + case "SESSION_TYPE_AUTHORIZED_VIEW": + case 2: + message[".google.bigtable.v2.openSessionType"] = 2; + break; + case "SESSION_TYPE_MATERIALIZED_VIEW": + case 3: + message[".google.bigtable.v2.openSessionType"] = 3; + break; + case "SESSION_TYPE_TEST": + case 9999: + message[".google.bigtable.v2.openSessionType"] = 9999; + break; + } + if (object[".google.bigtable.v2.vrpcSessionType"]) { + if (!Array.isArray(object[".google.bigtable.v2.vrpcSessionType"])) + throw TypeError(".google.protobuf.MessageOptions..google.bigtable.v2.vrpcSessionType: array expected"); + message[".google.bigtable.v2.vrpcSessionType"] = []; + for (var i = 0; i < object[".google.bigtable.v2.vrpcSessionType"].length; ++i) + switch (object[".google.bigtable.v2.vrpcSessionType"][i]) { + default: + if (typeof object[".google.bigtable.v2.vrpcSessionType"][i] === "number") { + message[".google.bigtable.v2.vrpcSessionType"][i] = object[".google.bigtable.v2.vrpcSessionType"][i]; + break; + } + case "SESSION_TYPE_UNSET": + case 0: + message[".google.bigtable.v2.vrpcSessionType"][i] = 0; + break; + case "SESSION_TYPE_TABLE": + case 1: + message[".google.bigtable.v2.vrpcSessionType"][i] = 1; + break; + case "SESSION_TYPE_AUTHORIZED_VIEW": + case 2: + message[".google.bigtable.v2.vrpcSessionType"][i] = 2; + break; + case "SESSION_TYPE_MATERIALIZED_VIEW": + case 3: + message[".google.bigtable.v2.vrpcSessionType"][i] = 3; + break; + case "SESSION_TYPE_TEST": + case 9999: + message[".google.bigtable.v2.vrpcSessionType"][i] = 9999; + break; + } + } + if (object[".google.api.resource"] != null) { + if (!$util.isObject(object[".google.api.resource"])) + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"], long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.bigtable.v2.vrpcSessionType"] = []; + } + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + object[".google.bigtable.v2.openSessionType"] = options.enums === String ? "SESSION_TYPE_UNSET" : 0; + } + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options, q + 1); + if (message[".google.bigtable.v2.openSessionType"] != null && Object.hasOwnProperty.call(message, ".google.bigtable.v2.openSessionType")) + object[".google.bigtable.v2.openSessionType"] = options.enums === String ? $root.google.bigtable.v2.SessionType[message[".google.bigtable.v2.openSessionType"]] === undefined ? message[".google.bigtable.v2.openSessionType"] : $root.google.bigtable.v2.SessionType[message[".google.bigtable.v2.openSessionType"]] : message[".google.bigtable.v2.openSessionType"]; + if (message[".google.bigtable.v2.vrpcSessionType"] && message[".google.bigtable.v2.vrpcSessionType"].length) { + object[".google.bigtable.v2.vrpcSessionType"] = []; + for (var j = 0; j < message[".google.bigtable.v2.vrpcSessionType"].length; ++j) + object[".google.bigtable.v2.vrpcSessionType"][j] = options.enums === String ? $root.google.bigtable.v2.SessionType[message[".google.bigtable.v2.vrpcSessionType"][j]] === undefined ? message[".google.bigtable.v2.vrpcSessionType"][j] : $root.google.bigtable.v2.SessionType[message[".google.bigtable.v2.vrpcSessionType"][j]] : message[".google.bigtable.v2.vrpcSessionType"][j]; + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions 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 targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.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.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && Object.hasOwnProperty.call(message, "targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: 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.editionDefaults != null && Object.hasOwnProperty.call(message, "editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i], long + 1); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); + if (error) + return "featureSupport." + error; + } + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"], long + 1); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.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; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (!$util.isObject(object.editionDefaults[i])) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i], long + 1); + } + } + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.featureSupport != null) { + if (!$util.isObject(object.featureSupport)) + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (!$util.isObject(object[".google.api.resourceReference"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"], long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object.featureSupport = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + object.packed = message.packed; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + object.lazy = message.lazy; + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && Object.hasOwnProperty.call(message, "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.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options, q + 1); + } + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options, q + 1); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * 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; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions.EditionDefault: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = message.value; + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions.FeatureSupport: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.OneofOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); + if (error) + return "featureSupport." + error; + } + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumValueOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (!$util.isObject(object.featureSupport)) + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + object.featureSupport = null; + } + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + object.debugRedact = message.debugRedact; + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ServiceOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.bigtable.v2.SessionType|null} [".google.bigtable.v2.rpcSessionType"] MethodOptions .google.bigtable.v2.rpcSessionType + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.api.IRoutingRule|null} [".google.api.routing"] MethodOptions .google.api.routing + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.bigtable.v2.rpcSessionType. + * @member {google.bigtable.v2.SessionType} .google.bigtable.v2.rpcSessionType + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.bigtable.v2.rpcSessionType"] = 0; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.api.routing. + * @member {google.api.IRoutingRule|null|undefined} .google.api.routing + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.routing"] = null; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork(), q + 1).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork(), q + 1).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork(), q + 1).ldelim(); + if (message[".google.api.routing"] != null && Object.hasOwnProperty.call(message, ".google.api.routing")) + $root.google.api.RoutingRule.encode(message[".google.api.routing"], writer.uint32(/* id 72295729, wireType 2 =*/578365834).fork(), q + 1).ldelim(); + if (message[".google.bigtable.v2.rpcSessionType"] != null && Object.hasOwnProperty.call(message, ".google.bigtable.v2.rpcSessionType")) + writer.uint32(/* id 137964804, wireType 0 =*/1103718432).int32(message[".google.bigtable.v2.rpcSessionType"]); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 137964804: { + message[".google.bigtable.v2.rpcSessionType"] = reader.int32(); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 72295729: { + message[".google.api.routing"] = $root.google.api.RoutingRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.bigtable.v2.rpcSessionType"] != null && Object.hasOwnProperty.call(message, ".google.bigtable.v2.rpcSessionType")) + switch (message[".google.bigtable.v2.rpcSessionType"]) { + default: + return ".google.bigtable.v2.rpcSessionType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 9999: + break; + } + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"], long + 1); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && Object.hasOwnProperty.call(message, ".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.api.routing"] != null && Object.hasOwnProperty.call(message, ".google.api.routing")) { + var error = $root.google.api.RoutingRule.verify(message[".google.api.routing"], long + 1); + if (error) + return ".google.api.routing." + error; + } + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"], long + 1); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MethodOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (!$util.isObject(object.features)) + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (!$util.isObject(object.uninterpretedOption[i])) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + switch (object[".google.bigtable.v2.rpcSessionType"]) { + default: + if (typeof object[".google.bigtable.v2.rpcSessionType"] === "number") { + message[".google.bigtable.v2.rpcSessionType"] = object[".google.bigtable.v2.rpcSessionType"]; + break; + } + break; + case "SESSION_TYPE_UNSET": + case 0: + message[".google.bigtable.v2.rpcSessionType"] = 0; + break; + case "SESSION_TYPE_TABLE": + case 1: + message[".google.bigtable.v2.rpcSessionType"] = 1; + break; + case "SESSION_TYPE_AUTHORIZED_VIEW": + case 2: + message[".google.bigtable.v2.rpcSessionType"] = 2; + break; + case "SESSION_TYPE_MATERIALIZED_VIEW": + case 3: + message[".google.bigtable.v2.rpcSessionType"] = 3; + break; + case "SESSION_TYPE_TEST": + case 9999: + message[".google.bigtable.v2.rpcSessionType"] = 9999; + break; + } + if (object[".google.api.http"] != null) { + if (!$util.isObject(object[".google.api.http"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"], long + 1); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.api.routing"] != null) { + if (!$util.isObject(object[".google.api.routing"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.routing: object expected"); + message[".google.api.routing"] = $root.google.api.RoutingRule.fromObject(object[".google.api.routing"], long + 1); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (!$util.isObject(object[".google.longrunning.operationInfo"])) + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"], long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + object[".google.api.routing"] = null; + object[".google.bigtable.v2.rpcSessionType"] = options.enums === String ? "SESSION_TYPE_UNSET" : 0; + } + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + } + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options, q + 1); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options, q + 1); + if (message[".google.api.routing"] != null && Object.hasOwnProperty.call(message, ".google.api.routing")) + object[".google.api.routing"] = $root.google.api.RoutingRule.toObject(message[".google.api.routing"], options, q + 1); + if (message[".google.bigtable.v2.rpcSessionType"] != null && Object.hasOwnProperty.call(message, ".google.bigtable.v2.rpcSessionType")) + object[".google.bigtable.v2.rpcSessionType"] = options.enums === String ? $root.google.bigtable.v2.SessionType[message[".google.bigtable.v2.rpcSessionType"]] === undefined ? message[".google.bigtable.v2.rpcSessionType"] : $root.google.bigtable.v2.SessionType[message[".google.bigtable.v2.rpcSessionType"]] : message[".google.bigtable.v2.rpcSessionType"]; + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], long + 1); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UninterpretedOption: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (!$util.isObject(object.name[i])) + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], long + 1); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue, true); + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue, false); + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, q + 1); + } + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.positiveIntValue = typeof message.positiveIntValue === "number" ? BigInt(message.positiveIntValue) : $util.Long.fromBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0, true).toBigInt(); + else if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.negativeIntValue = typeof message.negativeIntValue === "number" ? BigInt(message.negativeIntValue) : $util.Long.fromBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0, false).toBigInt(); + else if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + if (!Object.hasOwnProperty.call(message, "namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!Object.hasOwnProperty.call(message, "isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && Object.hasOwnProperty.call(message, "namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && Object.hasOwnProperty.call(message, "isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSet: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; + } + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.defaults != null && Object.hasOwnProperty.call(message, "defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i], long + 1); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSetDefaults: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (!$util.isObject(object.defaults[i])) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i], long + 1); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options, q + 1); + } + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.fixedFeatures = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures, long + 1); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures, long + 1); + if (error) + return "fixedFeatures." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.overridableFeatures != null) { + if (!$util.isObject(object.overridableFeatures)) + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures, long + 1); + } + if (object.fixedFeatures != null) { + if (!$util.isObject(object.fixedFeatures)) + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; + } + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options, q + 1); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options, q + 1); + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.location != null && Object.hasOwnProperty.call(message, "location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], long + 1); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.SourceCodeInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (!$util.isObject(object.location[i])) + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, q + 1); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.path != null && Object.hasOwnProperty.call(message, "path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && Object.hasOwnProperty.call(message, "span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && Object.hasOwnProperty.call(message, "leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i], long + 1); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.GeneratedCodeInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (!$util.isObject(object.annotation[i])) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options, q + 1); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.path != null && Object.hasOwnProperty.call(message, "path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + object.begin = message.begin; + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + object.end = message.end; + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + + 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 && keys[i] !== "__proto__") + 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, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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 && writer.len ? writer.fork() : 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, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + 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, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.seconds != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "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, long) { + if (object instanceof $root.google.protobuf.Duration) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Duration: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + message.seconds = $util.Long.fromValue(object.seconds, 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, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.nanos = 0; + } + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); + else 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 && Object.hasOwnProperty.call(message, "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() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.seconds != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Timestamp: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + message.seconds = $util.Long.fromValue(object.seconds, false); + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + 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() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.nanos = 0; + } + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); + else 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 && Object.hasOwnProperty.call(message, "nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.paths != null && Object.hasOwnProperty.call(message, "paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldMask: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Any) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Any: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + object.type_url = message.type_url; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DoubleValue: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FloatValue: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Int64Value: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + message.value = $util.Long.fromValue(object.value, false); + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, false).toBigInt(); + else if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UInt64Value: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + message.value = $util.Long.fromValue(object.value, true); + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, true).toBigInt(); + else if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Int32Value: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UInt32Value: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.BoolValue: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.StringValue: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.BytesValue: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + return protobuf; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.IAMPolicy = (function() { + + /** + * Constructs a new IAMPolicy service. + * @memberof google.iam.v1 + * @classdesc Represents a IAMPolicy + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest + * @constructor + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + */ + function SetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.resource = ""; + + /** + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.policy = null; + + /** + * SetIamPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.updateMask = null; + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + */ + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetIamPolicyRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy, long + 1); + if (error) + return "policy." + error; + } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + */ + SetIamPolicyRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.SetIamPolicyRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (!$util.isObject(object.policy)) + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy, long + 1); + } + if (object.updateMask != null) { + if (!$util.isObject(object.updateMask)) + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetIamPolicyRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + object.updateMask = null; + } + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + object.resource = message.resource; + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + return object; + }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { + + /** + * Properties of a GetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + */ + + /** + * Constructs a new GetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest + * @constructor + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + */ + function GetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.resource = ""; + + /** + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.options = null; + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + */ + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIamPolicyRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + */ + GetIamPolicyRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.GetIamPolicyRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (!$util.isObject(object.options)) + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIamPolicyRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + object.resource = message.resource; + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options, q + 1); + return object; + }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; + }; + + return GetIamPolicyRequest; + })(); + + v1.TestIamPermissionsRequest = (function() { + + /** + * Properties of a TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + */ + + /** + * Constructs a new TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest + * @constructor + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + */ + function TestIamPermissionsRequest(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.resource = ""; + + /** + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + */ + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(properties); + }; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsRequest message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + */ + TestIamPermissionsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; + }; + + return TestIamPermissionsRequest; + })(); + + v1.TestIamPermissionsResponse = (function() { + + /** + * Properties of a TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + */ + + /** + * Constructs a new TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse + * @constructor + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + */ + function TestIamPermissionsResponse(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + */ + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + */ + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); + }; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsResponse message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + */ + TestIamPermissionsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; + }; + + return TestIamPermissionsResponse; + })(); + + v1.GetPolicyOptions = (function() { + + /** + * Properties of a GetPolicyOptions. + * @memberof google.iam.v1 + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + */ + + /** + * Constructs a new GetPolicyOptions. + * @memberof google.iam.v1 + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions + * @constructor + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + */ + function GetPolicyOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions + * @instance + */ + GetPolicyOptions.prototype.requestedPolicyVersion = 0; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + */ + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); + }; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + return writer; + }; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPolicyOptions message. + * @function verify + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPolicyOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; + return null; + }; + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + */ + GetPolicyOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.GetPolicyOptions: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + return message; + }; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPolicyOptions.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; + return object; + }; + + /** + * Converts this GetPolicyOptions to JSON. + * @function toJSON + * @memberof google.iam.v1.GetPolicyOptions + * @instance + * @returns {Object.} JSON object + */ + GetPolicyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPolicyOptions + * @function getTypeUrl + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; + }; + + return GetPolicyOptions; + })(); + + v1.Policy = (function() { + + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs + * @property {Uint8Array|null} [etag] Policy etag + */ + + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + this.auditConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; + + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; + + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; + + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && Object.hasOwnProperty.call(message, "bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i], long + 1); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && Object.hasOwnProperty.call(message, "auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i], long + 1); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.Policy: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (!$util.isObject(object.bindings[i])) + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i], long + 1); + } + } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (!$util.isObject(object.auditConfigs[i])) + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i], long + 1); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length >= 0) + message.etag = object.etag; + return message; + }; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.bindings = []; + object.auditConfigs = []; + } + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + object.version = message.version; + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options, q + 1); + } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && Object.hasOwnProperty.call(message, "members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) { + var error = $root.google.type.Expr.verify(message.condition, long + 1); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.Binding: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (!$util.isObject(object.condition)) + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options, q + 1); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; + + return Binding; + })(); + + v1.AuditConfig = (function() { + + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; + + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && Object.hasOwnProperty.call(message, "auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i], long + 1); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.AuditConfig: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (!$util.isObject(object.auditLogConfigs[i])) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options, q + 1); + } + return object; + }; + + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; + + return AuditConfig; + })(); + + v1.AuditLogConfig = (function() { + + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ + + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; + + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && Object.hasOwnProperty.call(message, "exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.AuditLogConfig: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + default: + if (typeof object.logType === "number") { + message.logType = object.logType; + break; + } + break; + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; + + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; + + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); + + return AuditLogConfig; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ + + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.bindingDeltas != null && Object.hasOwnProperty.call(message, "bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i], long + 1); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && Object.hasOwnProperty.call(message, "auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i], long + 1); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.PolicyDelta: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (!$util.isObject(object.bindingDeltas[i])) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i], long + 1); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (!$util.isObject(object.auditConfigDeltas[i])) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options, q + 1); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options, q + 1); + } + return object; + }; + + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; + + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; + + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) { + var error = $root.google.type.Expr.verify(message.condition, long + 1); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.BindingDelta: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (!$util.isObject(object.condition)) + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + object.role = message.role; + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + object.member = message.member; + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options, q + 1); + return object; + }; + + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; + })(); + + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; + + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.AuditConfigDelta: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + object.service = message.service; + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + object.logType = message.logType; + return object; + }; + + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; + })(); + + return v1; + })(); + + return iam; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Expr = (function() { + + /** + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location + */ + + /** + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr + * @constructor + * @param {google.type.IExpr=} [properties] Properties to set + */ + function Expr(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.expression = ""; + + /** + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.title = ""; + + /** + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. + * @function create + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance + */ + Expr.create = function create(properties) { + return new Expr(properties); + }; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encode + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + return writer; + }; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @function decode + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expr message. + * @function verify + * @memberof google.type.Expr + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expr.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Expr + * @static + * @param {Object.} object Plain object + * @returns {google.type.Expr} Expr + */ + Expr.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.type.Expr) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.type.Expr: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Expr + * @static + * @param {google.type.Expr} message Expr + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expr.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + object.expression = message.expression; + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + object.title = message.title; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + object.location = message.location; + return object; + }; + + /** + * Converts this Expr to JSON. + * @function toJSON + * @memberof google.type.Expr + * @instance + * @returns {Object.} JSON object + */ + Expr.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + + return Expr; + })(); + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.type.Date) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.type.Date: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + object.year = message.year; + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + object.month = message.month; + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + return type; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata, long + 1); + if (error) + return "metadata." + error; + } + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error, long + 1); + if (error) + return "error." + error; + } + } + if (message.response != null && Object.hasOwnProperty.call(message, "response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response, long + 1); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.longrunning.Operation) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.Operation: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (!$util.isObject(object.metadata)) + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata, long + 1); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (!$util.isObject(object.error)) + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); + } + if (object.response != null) { + if (!$util.isObject(object.response)) + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options, q + 1); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + object.done = message.done; + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && Object.hasOwnProperty.call(message, "response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options, q + 1); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.GetOperationRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.ListOperationsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + object.filter = message.filter; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i], long + 1); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.ListOperationsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (!$util.isObject(object.operations[i])) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options, q + 1); + } + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.CancelOperationRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.DeleteOperationRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout, long + 1); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.WaitOperationRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (!$util.isObject(object.timeout)) + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options, q + 1); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.OperationInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && Object.hasOwnProperty.call(message, "details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i], long + 1); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.Status) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.Status: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (!$util.isObject(object.details[i])) + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + object.code = message.code; + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + rpc.ErrorInfo = (function() { + + /** + * Properties of an ErrorInfo. + * @memberof google.rpc + * @interface IErrorInfo + * @property {string|null} [reason] ErrorInfo reason + * @property {string|null} [domain] ErrorInfo domain + * @property {Object.|null} [metadata] ErrorInfo metadata + */ + + /** + * Constructs a new ErrorInfo. + * @memberof google.rpc + * @classdesc Represents an ErrorInfo. + * @implements IErrorInfo + * @constructor + * @param {google.rpc.IErrorInfo=} [properties] Properties to set + */ + function ErrorInfo(properties) { + this.metadata = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorInfo reason. + * @member {string} reason + * @memberof google.rpc.ErrorInfo + * @instance + */ + ErrorInfo.prototype.reason = ""; + + /** + * ErrorInfo domain. + * @member {string} domain + * @memberof google.rpc.ErrorInfo + * @instance + */ + ErrorInfo.prototype.domain = ""; + + /** + * ErrorInfo metadata. + * @member {Object.} metadata + * @memberof google.rpc.ErrorInfo + * @instance + */ + ErrorInfo.prototype.metadata = $util.emptyObject; + + /** + * Creates a new ErrorInfo instance using the specified properties. + * @function create + * @memberof google.rpc.ErrorInfo + * @static + * @param {google.rpc.IErrorInfo=} [properties] Properties to set + * @returns {google.rpc.ErrorInfo} ErrorInfo instance + */ + ErrorInfo.create = function create(properties) { + return new ErrorInfo(properties); + }; + + /** + * Encodes the specified ErrorInfo message. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.ErrorInfo + * @static + * @param {google.rpc.IErrorInfo} message ErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reason); + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.domain); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.ErrorInfo + * @static + * @param {google.rpc.IErrorInfo} message ErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.ErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.ErrorInfo} ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.ErrorInfo(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.reason = reader.string(); + break; + } + case 2: { + message.domain = reader.string(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.metadata, key); + message.metadata[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.ErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.ErrorInfo} ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorInfo message. + * @function verify + * @memberof google.rpc.ErrorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + if (!$util.isString(message.domain)) + return "domain: string expected"; + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an ErrorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.ErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.ErrorInfo} ErrorInfo + */ + ErrorInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.ErrorInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.ErrorInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.ErrorInfo(); + if (object.reason != null) + message.reason = String(object.reason); + if (object.domain != null) + message.domain = String(object.domain); + if (object.metadata) { + if (!$util.isObject(object.metadata)) + throw TypeError(".google.rpc.ErrorInfo.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.metadata, keys[i]); + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.ErrorInfo + * @static + * @param {google.rpc.ErrorInfo} message ErrorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.reason = ""; + object.domain = ""; + } + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + object.reason = message.reason; + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + object.domain = message.domain; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.metadata, keys2[j]); + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + } + return object; + }; + + /** + * Converts this ErrorInfo to JSON. + * @function toJSON + * @memberof google.rpc.ErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorInfo + * @function getTypeUrl + * @memberof google.rpc.ErrorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.ErrorInfo"; + }; + + return ErrorInfo; + })(); + + rpc.RetryInfo = (function() { + + /** + * Properties of a RetryInfo. + * @memberof google.rpc + * @interface IRetryInfo + * @property {google.protobuf.IDuration|null} [retryDelay] RetryInfo retryDelay + */ + + /** + * Constructs a new RetryInfo. + * @memberof google.rpc + * @classdesc Represents a RetryInfo. + * @implements IRetryInfo + * @constructor + * @param {google.rpc.IRetryInfo=} [properties] Properties to set + */ + function RetryInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetryInfo retryDelay. + * @member {google.protobuf.IDuration|null|undefined} retryDelay + * @memberof google.rpc.RetryInfo + * @instance + */ + RetryInfo.prototype.retryDelay = null; + + /** + * Creates a new RetryInfo instance using the specified properties. + * @function create + * @memberof google.rpc.RetryInfo + * @static + * @param {google.rpc.IRetryInfo=} [properties] Properties to set + * @returns {google.rpc.RetryInfo} RetryInfo instance + */ + RetryInfo.create = function create(properties) { + return new RetryInfo(properties); + }; + + /** + * Encodes the specified RetryInfo message. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.RetryInfo + * @static + * @param {google.rpc.IRetryInfo} message RetryInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.retryDelay != null && Object.hasOwnProperty.call(message, "retryDelay")) + $root.google.protobuf.Duration.encode(message.retryDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified RetryInfo message, length delimited. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.RetryInfo + * @static + * @param {google.rpc.IRetryInfo} message RetryInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RetryInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.RetryInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.RetryInfo} RetryInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.RetryInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.retryDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RetryInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.RetryInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.RetryInfo} RetryInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetryInfo message. + * @function verify + * @memberof google.rpc.RetryInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetryInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.retryDelay != null && Object.hasOwnProperty.call(message, "retryDelay")) { + var error = $root.google.protobuf.Duration.verify(message.retryDelay, long + 1); + if (error) + return "retryDelay." + error; + } + return null; + }; + + /** + * Creates a RetryInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.RetryInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.RetryInfo} RetryInfo + */ + RetryInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.RetryInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.RetryInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.RetryInfo(); + if (object.retryDelay != null) { + if (!$util.isObject(object.retryDelay)) + throw TypeError(".google.rpc.RetryInfo.retryDelay: object expected"); + message.retryDelay = $root.google.protobuf.Duration.fromObject(object.retryDelay, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RetryInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.RetryInfo + * @static + * @param {google.rpc.RetryInfo} message RetryInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetryInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.retryDelay = null; + if (message.retryDelay != null && Object.hasOwnProperty.call(message, "retryDelay")) + object.retryDelay = $root.google.protobuf.Duration.toObject(message.retryDelay, options, q + 1); + return object; + }; + + /** + * Converts this RetryInfo to JSON. + * @function toJSON + * @memberof google.rpc.RetryInfo + * @instance + * @returns {Object.} JSON object + */ + RetryInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetryInfo + * @function getTypeUrl + * @memberof google.rpc.RetryInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetryInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.RetryInfo"; + }; + + return RetryInfo; + })(); + + rpc.DebugInfo = (function() { + + /** + * Properties of a DebugInfo. + * @memberof google.rpc + * @interface IDebugInfo + * @property {Array.|null} [stackEntries] DebugInfo stackEntries + * @property {string|null} [detail] DebugInfo detail + */ + + /** + * Constructs a new DebugInfo. + * @memberof google.rpc + * @classdesc Represents a DebugInfo. + * @implements IDebugInfo + * @constructor + * @param {google.rpc.IDebugInfo=} [properties] Properties to set + */ + function DebugInfo(properties) { + this.stackEntries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DebugInfo stackEntries. + * @member {Array.} stackEntries + * @memberof google.rpc.DebugInfo + * @instance + */ + DebugInfo.prototype.stackEntries = $util.emptyArray; + + /** + * DebugInfo detail. + * @member {string} detail + * @memberof google.rpc.DebugInfo + * @instance + */ + DebugInfo.prototype.detail = ""; + + /** + * Creates a new DebugInfo instance using the specified properties. + * @function create + * @memberof google.rpc.DebugInfo + * @static + * @param {google.rpc.IDebugInfo=} [properties] Properties to set + * @returns {google.rpc.DebugInfo} DebugInfo instance + */ + DebugInfo.create = function create(properties) { + return new DebugInfo(properties); + }; + + /** + * Encodes the specified DebugInfo message. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.DebugInfo + * @static + * @param {google.rpc.IDebugInfo} message DebugInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DebugInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.stackEntries != null && message.stackEntries.length) + for (var i = 0; i < message.stackEntries.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stackEntries[i]); + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.detail); + return writer; + }; + + /** + * Encodes the specified DebugInfo message, length delimited. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.DebugInfo + * @static + * @param {google.rpc.IDebugInfo} message DebugInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DebugInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a DebugInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.DebugInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.DebugInfo} DebugInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DebugInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.DebugInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.stackEntries && message.stackEntries.length)) + message.stackEntries = []; + message.stackEntries.push(reader.string()); + break; + } + case 2: { + message.detail = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DebugInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.DebugInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.DebugInfo} DebugInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DebugInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DebugInfo message. + * @function verify + * @memberof google.rpc.DebugInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DebugInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.stackEntries != null && Object.hasOwnProperty.call(message, "stackEntries")) { + if (!Array.isArray(message.stackEntries)) + return "stackEntries: array expected"; + for (var i = 0; i < message.stackEntries.length; ++i) + if (!$util.isString(message.stackEntries[i])) + return "stackEntries: string[] expected"; + } + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + if (!$util.isString(message.detail)) + return "detail: string expected"; + return null; + }; + + /** + * Creates a DebugInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.DebugInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.DebugInfo} DebugInfo + */ + DebugInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.DebugInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.DebugInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.DebugInfo(); + if (object.stackEntries) { + if (!Array.isArray(object.stackEntries)) + throw TypeError(".google.rpc.DebugInfo.stackEntries: array expected"); + message.stackEntries = []; + for (var i = 0; i < object.stackEntries.length; ++i) + message.stackEntries[i] = String(object.stackEntries[i]); + } + if (object.detail != null) + message.detail = String(object.detail); + return message; + }; + + /** + * Creates a plain object from a DebugInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.DebugInfo + * @static + * @param {google.rpc.DebugInfo} message DebugInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DebugInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.stackEntries = []; + if (options.defaults) + object.detail = ""; + if (message.stackEntries && message.stackEntries.length) { + object.stackEntries = []; + for (var j = 0; j < message.stackEntries.length; ++j) + object.stackEntries[j] = message.stackEntries[j]; + } + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + object.detail = message.detail; + return object; + }; + + /** + * Converts this DebugInfo to JSON. + * @function toJSON + * @memberof google.rpc.DebugInfo + * @instance + * @returns {Object.} JSON object + */ + DebugInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DebugInfo + * @function getTypeUrl + * @memberof google.rpc.DebugInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DebugInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.DebugInfo"; + }; + + return DebugInfo; + })(); + + rpc.QuotaFailure = (function() { + + /** + * Properties of a QuotaFailure. + * @memberof google.rpc + * @interface IQuotaFailure + * @property {Array.|null} [violations] QuotaFailure violations + */ + + /** + * Constructs a new QuotaFailure. + * @memberof google.rpc + * @classdesc Represents a QuotaFailure. + * @implements IQuotaFailure + * @constructor + * @param {google.rpc.IQuotaFailure=} [properties] Properties to set + */ + function QuotaFailure(properties) { + this.violations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuotaFailure violations. + * @member {Array.} violations + * @memberof google.rpc.QuotaFailure + * @instance + */ + QuotaFailure.prototype.violations = $util.emptyArray; + + /** + * Creates a new QuotaFailure instance using the specified properties. + * @function create + * @memberof google.rpc.QuotaFailure + * @static + * @param {google.rpc.IQuotaFailure=} [properties] Properties to set + * @returns {google.rpc.QuotaFailure} QuotaFailure instance + */ + QuotaFailure.create = function create(properties) { + return new QuotaFailure(properties); + }; + + /** + * Encodes the specified QuotaFailure message. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. + * @function encode + * @memberof google.rpc.QuotaFailure + * @static + * @param {google.rpc.IQuotaFailure} message QuotaFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaFailure.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.violations != null && message.violations.length) + for (var i = 0; i < message.violations.length; ++i) + $root.google.rpc.QuotaFailure.Violation.encode(message.violations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuotaFailure message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.QuotaFailure + * @static + * @param {google.rpc.IQuotaFailure} message QuotaFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaFailure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a QuotaFailure message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.QuotaFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.QuotaFailure} QuotaFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaFailure.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.QuotaFailure(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.violations && message.violations.length)) + message.violations = []; + message.violations.push($root.google.rpc.QuotaFailure.Violation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaFailure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.QuotaFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.QuotaFailure} QuotaFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaFailure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaFailure message. + * @function verify + * @memberof google.rpc.QuotaFailure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaFailure.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.violations != null && Object.hasOwnProperty.call(message, "violations")) { + if (!Array.isArray(message.violations)) + return "violations: array expected"; + for (var i = 0; i < message.violations.length; ++i) { + var error = $root.google.rpc.QuotaFailure.Violation.verify(message.violations[i], long + 1); + if (error) + return "violations." + error; + } + } + return null; + }; + + /** + * Creates a QuotaFailure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.QuotaFailure + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.QuotaFailure} QuotaFailure + */ + QuotaFailure.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.QuotaFailure) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.QuotaFailure: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.QuotaFailure(); + if (object.violations) { + if (!Array.isArray(object.violations)) + throw TypeError(".google.rpc.QuotaFailure.violations: array expected"); + message.violations = []; + for (var i = 0; i < object.violations.length; ++i) { + if (!$util.isObject(object.violations[i])) + throw TypeError(".google.rpc.QuotaFailure.violations: object expected"); + message.violations[i] = $root.google.rpc.QuotaFailure.Violation.fromObject(object.violations[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a QuotaFailure message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.QuotaFailure + * @static + * @param {google.rpc.QuotaFailure} message QuotaFailure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaFailure.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.violations = []; + if (message.violations && message.violations.length) { + object.violations = []; + for (var j = 0; j < message.violations.length; ++j) + object.violations[j] = $root.google.rpc.QuotaFailure.Violation.toObject(message.violations[j], options, q + 1); + } + return object; + }; + + /** + * Converts this QuotaFailure to JSON. + * @function toJSON + * @memberof google.rpc.QuotaFailure + * @instance + * @returns {Object.} JSON object + */ + QuotaFailure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuotaFailure + * @function getTypeUrl + * @memberof google.rpc.QuotaFailure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuotaFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.QuotaFailure"; + }; + + QuotaFailure.Violation = (function() { + + /** + * Properties of a Violation. + * @memberof google.rpc.QuotaFailure + * @interface IViolation + * @property {string|null} [subject] Violation subject + * @property {string|null} [description] Violation description + * @property {string|null} [apiService] Violation apiService + * @property {string|null} [quotaMetric] Violation quotaMetric + * @property {string|null} [quotaId] Violation quotaId + * @property {Object.|null} [quotaDimensions] Violation quotaDimensions + * @property {number|Long|null} [quotaValue] Violation quotaValue + * @property {number|Long|null} [futureQuotaValue] Violation futureQuotaValue + */ + + /** + * Constructs a new Violation. + * @memberof google.rpc.QuotaFailure + * @classdesc Represents a Violation. + * @implements IViolation + * @constructor + * @param {google.rpc.QuotaFailure.IViolation=} [properties] Properties to set + */ + function Violation(properties) { + this.quotaDimensions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Violation subject. + * @member {string} subject + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.subject = ""; + + /** + * Violation description. + * @member {string} description + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.description = ""; + + /** + * Violation apiService. + * @member {string} apiService + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.apiService = ""; + + /** + * Violation quotaMetric. + * @member {string} quotaMetric + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.quotaMetric = ""; + + /** + * Violation quotaId. + * @member {string} quotaId + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.quotaId = ""; + + /** + * Violation quotaDimensions. + * @member {Object.} quotaDimensions + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.quotaDimensions = $util.emptyObject; + + /** + * Violation quotaValue. + * @member {number|Long} quotaValue + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.quotaValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Violation futureQuotaValue. + * @member {number|Long|null|undefined} futureQuotaValue + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.futureQuotaValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Violation.prototype, "_futureQuotaValue", { + get: $util.oneOfGetter($oneOfFields = ["futureQuotaValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Violation instance using the specified properties. + * @function create + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {google.rpc.QuotaFailure.IViolation=} [properties] Properties to set + * @returns {google.rpc.QuotaFailure.Violation} Violation instance + */ + Violation.create = function create(properties) { + return new Violation(properties); + }; + + /** + * Encodes the specified Violation message. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. + * @function encode + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {google.rpc.QuotaFailure.IViolation} message Violation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Violation.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subject); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.apiService != null && Object.hasOwnProperty.call(message, "apiService")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.apiService); + if (message.quotaMetric != null && Object.hasOwnProperty.call(message, "quotaMetric")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.quotaMetric); + if (message.quotaId != null && Object.hasOwnProperty.call(message, "quotaId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.quotaId); + if (message.quotaDimensions != null && Object.hasOwnProperty.call(message, "quotaDimensions")) + for (var keys = Object.keys(message.quotaDimensions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.quotaDimensions[keys[i]]).ldelim(); + if (message.quotaValue != null && Object.hasOwnProperty.call(message, "quotaValue")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.quotaValue); + if (message.futureQuotaValue != null && Object.hasOwnProperty.call(message, "futureQuotaValue")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.futureQuotaValue); + return writer; + }; + + /** + * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {google.rpc.QuotaFailure.IViolation} message Violation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Violation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Violation message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.QuotaFailure.Violation} Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Violation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.QuotaFailure.Violation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.subject = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.apiService = reader.string(); + break; + } + case 4: { + message.quotaMetric = reader.string(); + break; + } + case 5: { + message.quotaId = reader.string(); + break; + } + case 6: { + if (message.quotaDimensions === $util.emptyObject) + message.quotaDimensions = {}; + 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, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.quotaDimensions, key); + message.quotaDimensions[key] = value; + break; + } + case 7: { + message.quotaValue = reader.int64(); + break; + } + case 8: { + message.futureQuotaValue = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Violation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.QuotaFailure.Violation} Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Violation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Violation message. + * @function verify + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Violation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.apiService != null && Object.hasOwnProperty.call(message, "apiService")) + if (!$util.isString(message.apiService)) + return "apiService: string expected"; + if (message.quotaMetric != null && Object.hasOwnProperty.call(message, "quotaMetric")) + if (!$util.isString(message.quotaMetric)) + return "quotaMetric: string expected"; + if (message.quotaId != null && Object.hasOwnProperty.call(message, "quotaId")) + if (!$util.isString(message.quotaId)) + return "quotaId: string expected"; + if (message.quotaDimensions != null && Object.hasOwnProperty.call(message, "quotaDimensions")) { + if (!$util.isObject(message.quotaDimensions)) + return "quotaDimensions: object expected"; + var key = Object.keys(message.quotaDimensions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.quotaDimensions[key[i]])) + return "quotaDimensions: string{k:string} expected"; + } + if (message.quotaValue != null && Object.hasOwnProperty.call(message, "quotaValue")) + if (!$util.isInteger(message.quotaValue) && !(message.quotaValue && $util.isInteger(message.quotaValue.low) && $util.isInteger(message.quotaValue.high))) + return "quotaValue: integer|Long expected"; + if (message.futureQuotaValue != null && Object.hasOwnProperty.call(message, "futureQuotaValue")) { + properties._futureQuotaValue = 1; + if (!$util.isInteger(message.futureQuotaValue) && !(message.futureQuotaValue && $util.isInteger(message.futureQuotaValue.low) && $util.isInteger(message.futureQuotaValue.high))) + return "futureQuotaValue: integer|Long expected"; + } + return null; + }; + + /** + * Creates a Violation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.QuotaFailure.Violation} Violation + */ + Violation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.QuotaFailure.Violation) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.QuotaFailure.Violation: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.QuotaFailure.Violation(); + if (object.subject != null) + message.subject = String(object.subject); + if (object.description != null) + message.description = String(object.description); + if (object.apiService != null) + message.apiService = String(object.apiService); + if (object.quotaMetric != null) + message.quotaMetric = String(object.quotaMetric); + if (object.quotaId != null) + message.quotaId = String(object.quotaId); + if (object.quotaDimensions) { + if (!$util.isObject(object.quotaDimensions)) + throw TypeError(".google.rpc.QuotaFailure.Violation.quotaDimensions: object expected"); + message.quotaDimensions = {}; + for (var keys = Object.keys(object.quotaDimensions), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.quotaDimensions, keys[i]); + message.quotaDimensions[keys[i]] = String(object.quotaDimensions[keys[i]]); + } + } + if (object.quotaValue != null) + if ($util.Long) + message.quotaValue = $util.Long.fromValue(object.quotaValue, false); + else if (typeof object.quotaValue === "string") + message.quotaValue = parseInt(object.quotaValue, 10); + else if (typeof object.quotaValue === "number") + message.quotaValue = object.quotaValue; + else if (typeof object.quotaValue === "object") + message.quotaValue = new $util.LongBits(object.quotaValue.low >>> 0, object.quotaValue.high >>> 0).toNumber(); + if (object.futureQuotaValue != null) + if ($util.Long) + message.futureQuotaValue = $util.Long.fromValue(object.futureQuotaValue, false); + else if (typeof object.futureQuotaValue === "string") + message.futureQuotaValue = parseInt(object.futureQuotaValue, 10); + else if (typeof object.futureQuotaValue === "number") + message.futureQuotaValue = object.futureQuotaValue; + else if (typeof object.futureQuotaValue === "object") + message.futureQuotaValue = new $util.LongBits(object.futureQuotaValue.low >>> 0, object.futureQuotaValue.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Violation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {google.rpc.QuotaFailure.Violation} message Violation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Violation.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.objects || options.defaults) + object.quotaDimensions = {}; + if (options.defaults) { + object.subject = ""; + object.description = ""; + object.apiService = ""; + object.quotaMetric = ""; + object.quotaId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.quotaValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.quotaValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + } + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + object.subject = message.subject; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.apiService != null && Object.hasOwnProperty.call(message, "apiService")) + object.apiService = message.apiService; + if (message.quotaMetric != null && Object.hasOwnProperty.call(message, "quotaMetric")) + object.quotaMetric = message.quotaMetric; + if (message.quotaId != null && Object.hasOwnProperty.call(message, "quotaId")) + object.quotaId = message.quotaId; + var keys2; + if (message.quotaDimensions && (keys2 = Object.keys(message.quotaDimensions)).length) { + object.quotaDimensions = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.quotaDimensions, keys2[j]); + object.quotaDimensions[keys2[j]] = message.quotaDimensions[keys2[j]]; + } + } + if (message.quotaValue != null && Object.hasOwnProperty.call(message, "quotaValue")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.quotaValue = typeof message.quotaValue === "number" ? BigInt(message.quotaValue) : $util.Long.fromBits(message.quotaValue.low >>> 0, message.quotaValue.high >>> 0, false).toBigInt(); + else if (typeof message.quotaValue === "number") + object.quotaValue = options.longs === String ? String(message.quotaValue) : message.quotaValue; + else + object.quotaValue = options.longs === String ? $util.Long.prototype.toString.call(message.quotaValue) : options.longs === Number ? new $util.LongBits(message.quotaValue.low >>> 0, message.quotaValue.high >>> 0).toNumber() : message.quotaValue; + if (message.futureQuotaValue != null && Object.hasOwnProperty.call(message, "futureQuotaValue")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.futureQuotaValue = typeof message.futureQuotaValue === "number" ? BigInt(message.futureQuotaValue) : $util.Long.fromBits(message.futureQuotaValue.low >>> 0, message.futureQuotaValue.high >>> 0, false).toBigInt(); + else if (typeof message.futureQuotaValue === "number") + object.futureQuotaValue = options.longs === String ? String(message.futureQuotaValue) : message.futureQuotaValue; + else + object.futureQuotaValue = options.longs === String ? $util.Long.prototype.toString.call(message.futureQuotaValue) : options.longs === Number ? new $util.LongBits(message.futureQuotaValue.low >>> 0, message.futureQuotaValue.high >>> 0).toNumber() : message.futureQuotaValue; + if (options.oneofs) + object._futureQuotaValue = "futureQuotaValue"; + } + return object; + }; + + /** + * Converts this Violation to JSON. + * @function toJSON + * @memberof google.rpc.QuotaFailure.Violation + * @instance + * @returns {Object.} JSON object + */ + Violation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Violation + * @function getTypeUrl + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Violation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.QuotaFailure.Violation"; + }; + + return Violation; + })(); + + return QuotaFailure; + })(); + + rpc.PreconditionFailure = (function() { + + /** + * Properties of a PreconditionFailure. + * @memberof google.rpc + * @interface IPreconditionFailure + * @property {Array.|null} [violations] PreconditionFailure violations + */ + + /** + * Constructs a new PreconditionFailure. + * @memberof google.rpc + * @classdesc Represents a PreconditionFailure. + * @implements IPreconditionFailure + * @constructor + * @param {google.rpc.IPreconditionFailure=} [properties] Properties to set + */ + function PreconditionFailure(properties) { + this.violations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreconditionFailure violations. + * @member {Array.} violations + * @memberof google.rpc.PreconditionFailure + * @instance + */ + PreconditionFailure.prototype.violations = $util.emptyArray; + + /** + * Creates a new PreconditionFailure instance using the specified properties. + * @function create + * @memberof google.rpc.PreconditionFailure + * @static + * @param {google.rpc.IPreconditionFailure=} [properties] Properties to set + * @returns {google.rpc.PreconditionFailure} PreconditionFailure instance + */ + PreconditionFailure.create = function create(properties) { + return new PreconditionFailure(properties); + }; + + /** + * Encodes the specified PreconditionFailure message. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. + * @function encode + * @memberof google.rpc.PreconditionFailure + * @static + * @param {google.rpc.IPreconditionFailure} message PreconditionFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreconditionFailure.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.violations != null && message.violations.length) + for (var i = 0; i < message.violations.length; ++i) + $root.google.rpc.PreconditionFailure.Violation.encode(message.violations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified PreconditionFailure message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.PreconditionFailure + * @static + * @param {google.rpc.IPreconditionFailure} message PreconditionFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreconditionFailure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a PreconditionFailure message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.PreconditionFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.PreconditionFailure} PreconditionFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreconditionFailure.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.PreconditionFailure(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.violations && message.violations.length)) + message.violations = []; + message.violations.push($root.google.rpc.PreconditionFailure.Violation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PreconditionFailure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.PreconditionFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.PreconditionFailure} PreconditionFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreconditionFailure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreconditionFailure message. + * @function verify + * @memberof google.rpc.PreconditionFailure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreconditionFailure.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.violations != null && Object.hasOwnProperty.call(message, "violations")) { + if (!Array.isArray(message.violations)) + return "violations: array expected"; + for (var i = 0; i < message.violations.length; ++i) { + var error = $root.google.rpc.PreconditionFailure.Violation.verify(message.violations[i], long + 1); + if (error) + return "violations." + error; + } + } + return null; + }; + + /** + * Creates a PreconditionFailure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.PreconditionFailure + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.PreconditionFailure} PreconditionFailure + */ + PreconditionFailure.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.PreconditionFailure) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.PreconditionFailure: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.PreconditionFailure(); + if (object.violations) { + if (!Array.isArray(object.violations)) + throw TypeError(".google.rpc.PreconditionFailure.violations: array expected"); + message.violations = []; + for (var i = 0; i < object.violations.length; ++i) { + if (!$util.isObject(object.violations[i])) + throw TypeError(".google.rpc.PreconditionFailure.violations: object expected"); + message.violations[i] = $root.google.rpc.PreconditionFailure.Violation.fromObject(object.violations[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a PreconditionFailure message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.PreconditionFailure + * @static + * @param {google.rpc.PreconditionFailure} message PreconditionFailure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreconditionFailure.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.violations = []; + if (message.violations && message.violations.length) { + object.violations = []; + for (var j = 0; j < message.violations.length; ++j) + object.violations[j] = $root.google.rpc.PreconditionFailure.Violation.toObject(message.violations[j], options, q + 1); + } + return object; + }; + + /** + * Converts this PreconditionFailure to JSON. + * @function toJSON + * @memberof google.rpc.PreconditionFailure + * @instance + * @returns {Object.} JSON object + */ + PreconditionFailure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreconditionFailure + * @function getTypeUrl + * @memberof google.rpc.PreconditionFailure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreconditionFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.PreconditionFailure"; + }; + + PreconditionFailure.Violation = (function() { + + /** + * Properties of a Violation. + * @memberof google.rpc.PreconditionFailure + * @interface IViolation + * @property {string|null} [type] Violation type + * @property {string|null} [subject] Violation subject + * @property {string|null} [description] Violation description + */ + + /** + * Constructs a new Violation. + * @memberof google.rpc.PreconditionFailure + * @classdesc Represents a Violation. + * @implements IViolation + * @constructor + * @param {google.rpc.PreconditionFailure.IViolation=} [properties] Properties to set + */ + function Violation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Violation type. + * @member {string} type + * @memberof google.rpc.PreconditionFailure.Violation + * @instance + */ + Violation.prototype.type = ""; + + /** + * Violation subject. + * @member {string} subject + * @memberof google.rpc.PreconditionFailure.Violation + * @instance + */ + Violation.prototype.subject = ""; + + /** + * Violation description. + * @member {string} description + * @memberof google.rpc.PreconditionFailure.Violation + * @instance + */ + Violation.prototype.description = ""; + + /** + * Creates a new Violation instance using the specified properties. + * @function create + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {google.rpc.PreconditionFailure.IViolation=} [properties] Properties to set + * @returns {google.rpc.PreconditionFailure.Violation} Violation instance + */ + Violation.create = function create(properties) { + return new Violation(properties); + }; + + /** + * Encodes the specified Violation message. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. + * @function encode + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {google.rpc.PreconditionFailure.IViolation} message Violation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Violation.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {google.rpc.PreconditionFailure.IViolation} message Violation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Violation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Violation message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.PreconditionFailure.Violation} Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Violation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.PreconditionFailure.Violation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.subject = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Violation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.PreconditionFailure.Violation} Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Violation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Violation message. + * @function verify + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Violation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a Violation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.PreconditionFailure.Violation} Violation + */ + Violation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.PreconditionFailure.Violation) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.PreconditionFailure.Violation: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.PreconditionFailure.Violation(); + if (object.type != null) + message.type = String(object.type); + if (object.subject != null) + message.subject = String(object.subject); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a Violation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {google.rpc.PreconditionFailure.Violation} message Violation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Violation.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.type = ""; + object.subject = ""; + object.description = ""; + } + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = message.type; + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + object.subject = message.subject; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + return object; + }; + + /** + * Converts this Violation to JSON. + * @function toJSON + * @memberof google.rpc.PreconditionFailure.Violation + * @instance + * @returns {Object.} JSON object + */ + Violation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Violation + * @function getTypeUrl + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Violation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.PreconditionFailure.Violation"; + }; + + return Violation; + })(); + + return PreconditionFailure; + })(); + + rpc.BadRequest = (function() { + + /** + * Properties of a BadRequest. + * @memberof google.rpc + * @interface IBadRequest + * @property {Array.|null} [fieldViolations] BadRequest fieldViolations + */ + + /** + * Constructs a new BadRequest. + * @memberof google.rpc + * @classdesc Represents a BadRequest. + * @implements IBadRequest + * @constructor + * @param {google.rpc.IBadRequest=} [properties] Properties to set + */ + function BadRequest(properties) { + this.fieldViolations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BadRequest fieldViolations. + * @member {Array.} fieldViolations + * @memberof google.rpc.BadRequest + * @instance + */ + BadRequest.prototype.fieldViolations = $util.emptyArray; + + /** + * Creates a new BadRequest instance using the specified properties. + * @function create + * @memberof google.rpc.BadRequest + * @static + * @param {google.rpc.IBadRequest=} [properties] Properties to set + * @returns {google.rpc.BadRequest} BadRequest instance + */ + BadRequest.create = function create(properties) { + return new BadRequest(properties); + }; + + /** + * Encodes the specified BadRequest message. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. + * @function encode + * @memberof google.rpc.BadRequest + * @static + * @param {google.rpc.IBadRequest} message BadRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BadRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.fieldViolations != null && message.fieldViolations.length) + for (var i = 0; i < message.fieldViolations.length; ++i) + $root.google.rpc.BadRequest.FieldViolation.encode(message.fieldViolations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified BadRequest message, length delimited. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.BadRequest + * @static + * @param {google.rpc.IBadRequest} message BadRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BadRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a BadRequest message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.BadRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.BadRequest} BadRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BadRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.BadRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fieldViolations && message.fieldViolations.length)) + message.fieldViolations = []; + message.fieldViolations.push($root.google.rpc.BadRequest.FieldViolation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BadRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.BadRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.BadRequest} BadRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BadRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BadRequest message. + * @function verify + * @memberof google.rpc.BadRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BadRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fieldViolations != null && Object.hasOwnProperty.call(message, "fieldViolations")) { + if (!Array.isArray(message.fieldViolations)) + return "fieldViolations: array expected"; + for (var i = 0; i < message.fieldViolations.length; ++i) { + var error = $root.google.rpc.BadRequest.FieldViolation.verify(message.fieldViolations[i], long + 1); + if (error) + return "fieldViolations." + error; + } + } + return null; + }; + + /** + * Creates a BadRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.BadRequest + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.BadRequest} BadRequest + */ + BadRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.BadRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.BadRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.BadRequest(); + if (object.fieldViolations) { + if (!Array.isArray(object.fieldViolations)) + throw TypeError(".google.rpc.BadRequest.fieldViolations: array expected"); + message.fieldViolations = []; + for (var i = 0; i < object.fieldViolations.length; ++i) { + if (!$util.isObject(object.fieldViolations[i])) + throw TypeError(".google.rpc.BadRequest.fieldViolations: object expected"); + message.fieldViolations[i] = $root.google.rpc.BadRequest.FieldViolation.fromObject(object.fieldViolations[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a BadRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.BadRequest + * @static + * @param {google.rpc.BadRequest} message BadRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BadRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.fieldViolations = []; + if (message.fieldViolations && message.fieldViolations.length) { + object.fieldViolations = []; + for (var j = 0; j < message.fieldViolations.length; ++j) + object.fieldViolations[j] = $root.google.rpc.BadRequest.FieldViolation.toObject(message.fieldViolations[j], options, q + 1); + } + return object; + }; + + /** + * Converts this BadRequest to JSON. + * @function toJSON + * @memberof google.rpc.BadRequest + * @instance + * @returns {Object.} JSON object + */ + BadRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BadRequest + * @function getTypeUrl + * @memberof google.rpc.BadRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BadRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.BadRequest"; + }; + + BadRequest.FieldViolation = (function() { + + /** + * Properties of a FieldViolation. + * @memberof google.rpc.BadRequest + * @interface IFieldViolation + * @property {string|null} [field] FieldViolation field + * @property {string|null} [description] FieldViolation description + * @property {string|null} [reason] FieldViolation reason + * @property {google.rpc.ILocalizedMessage|null} [localizedMessage] FieldViolation localizedMessage + */ + + /** + * Constructs a new FieldViolation. + * @memberof google.rpc.BadRequest + * @classdesc Represents a FieldViolation. + * @implements IFieldViolation + * @constructor + * @param {google.rpc.BadRequest.IFieldViolation=} [properties] Properties to set + */ + function FieldViolation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldViolation field. + * @member {string} field + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + */ + FieldViolation.prototype.field = ""; + + /** + * FieldViolation description. + * @member {string} description + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + */ + FieldViolation.prototype.description = ""; + + /** + * FieldViolation reason. + * @member {string} reason + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + */ + FieldViolation.prototype.reason = ""; + + /** + * FieldViolation localizedMessage. + * @member {google.rpc.ILocalizedMessage|null|undefined} localizedMessage + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + */ + FieldViolation.prototype.localizedMessage = null; + + /** + * Creates a new FieldViolation instance using the specified properties. + * @function create + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {google.rpc.BadRequest.IFieldViolation=} [properties] Properties to set + * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation instance + */ + FieldViolation.create = function create(properties) { + return new FieldViolation(properties); + }; + + /** + * Encodes the specified FieldViolation message. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. + * @function encode + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {google.rpc.BadRequest.IFieldViolation} message FieldViolation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldViolation.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.reason); + if (message.localizedMessage != null && Object.hasOwnProperty.call(message, "localizedMessage")) + $root.google.rpc.LocalizedMessage.encode(message.localizedMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldViolation message, length delimited. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {google.rpc.BadRequest.IFieldViolation} message FieldViolation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldViolation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a FieldViolation message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldViolation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.BadRequest.FieldViolation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.reason = reader.string(); + break; + } + case 4: { + message.localizedMessage = $root.google.rpc.LocalizedMessage.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldViolation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldViolation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldViolation message. + * @function verify + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldViolation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + if (message.localizedMessage != null && Object.hasOwnProperty.call(message, "localizedMessage")) { + var error = $root.google.rpc.LocalizedMessage.verify(message.localizedMessage, long + 1); + if (error) + return "localizedMessage." + error; + } + return null; + }; + + /** + * Creates a FieldViolation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation + */ + FieldViolation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.BadRequest.FieldViolation) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.BadRequest.FieldViolation: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.BadRequest.FieldViolation(); + if (object.field != null) + message.field = String(object.field); + if (object.description != null) + message.description = String(object.description); + if (object.reason != null) + message.reason = String(object.reason); + if (object.localizedMessage != null) { + if (!$util.isObject(object.localizedMessage)) + throw TypeError(".google.rpc.BadRequest.FieldViolation.localizedMessage: object expected"); + message.localizedMessage = $root.google.rpc.LocalizedMessage.fromObject(object.localizedMessage, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FieldViolation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {google.rpc.BadRequest.FieldViolation} message FieldViolation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldViolation.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.field = ""; + object.description = ""; + object.reason = ""; + object.localizedMessage = null; + } + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + object.field = message.field; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + object.reason = message.reason; + if (message.localizedMessage != null && Object.hasOwnProperty.call(message, "localizedMessage")) + object.localizedMessage = $root.google.rpc.LocalizedMessage.toObject(message.localizedMessage, options, q + 1); + return object; + }; + + /** + * Converts this FieldViolation to JSON. + * @function toJSON + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + * @returns {Object.} JSON object + */ + FieldViolation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldViolation + * @function getTypeUrl + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldViolation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.BadRequest.FieldViolation"; + }; + + return FieldViolation; + })(); + + return BadRequest; + })(); + + rpc.RequestInfo = (function() { + + /** + * Properties of a RequestInfo. + * @memberof google.rpc + * @interface IRequestInfo + * @property {string|null} [requestId] RequestInfo requestId + * @property {string|null} [servingData] RequestInfo servingData + */ + + /** + * Constructs a new RequestInfo. + * @memberof google.rpc + * @classdesc Represents a RequestInfo. + * @implements IRequestInfo + * @constructor + * @param {google.rpc.IRequestInfo=} [properties] Properties to set + */ + function RequestInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInfo requestId. + * @member {string} requestId + * @memberof google.rpc.RequestInfo + * @instance + */ + RequestInfo.prototype.requestId = ""; + + /** + * RequestInfo servingData. + * @member {string} servingData + * @memberof google.rpc.RequestInfo + * @instance + */ + RequestInfo.prototype.servingData = ""; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @function create + * @memberof google.rpc.RequestInfo + * @static + * @param {google.rpc.IRequestInfo=} [properties] Properties to set + * @returns {google.rpc.RequestInfo} RequestInfo instance + */ + RequestInfo.create = function create(properties) { + return new RequestInfo(properties); + }; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.RequestInfo + * @static + * @param {google.rpc.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); + if (message.servingData != null && Object.hasOwnProperty.call(message, "servingData")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.servingData); + return writer; + }; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.RequestInfo + * @static + * @param {google.rpc.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.RequestInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestId = reader.string(); + break; + } + case 2: { + message.servingData = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInfo message. + * @function verify + * @memberof google.rpc.RequestInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.servingData != null && Object.hasOwnProperty.call(message, "servingData")) + if (!$util.isString(message.servingData)) + return "servingData: string expected"; + return null; + }; + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.RequestInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.RequestInfo} RequestInfo + */ + RequestInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.RequestInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.RequestInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.RequestInfo(); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.servingData != null) + message.servingData = String(object.servingData); + return message; + }; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.RequestInfo + * @static + * @param {google.rpc.RequestInfo} message RequestInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.requestId = ""; + object.servingData = ""; + } + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + object.requestId = message.requestId; + if (message.servingData != null && Object.hasOwnProperty.call(message, "servingData")) + object.servingData = message.servingData; + return object; + }; + + /** + * Converts this RequestInfo to JSON. + * @function toJSON + * @memberof google.rpc.RequestInfo + * @instance + * @returns {Object.} JSON object + */ + RequestInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestInfo + * @function getTypeUrl + * @memberof google.rpc.RequestInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.RequestInfo"; + }; + + return RequestInfo; + })(); + + rpc.ResourceInfo = (function() { + + /** + * Properties of a ResourceInfo. + * @memberof google.rpc + * @interface IResourceInfo + * @property {string|null} [resourceType] ResourceInfo resourceType + * @property {string|null} [resourceName] ResourceInfo resourceName + * @property {string|null} [owner] ResourceInfo owner + * @property {string|null} [description] ResourceInfo description + */ + + /** + * Constructs a new ResourceInfo. + * @memberof google.rpc + * @classdesc Represents a ResourceInfo. + * @implements IResourceInfo + * @constructor + * @param {google.rpc.IResourceInfo=} [properties] Properties to set + */ + function ResourceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceInfo resourceType. + * @member {string} resourceType + * @memberof google.rpc.ResourceInfo + * @instance + */ + ResourceInfo.prototype.resourceType = ""; + + /** + * ResourceInfo resourceName. + * @member {string} resourceName + * @memberof google.rpc.ResourceInfo + * @instance + */ + ResourceInfo.prototype.resourceName = ""; + + /** + * ResourceInfo owner. + * @member {string} owner + * @memberof google.rpc.ResourceInfo + * @instance + */ + ResourceInfo.prototype.owner = ""; + + /** + * ResourceInfo description. + * @member {string} description + * @memberof google.rpc.ResourceInfo + * @instance + */ + ResourceInfo.prototype.description = ""; + + /** + * Creates a new ResourceInfo instance using the specified properties. + * @function create + * @memberof google.rpc.ResourceInfo + * @static + * @param {google.rpc.IResourceInfo=} [properties] Properties to set + * @returns {google.rpc.ResourceInfo} ResourceInfo instance + */ + ResourceInfo.create = function create(properties) { + return new ResourceInfo(properties); + }; + + /** + * Encodes the specified ResourceInfo message. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.ResourceInfo + * @static + * @param {google.rpc.IResourceInfo} message ResourceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceName); + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.owner); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + return writer; + }; + + /** + * Encodes the specified ResourceInfo message, length delimited. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.ResourceInfo + * @static + * @param {google.rpc.IResourceInfo} message ResourceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a ResourceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.ResourceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.ResourceInfo} ResourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.ResourceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.string(); + break; + } + case 2: { + message.resourceName = reader.string(); + break; + } + case 3: { + message.owner = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.ResourceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.ResourceInfo} ResourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceInfo message. + * @function verify + * @memberof google.rpc.ResourceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a ResourceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.ResourceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.ResourceInfo} ResourceInfo + */ + ResourceInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.ResourceInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.ResourceInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.ResourceInfo(); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.owner != null) + message.owner = String(object.owner); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a ResourceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.ResourceInfo + * @static + * @param {google.rpc.ResourceInfo} message ResourceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.resourceType = ""; + object.resourceName = ""; + object.owner = ""; + object.description = ""; + } + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + object.resourceType = message.resourceType; + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + object.resourceName = message.resourceName; + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + object.owner = message.owner; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + return object; + }; + + /** + * Converts this ResourceInfo to JSON. + * @function toJSON + * @memberof google.rpc.ResourceInfo + * @instance + * @returns {Object.} JSON object + */ + ResourceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceInfo + * @function getTypeUrl + * @memberof google.rpc.ResourceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.ResourceInfo"; + }; + + return ResourceInfo; + })(); + + rpc.Help = (function() { + + /** + * Properties of a Help. + * @memberof google.rpc + * @interface IHelp + * @property {Array.|null} [links] Help links + */ + + /** + * Constructs a new Help. + * @memberof google.rpc + * @classdesc Represents a Help. + * @implements IHelp + * @constructor + * @param {google.rpc.IHelp=} [properties] Properties to set + */ + function Help(properties) { + this.links = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Help links. + * @member {Array.} links + * @memberof google.rpc.Help + * @instance + */ + Help.prototype.links = $util.emptyArray; + + /** + * Creates a new Help instance using the specified properties. + * @function create + * @memberof google.rpc.Help + * @static + * @param {google.rpc.IHelp=} [properties] Properties to set + * @returns {google.rpc.Help} Help instance + */ + Help.create = function create(properties) { + return new Help(properties); + }; + + /** + * Encodes the specified Help message. Does not implicitly {@link google.rpc.Help.verify|verify} messages. + * @function encode + * @memberof google.rpc.Help + * @static + * @param {google.rpc.IHelp} message Help message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Help.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.links != null && message.links.length) + for (var i = 0; i < message.links.length; ++i) + $root.google.rpc.Help.Link.encode(message.links[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified Help message, length delimited. Does not implicitly {@link google.rpc.Help.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Help + * @static + * @param {google.rpc.IHelp} message Help message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Help.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Help message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Help + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Help} Help + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Help.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Help(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.links && message.links.length)) + message.links = []; + message.links.push($root.google.rpc.Help.Link.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Help message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Help + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Help} Help + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Help.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Help message. + * @function verify + * @memberof google.rpc.Help + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Help.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.links != null && Object.hasOwnProperty.call(message, "links")) { + if (!Array.isArray(message.links)) + return "links: array expected"; + for (var i = 0; i < message.links.length; ++i) { + var error = $root.google.rpc.Help.Link.verify(message.links[i], long + 1); + if (error) + return "links." + error; + } + } + return null; + }; + + /** + * Creates a Help message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Help + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Help} Help + */ + Help.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.Help) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.Help: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.Help(); + if (object.links) { + if (!Array.isArray(object.links)) + throw TypeError(".google.rpc.Help.links: array expected"); + message.links = []; + for (var i = 0; i < object.links.length; ++i) { + if (!$util.isObject(object.links[i])) + throw TypeError(".google.rpc.Help.links: object expected"); + message.links[i] = $root.google.rpc.Help.Link.fromObject(object.links[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Help message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Help + * @static + * @param {google.rpc.Help} message Help + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Help.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.links = []; + if (message.links && message.links.length) { + object.links = []; + for (var j = 0; j < message.links.length; ++j) + object.links[j] = $root.google.rpc.Help.Link.toObject(message.links[j], options, q + 1); + } + return object; + }; + + /** + * Converts this Help to JSON. + * @function toJSON + * @memberof google.rpc.Help + * @instance + * @returns {Object.} JSON object + */ + Help.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Help + * @function getTypeUrl + * @memberof google.rpc.Help + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Help.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Help"; + }; + + Help.Link = (function() { + + /** + * Properties of a Link. + * @memberof google.rpc.Help + * @interface ILink + * @property {string|null} [description] Link description + * @property {string|null} [url] Link url + */ + + /** + * Constructs a new Link. + * @memberof google.rpc.Help + * @classdesc Represents a Link. + * @implements ILink + * @constructor + * @param {google.rpc.Help.ILink=} [properties] Properties to set + */ + function Link(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Link description. + * @member {string} description + * @memberof google.rpc.Help.Link + * @instance + */ + Link.prototype.description = ""; + + /** + * Link url. + * @member {string} url + * @memberof google.rpc.Help.Link + * @instance + */ + Link.prototype.url = ""; + + /** + * Creates a new Link instance using the specified properties. + * @function create + * @memberof google.rpc.Help.Link + * @static + * @param {google.rpc.Help.ILink=} [properties] Properties to set + * @returns {google.rpc.Help.Link} Link instance + */ + Link.create = function create(properties) { + return new Link(properties); + }; + + /** + * Encodes the specified Link message. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. + * @function encode + * @memberof google.rpc.Help.Link + * @static + * @param {google.rpc.Help.ILink} message Link message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Link.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + return writer; + }; + + /** + * Encodes the specified Link message, length delimited. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Help.Link + * @static + * @param {google.rpc.Help.ILink} message Link message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Link.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a Link message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Help.Link + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Help.Link} Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Link.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Help.Link(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.url = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Link message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Help.Link + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Help.Link} Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Link.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Link message. + * @function verify + * @memberof google.rpc.Help.Link + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Link.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a Link message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Help.Link + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Help.Link} Link + */ + Link.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.Help.Link) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.Help.Link: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.Help.Link(); + if (object.description != null) + message.description = String(object.description); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a Link message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Help.Link + * @static + * @param {google.rpc.Help.Link} message Link + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Link.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.description = ""; + object.url = ""; + } + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + object.url = message.url; + return object; + }; + + /** + * Converts this Link to JSON. + * @function toJSON + * @memberof google.rpc.Help.Link + * @instance + * @returns {Object.} JSON object + */ + Link.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Link + * @function getTypeUrl + * @memberof google.rpc.Help.Link + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Help.Link"; + }; + + return Link; + })(); + + return Help; + })(); + + rpc.LocalizedMessage = (function() { + + /** + * Properties of a LocalizedMessage. + * @memberof google.rpc + * @interface ILocalizedMessage + * @property {string|null} [locale] LocalizedMessage locale + * @property {string|null} [message] LocalizedMessage message + */ + + /** + * Constructs a new LocalizedMessage. + * @memberof google.rpc + * @classdesc Represents a LocalizedMessage. + * @implements ILocalizedMessage + * @constructor + * @param {google.rpc.ILocalizedMessage=} [properties] Properties to set + */ + function LocalizedMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocalizedMessage locale. + * @member {string} locale + * @memberof google.rpc.LocalizedMessage + * @instance + */ + LocalizedMessage.prototype.locale = ""; + + /** + * LocalizedMessage message. + * @member {string} message + * @memberof google.rpc.LocalizedMessage + * @instance + */ + LocalizedMessage.prototype.message = ""; + + /** + * Creates a new LocalizedMessage instance using the specified properties. + * @function create + * @memberof google.rpc.LocalizedMessage + * @static + * @param {google.rpc.ILocalizedMessage=} [properties] Properties to set + * @returns {google.rpc.LocalizedMessage} LocalizedMessage instance + */ + LocalizedMessage.create = function create(properties) { + return new LocalizedMessage(properties); + }; + + /** + * Encodes the specified LocalizedMessage message. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. + * @function encode + * @memberof google.rpc.LocalizedMessage + * @static + * @param {google.rpc.ILocalizedMessage} message LocalizedMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedMessage.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.locale); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified LocalizedMessage message, length delimited. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.LocalizedMessage + * @static + * @param {google.rpc.ILocalizedMessage} message LocalizedMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a LocalizedMessage message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.LocalizedMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.LocalizedMessage} LocalizedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedMessage.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.LocalizedMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.locale = reader.string(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LocalizedMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.LocalizedMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.LocalizedMessage} LocalizedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocalizedMessage message. + * @function verify + * @memberof google.rpc.LocalizedMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocalizedMessage.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) + if (!$util.isString(message.locale)) + return "locale: string expected"; + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a LocalizedMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.LocalizedMessage + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.LocalizedMessage} LocalizedMessage + */ + LocalizedMessage.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.LocalizedMessage) + return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.LocalizedMessage: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.LocalizedMessage(); + if (object.locale != null) + message.locale = String(object.locale); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a LocalizedMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.LocalizedMessage + * @static + * @param {google.rpc.LocalizedMessage} message LocalizedMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocalizedMessage.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.locale = ""; + object.message = ""; + } + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) + object.locale = message.locale; + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + object.message = message.message; + return object; + }; + + /** + * Converts this LocalizedMessage to JSON. + * @function toJSON + * @memberof google.rpc.LocalizedMessage + * @instance + * @returns {Object.} JSON object + */ + LocalizedMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocalizedMessage + * @function getTypeUrl + * @memberof google.rpc.LocalizedMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocalizedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.LocalizedMessage"; + }; + + return LocalizedMessage; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-bigtable-api/protos/protos.json b/packages/google-cloud-bigtable-api/protos/protos.json new file mode 100644 index 000000000000..b15646c815f2 --- /dev/null +++ b/packages/google-cloud-bigtable-api/protos/protos.json @@ -0,0 +1,11410 @@ +{ + "nested": { + "google": { + "nested": { + "bigtable": { + "nested": { + "admin": { + "nested": { + "v2": { + "options": { + "csharp_namespace": "Google.Cloud.Bigtable.Admin.V2", + "go_package": "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb", + "java_multiple_files": true, + "java_outer_classname": "TypesProto", + "java_package": "com.google.bigtable.admin.v2", + "php_namespace": "Google\\Cloud\\Bigtable\\Admin\\V2", + "ruby_package": "Google::Cloud::Bigtable::Admin::V2", + "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" + }, + "nested": { + "BigtableInstanceAdmin": { + "options": { + "(google.api.default_host)": "bigtableadmin.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/bigtable.admin,https://www.googleapis.com/auth/bigtable.admin.cluster,https://www.googleapis.com/auth/bigtable.admin.instance,https://www.googleapis.com/auth/cloud-bigtable.admin,https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" + }, + "methods": { + "CreateInstance": { + "requestType": "CreateInstanceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/instances", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,instance_id,instance,clusters", + "(google.longrunning.operation_info).response_type": "Instance", + "(google.longrunning.operation_info).metadata_type": "CreateInstanceMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/instances", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,instance_id,instance,clusters" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Instance", + "metadata_type": "CreateInstanceMetadata" + } + } + ] + }, + "GetInstance": { + "requestType": "GetInstanceRequest", + "responseType": "Instance", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListInstances": { + "requestType": "ListInstancesRequest", + "responseType": "ListInstancesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*}/instances", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*}/instances" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateInstance": { + "requestType": "Instance", + "responseType": "Instance", + "options": { + "(google.api.http).put": "/v2/{name=projects/*/instances/*}", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{name=projects/*/instances/*}", + "body": "*" + } + } + ] + }, + "PartialUpdateInstance": { + "requestType": "PartialUpdateInstanceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{instance.name=projects/*/instances/*}", + "(google.api.http).body": "instance", + "(google.api.method_signature)": "instance,update_mask", + "(google.longrunning.operation_info).response_type": "Instance", + "(google.longrunning.operation_info).metadata_type": "UpdateInstanceMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{instance.name=projects/*/instances/*}", + "body": "instance" + } + }, + { + "(google.api.method_signature)": "instance,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Instance", + "metadata_type": "UpdateInstanceMetadata" + } + } + ] + }, + "DeleteInstance": { + "requestType": "DeleteInstanceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCluster": { + "requestType": "CreateClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/clusters", + "(google.api.http).body": "cluster", + "(google.api.method_signature)": "parent,cluster_id,cluster", + "(google.longrunning.operation_info).response_type": "Cluster", + "(google.longrunning.operation_info).metadata_type": "CreateClusterMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/clusters", + "body": "cluster" + } + }, + { + "(google.api.method_signature)": "parent,cluster_id,cluster" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Cluster", + "metadata_type": "CreateClusterMetadata" + } + } + ] + }, + "GetCluster": { + "requestType": "GetClusterRequest", + "responseType": "Cluster", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/clusters/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/clusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListClusters": { + "requestType": "ListClustersRequest", + "responseType": "ListClustersResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*}/clusters", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*}/clusters" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateCluster": { + "requestType": "Cluster", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).put": "/v2/{name=projects/*/instances/*/clusters/*}", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Cluster", + "(google.longrunning.operation_info).metadata_type": "UpdateClusterMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{name=projects/*/instances/*/clusters/*}", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Cluster", + "metadata_type": "UpdateClusterMetadata" + } + } + ] + }, + "PartialUpdateCluster": { + "requestType": "PartialUpdateClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{cluster.name=projects/*/instances/*/clusters/*}", + "(google.api.http).body": "cluster", + "(google.api.method_signature)": "cluster,update_mask", + "(google.longrunning.operation_info).response_type": "Cluster", + "(google.longrunning.operation_info).metadata_type": "PartialUpdateClusterMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{cluster.name=projects/*/instances/*/clusters/*}", + "body": "cluster" + } + }, + { + "(google.api.method_signature)": "cluster,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Cluster", + "metadata_type": "PartialUpdateClusterMetadata" + } + } + ] + }, + "DeleteCluster": { + "requestType": "DeleteClusterRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/clusters/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/clusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateAppProfile": { + "requestType": "CreateAppProfileRequest", + "responseType": "AppProfile", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/appProfiles", + "(google.api.http).body": "app_profile", + "(google.api.method_signature)": "parent,app_profile_id,app_profile" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/appProfiles", + "body": "app_profile" + } + }, + { + "(google.api.method_signature)": "parent,app_profile_id,app_profile" + } + ] + }, + "GetAppProfile": { + "requestType": "GetAppProfileRequest", + "responseType": "AppProfile", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/appProfiles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/appProfiles/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAppProfiles": { + "requestType": "ListAppProfilesRequest", + "responseType": "ListAppProfilesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*}/appProfiles", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*}/appProfiles" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateAppProfile": { + "requestType": "UpdateAppProfileRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}", + "(google.api.http).body": "app_profile", + "(google.api.method_signature)": "app_profile,update_mask", + "(google.longrunning.operation_info).response_type": "AppProfile", + "(google.longrunning.operation_info).metadata_type": "UpdateAppProfileMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}", + "body": "app_profile" + } + }, + { + "(google.api.method_signature)": "app_profile,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AppProfile", + "metadata_type": "UpdateAppProfileMetadata" + } + } + ] + }, + "DeleteAppProfile": { + "requestType": "DeleteAppProfileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/appProfiles/*}", + "(google.api.method_signature)": "name,ignore_warnings" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/appProfiles/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.api.method_signature)": "name,ignore_warnings" + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v2/{resource=projects/*/instances/*}:getIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/logicalViews/*}:getIamPolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}:getIamPolicy", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{resource=projects/*/instances/*/materializedViews/*}:getIamPolicy", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/logicalViews/*}:getIamPolicy", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "resource" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v2/{resource=projects/*/instances/*}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/logicalViews/*}:setIamPolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource,policy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}:setIamPolicy", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{resource=projects/*/instances/*/materializedViews/*}:setIamPolicy", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/logicalViews/*}:setIamPolicy", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "resource,policy" + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v2/{resource=projects/*/instances/*}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/logicalViews/*}:testIamPermissions", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource,permissions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}:testIamPermissions", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{resource=projects/*/instances/*/materializedViews/*}:testIamPermissions", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/logicalViews/*}:testIamPermissions", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "resource,permissions" + } + ] + }, + "ListHotTablets": { + "requestType": "ListHotTabletsRequest", + "responseType": "ListHotTabletsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateLogicalView": { + "requestType": "CreateLogicalViewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/logicalViews", + "(google.api.http).body": "logical_view", + "(google.api.method_signature)": "parent,logical_view,logical_view_id", + "(google.longrunning.operation_info).response_type": "LogicalView", + "(google.longrunning.operation_info).metadata_type": "CreateLogicalViewMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/logicalViews", + "body": "logical_view" + } + }, + { + "(google.api.method_signature)": "parent,logical_view,logical_view_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "LogicalView", + "metadata_type": "CreateLogicalViewMetadata" + } + } + ] + }, + "GetLogicalView": { + "requestType": "GetLogicalViewRequest", + "responseType": "LogicalView", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/logicalViews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/logicalViews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListLogicalViews": { + "requestType": "ListLogicalViewsRequest", + "responseType": "ListLogicalViewsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*}/logicalViews", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*}/logicalViews" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateLogicalView": { + "requestType": "UpdateLogicalViewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{logical_view.name=projects/*/instances/*/logicalViews/*}", + "(google.api.http).body": "logical_view", + "(google.api.method_signature)": "logical_view,update_mask", + "(google.longrunning.operation_info).response_type": "LogicalView", + "(google.longrunning.operation_info).metadata_type": "UpdateLogicalViewMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{logical_view.name=projects/*/instances/*/logicalViews/*}", + "body": "logical_view" + } + }, + { + "(google.api.method_signature)": "logical_view,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "LogicalView", + "metadata_type": "UpdateLogicalViewMetadata" + } + } + ] + }, + "DeleteLogicalView": { + "requestType": "DeleteLogicalViewRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/logicalViews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/logicalViews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateMaterializedView": { + "requestType": "CreateMaterializedViewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/materializedViews", + "(google.api.http).body": "materialized_view", + "(google.api.method_signature)": "parent,materialized_view,materialized_view_id", + "(google.longrunning.operation_info).response_type": "MaterializedView", + "(google.longrunning.operation_info).metadata_type": "CreateMaterializedViewMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/materializedViews", + "body": "materialized_view" + } + }, + { + "(google.api.method_signature)": "parent,materialized_view,materialized_view_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MaterializedView", + "metadata_type": "CreateMaterializedViewMetadata" + } + } + ] + }, + "GetMaterializedView": { + "requestType": "GetMaterializedViewRequest", + "responseType": "MaterializedView", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/materializedViews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/materializedViews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMaterializedViews": { + "requestType": "ListMaterializedViewsRequest", + "responseType": "ListMaterializedViewsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*}/materializedViews", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*}/materializedViews" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateMaterializedView": { + "requestType": "UpdateMaterializedViewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{materialized_view.name=projects/*/instances/*/materializedViews/*}", + "(google.api.http).body": "materialized_view", + "(google.api.method_signature)": "materialized_view,update_mask", + "(google.longrunning.operation_info).response_type": "MaterializedView", + "(google.longrunning.operation_info).metadata_type": "UpdateMaterializedViewMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{materialized_view.name=projects/*/instances/*/materializedViews/*}", + "body": "materialized_view" + } + }, + { + "(google.api.method_signature)": "materialized_view,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MaterializedView", + "metadata_type": "UpdateMaterializedViewMetadata" + } + } + ] + }, + "DeleteMaterializedView": { + "requestType": "DeleteMaterializedViewRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/materializedViews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/materializedViews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateInstanceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "instanceId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "Instance", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusters": { + "keyType": "string", + "type": "Cluster", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetInstanceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + } + } + }, + "ListInstancesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListInstancesResponse": { + "fields": { + "instances": { + "rule": "repeated", + "type": "Instance", + "id": 1 + }, + "failedLocations": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nextPageToken": { + "type": "string", + "id": 3 + } + } + }, + "PartialUpdateInstanceRequest": { + "fields": { + "instance": { + "type": "Instance", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteInstanceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + } + } + }, + "CreateClusterRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "clusterId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "cluster": { + "type": "Cluster", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetClusterRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Cluster" + } + } + } + }, + "ListClustersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "pageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListClustersResponse": { + "fields": { + "clusters": { + "rule": "repeated", + "type": "Cluster", + "id": 1 + }, + "failedLocations": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nextPageToken": { + "type": "string", + "id": 3 + } + } + }, + "DeleteClusterRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Cluster" + } + } + } + }, + "CreateInstanceMetadata": { + "fields": { + "originalRequest": { + "type": "CreateInstanceRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "UpdateInstanceMetadata": { + "fields": { + "originalRequest": { + "type": "PartialUpdateInstanceRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "CreateClusterMetadata": { + "fields": { + "originalRequest": { + "type": "CreateClusterRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "tables": { + "keyType": "string", + "type": "TableProgress", + "id": 4 + } + }, + "nested": { + "TableProgress": { + "fields": { + "estimatedSizeBytes": { + "type": "int64", + "id": 2 + }, + "estimatedCopiedBytes": { + "type": "int64", + "id": 3 + }, + "state": { + "type": "State", + "id": 4 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "COPYING": 2, + "COMPLETED": 3, + "CANCELLED": 4 + } + } + } + } + } + }, + "UpdateClusterMetadata": { + "fields": { + "originalRequest": { + "type": "Cluster", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "PartialUpdateClusterMetadata": { + "fields": { + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "originalRequest": { + "type": "PartialUpdateClusterRequest", + "id": 3 + } + } + }, + "PartialUpdateClusterRequest": { + "fields": { + "cluster": { + "type": "Cluster", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateAppProfileRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "appProfileId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "appProfile": { + "type": "AppProfile", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ignoreWarnings": { + "type": "bool", + "id": 4 + } + } + }, + "GetAppProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AppProfile" + } + } + } + }, + "ListAppProfilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListAppProfilesResponse": { + "fields": { + "appProfiles": { + "rule": "repeated", + "type": "AppProfile", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "failedLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "UpdateAppProfileRequest": { + "fields": { + "appProfile": { + "type": "AppProfile", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ignoreWarnings": { + "type": "bool", + "id": 3 + } + } + }, + "DeleteAppProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AppProfile" + } + }, + "ignoreWarnings": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateAppProfileMetadata": { + "fields": {} + }, + "ListHotTabletsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Cluster" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 5 + } + } + }, + "ListHotTabletsResponse": { + "fields": { + "hotTablets": { + "rule": "repeated", + "type": "HotTablet", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateLogicalViewRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "logicalViewId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "logicalView": { + "type": "LogicalView", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateLogicalViewMetadata": { + "fields": { + "originalRequest": { + "type": "CreateLogicalViewRequest", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "GetLogicalViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/LogicalView" + } + } + } + }, + "ListLogicalViewsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigtableadmin.googleapis.com/LogicalView" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListLogicalViewsResponse": { + "fields": { + "logicalViews": { + "rule": "repeated", + "type": "LogicalView", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateLogicalViewRequest": { + "fields": { + "logicalView": { + "type": "LogicalView", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateLogicalViewMetadata": { + "fields": { + "originalRequest": { + "type": "UpdateLogicalViewRequest", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "DeleteLogicalViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/LogicalView" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateMaterializedViewRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "materializedViewId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "materializedView": { + "type": "MaterializedView", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateMaterializedViewMetadata": { + "fields": { + "originalRequest": { + "type": "CreateMaterializedViewRequest", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "GetMaterializedViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/MaterializedView" + } + } + } + }, + "ListMaterializedViewsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigtableadmin.googleapis.com/MaterializedView" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMaterializedViewsResponse": { + "fields": { + "materializedViews": { + "rule": "repeated", + "type": "MaterializedView", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateMaterializedViewRequest": { + "fields": { + "materializedView": { + "type": "MaterializedView", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateMaterializedViewMetadata": { + "fields": { + "originalRequest": { + "type": "UpdateMaterializedViewRequest", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "DeleteMaterializedViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/MaterializedView" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Instance": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/Instance", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}", + "(google.api.resource).plural": "instances", + "(google.api.resource).singular": "instance" + }, + "oneofs": { + "_satisfiesPzs": { + "oneof": [ + "satisfiesPzs" + ] + }, + "_satisfiesPzi": { + "oneof": [ + "satisfiesPzi" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "Type", + "id": 4 + }, + "edition": { + "type": "Edition", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "tags": { + "keyType": "string", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_NOT_KNOWN": 0, + "READY": 1, + "CREATING": 2 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "PRODUCTION": 1, + "DEVELOPMENT": 2 + } + }, + "Edition": { + "values": { + "EDITION_UNSPECIFIED": 0, + "ENTERPRISE": 1, + "ENTERPRISE_PLUS": 2 + } + } + } + }, + "AutoscalingTargets": { + "fields": { + "cpuUtilizationPercent": { + "type": "int32", + "id": 2 + }, + "storageUtilizationGibPerNode": { + "type": "int32", + "id": 3 + } + } + }, + "AutoscalingLimits": { + "fields": { + "minServeNodes": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "maxServeNodes": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Cluster": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/Cluster", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/clusters/{cluster}", + "(google.api.resource).plural": "clusters", + "(google.api.resource).singular": "cluster" + }, + "oneofs": { + "config": { + "oneof": [ + "clusterConfig" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serveNodes": { + "type": "int32", + "id": 4 + }, + "nodeScalingFactor": { + "type": "NodeScalingFactor", + "id": 9, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "clusterConfig": { + "type": "ClusterConfig", + "id": 7 + }, + "defaultStorageType": { + "type": "StorageType", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_NOT_KNOWN": 0, + "READY": 1, + "CREATING": 2, + "RESIZING": 3, + "DISABLED": 4 + } + }, + "NodeScalingFactor": { + "values": { + "NODE_SCALING_FACTOR_UNSPECIFIED": 0, + "NODE_SCALING_FACTOR_1X": 1, + "NODE_SCALING_FACTOR_2X": 2 + } + }, + "ClusterAutoscalingConfig": { + "fields": { + "autoscalingLimits": { + "type": "AutoscalingLimits", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "autoscalingTargets": { + "type": "AutoscalingTargets", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ClusterConfig": { + "fields": { + "clusterAutoscalingConfig": { + "type": "ClusterAutoscalingConfig", + "id": 1 + } + } + }, + "EncryptionConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } + } + } + } + } + }, + "AppProfile": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/AppProfile", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/appProfiles/{app_profile}", + "(google.api.resource).plural": "appProfiles", + "(google.api.resource).singular": "appProfile" + }, + "oneofs": { + "routingPolicy": { + "oneof": [ + "multiClusterRoutingUseAny", + "singleClusterRouting" + ] + }, + "isolation": { + "oneof": [ + "priority", + "standardIsolation", + "dataBoostIsolationReadOnly" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "etag": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "multiClusterRoutingUseAny": { + "type": "MultiClusterRoutingUseAny", + "id": 5 + }, + "singleClusterRouting": { + "type": "SingleClusterRouting", + "id": 6 + }, + "priority": { + "type": "Priority", + "id": 7, + "options": { + "deprecated": true + } + }, + "standardIsolation": { + "type": "StandardIsolation", + "id": 11 + }, + "dataBoostIsolationReadOnly": { + "type": "DataBoostIsolationReadOnly", + "id": 10 + } + }, + "nested": { + "MultiClusterRoutingUseAny": { + "oneofs": { + "affinity": { + "oneof": [ + "rowAffinity" + ] + } + }, + "fields": { + "clusterIds": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "rowAffinity": { + "type": "RowAffinity", + "id": 3 + } + }, + "nested": { + "RowAffinity": { + "fields": {} + } + } + }, + "SingleClusterRouting": { + "fields": { + "clusterId": { + "type": "string", + "id": 1 + }, + "allowTransactionalWrites": { + "type": "bool", + "id": 2 + } + } + }, + "Priority": { + "values": { + "PRIORITY_UNSPECIFIED": 0, + "PRIORITY_LOW": 1, + "PRIORITY_MEDIUM": 2, + "PRIORITY_HIGH": 3 + } + }, + "StandardIsolation": { + "fields": { + "priority": { + "type": "Priority", + "id": 1 + } + } + }, + "DataBoostIsolationReadOnly": { + "oneofs": { + "_computeBillingOwner": { + "oneof": [ + "computeBillingOwner" + ] + } + }, + "fields": { + "computeBillingOwner": { + "type": "ComputeBillingOwner", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "ComputeBillingOwner": { + "values": { + "COMPUTE_BILLING_OWNER_UNSPECIFIED": 0, + "HOST_PAYS": 1 + } + } + } + } + } + }, + "HotTablet": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/HotTablet", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/{hot_tablet}", + "(google.api.resource).plural": "hotTablets", + "(google.api.resource).singular": "hotTablet" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "tableName": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startKey": { + "type": "string", + "id": 5 + }, + "endKey": { + "type": "string", + "id": 6 + }, + "nodeCpuUsagePercent": { + "type": "float", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "LogicalView": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/LogicalView", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/logicalViews/{logical_view}", + "(google.api.resource).plural": "logicalViews", + "(google.api.resource).singular": "logicalView" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "query": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deletionProtection": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MaterializedView": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/MaterializedView", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/materializedViews/{materialized_view}", + "(google.api.resource).plural": "materializedViews", + "(google.api.resource).singular": "materializedView" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "query": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "etag": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deletionProtection": { + "type": "bool", + "id": 6 + } + } + }, + "StorageType": { + "values": { + "STORAGE_TYPE_UNSPECIFIED": 0, + "SSD": 1, + "HDD": 2 + } + }, + "OperationProgress": { + "fields": { + "progressPercent": { + "type": "int32", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "BigtableTableAdmin": { + "options": { + "(google.api.default_host)": "bigtableadmin.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/bigtable.admin,https://www.googleapis.com/auth/bigtable.admin.table,https://www.googleapis.com/auth/cloud-bigtable.admin,https://www.googleapis.com/auth/cloud-bigtable.admin.table,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" + }, + "methods": { + "CreateTable": { + "requestType": "CreateTableRequest", + "responseType": "Table", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/tables", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,table_id,table" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/tables", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,table_id,table" + } + ] + }, + "CreateTableFromSnapshot": { + "requestType": "CreateTableFromSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,table_id,source_snapshot", + "(google.longrunning.operation_info).response_type": "Table", + "(google.longrunning.operation_info).metadata_type": "CreateTableFromSnapshotMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,table_id,source_snapshot" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Table", + "metadata_type": "CreateTableFromSnapshotMetadata" + } + } + ] + }, + "ListTables": { + "requestType": "ListTablesRequest", + "responseType": "ListTablesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*}/tables", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*}/tables" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTable": { + "requestType": "GetTableRequest", + "responseType": "Table", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/tables/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/tables/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateTable": { + "requestType": "UpdateTableRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{table.name=projects/*/instances/*/tables/*}", + "(google.api.http).body": "table", + "(google.api.method_signature)": "table,update_mask", + "(google.longrunning.operation_info).response_type": "Table", + "(google.longrunning.operation_info).metadata_type": "UpdateTableMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{table.name=projects/*/instances/*/tables/*}", + "body": "table" + } + }, + { + "(google.api.method_signature)": "table,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Table", + "metadata_type": "UpdateTableMetadata" + } + } + ] + }, + "DeleteTable": { + "requestType": "DeleteTableRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/tables/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/tables/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UndeleteTable": { + "requestType": "UndeleteTableRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:undelete", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Table", + "(google.longrunning.operation_info).metadata_type": "UndeleteTableMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:undelete", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Table", + "metadata_type": "UndeleteTableMetadata" + } + } + ] + }, + "CreateAuthorizedView": { + "requestType": "CreateAuthorizedViewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews", + "(google.api.http).body": "authorized_view", + "(google.api.method_signature)": "parent,authorized_view,authorized_view_id", + "(google.longrunning.operation_info).response_type": "AuthorizedView", + "(google.longrunning.operation_info).metadata_type": "CreateAuthorizedViewMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews", + "body": "authorized_view" + } + }, + { + "(google.api.method_signature)": "parent,authorized_view,authorized_view_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AuthorizedView", + "metadata_type": "CreateAuthorizedViewMetadata" + } + } + ] + }, + "ListAuthorizedViews": { + "requestType": "ListAuthorizedViewsRequest", + "responseType": "ListAuthorizedViewsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAuthorizedView": { + "requestType": "GetAuthorizedViewRequest", + "responseType": "AuthorizedView", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAuthorizedView": { + "requestType": "UpdateAuthorizedViewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(google.api.http).body": "authorized_view", + "(google.api.method_signature)": "authorized_view,update_mask", + "(google.longrunning.operation_info).response_type": "AuthorizedView", + "(google.longrunning.operation_info).metadata_type": "UpdateAuthorizedViewMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}", + "body": "authorized_view" + } + }, + { + "(google.api.method_signature)": "authorized_view,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AuthorizedView", + "metadata_type": "UpdateAuthorizedViewMetadata" + } + } + ] + }, + "DeleteAuthorizedView": { + "requestType": "DeleteAuthorizedViewRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ModifyColumnFamilies": { + "requestType": "ModifyColumnFamiliesRequest", + "responseType": "Table", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,modifications" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,modifications" + } + ] + }, + "DropRowRange": { + "requestType": "DropRowRangeRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange", + "body": "*" + } + } + ] + }, + "GenerateConsistencyToken": { + "requestType": "GenerateConsistencyTokenRequest", + "responseType": "GenerateConsistencyTokenResponse", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CheckConsistency": { + "requestType": "CheckConsistencyRequest", + "responseType": "CheckConsistencyResponse", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,consistency_token" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,consistency_token" + } + ] + }, + "SnapshotTable": { + "requestType": "SnapshotTableRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:snapshot", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,cluster,snapshot_id,description", + "(google.longrunning.operation_info).response_type": "Snapshot", + "(google.longrunning.operation_info).metadata_type": "SnapshotTableMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:snapshot", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,cluster,snapshot_id,description" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Snapshot", + "metadata_type": "SnapshotTableMetadata" + } + } + ] + }, + "GetSnapshot": { + "requestType": "GetSnapshotRequest", + "responseType": "Snapshot", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListSnapshots": { + "requestType": "ListSnapshotsRequest", + "responseType": "ListSnapshotsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteSnapshot": { + "requestType": "DeleteSnapshotRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateBackup": { + "requestType": "CreateBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*/clusters/*}/backups", + "(google.api.http).body": "backup", + "(google.api.method_signature)": "parent,backup_id,backup", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "CreateBackupMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*/clusters/*}/backups", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "parent,backup_id,backup" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "CreateBackupMetadata" + } + } + ] + }, + "GetBackup": { + "requestType": "GetBackupRequest", + "responseType": "Backup", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/clusters/*/backups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/clusters/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackup": { + "requestType": "UpdateBackupRequest", + "responseType": "Backup", + "options": { + "(google.api.http).patch": "/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}", + "(google.api.http).body": "backup", + "(google.api.method_signature)": "backup,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "backup,update_mask" + } + ] + }, + "DeleteBackup": { + "requestType": "DeleteBackupRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/clusters/*/backups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/clusters/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackups": { + "requestType": "ListBackupsRequest", + "responseType": "ListBackupsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*/clusters/*}/backups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*/clusters/*}/backups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "RestoreTable": { + "requestType": "RestoreTableRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/tables:restore", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Table", + "(google.longrunning.operation_info).metadata_type": "RestoreTableMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/tables:restore", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Table", + "metadata_type": "RestoreTableMetadata" + } + } + ] + }, + "CopyBackup": { + "requestType": "CopyBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*/clusters/*}/backups:copy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,backup_id,source_backup,expire_time", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "CopyBackupMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*/clusters/*}/backups:copy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,backup_id,source_backup,expire_time" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "CopyBackupMetadata" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:getIamPolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:getIamPolicy", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:getIamPolicy", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "resource" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:setIamPolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource,policy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:setIamPolicy", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:setIamPolicy", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "resource,policy" + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:testIamPermissions", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "resource,permissions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:testIamPermissions", + "body": "*" + }, + { + "post": "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:testIamPermissions", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "resource,permissions" + } + ] + }, + "CreateSchemaBundle": { + "requestType": "CreateSchemaBundleRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*/tables/*}/schemaBundles", + "(google.api.http).body": "schema_bundle", + "(google.api.method_signature)": "parent,schema_bundle_id,schema_bundle", + "(google.longrunning.operation_info).response_type": "SchemaBundle", + "(google.longrunning.operation_info).metadata_type": "CreateSchemaBundleMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*/tables/*}/schemaBundles", + "body": "schema_bundle" + } + }, + { + "(google.api.method_signature)": "parent,schema_bundle_id,schema_bundle" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "SchemaBundle", + "metadata_type": "CreateSchemaBundleMetadata" + } + } + ] + }, + "UpdateSchemaBundle": { + "requestType": "UpdateSchemaBundleRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{schema_bundle.name=projects/*/instances/*/tables/*/schemaBundles/*}", + "(google.api.http).body": "schema_bundle", + "(google.api.method_signature)": "schema_bundle,update_mask", + "(google.longrunning.operation_info).response_type": "SchemaBundle", + "(google.longrunning.operation_info).metadata_type": "UpdateSchemaBundleMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{schema_bundle.name=projects/*/instances/*/tables/*/schemaBundles/*}", + "body": "schema_bundle" + } + }, + { + "(google.api.method_signature)": "schema_bundle,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "SchemaBundle", + "metadata_type": "UpdateSchemaBundleMetadata" + } + } + ] + }, + "GetSchemaBundle": { + "requestType": "GetSchemaBundleRequest", + "responseType": "SchemaBundle", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/tables/*/schemaBundles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/tables/*/schemaBundles/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListSchemaBundles": { + "requestType": "ListSchemaBundlesRequest", + "responseType": "ListSchemaBundlesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*/tables/*}/schemaBundles", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*/tables/*}/schemaBundles" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteSchemaBundle": { + "requestType": "DeleteSchemaBundleRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/tables/*/schemaBundles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/tables/*/schemaBundles/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "RestoreTableRequest": { + "oneofs": { + "source": { + "oneof": [ + "backup" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "tableId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backup": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Backup" + } + } + } + }, + "RestoreTableMetadata": { + "oneofs": { + "sourceInfo": { + "oneof": [ + "backupInfo" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "sourceType": { + "type": "RestoreSourceType", + "id": 2 + }, + "backupInfo": { + "type": "BackupInfo", + "id": 3 + }, + "optimizeTableOperationName": { + "type": "string", + "id": 4 + }, + "progress": { + "type": "OperationProgress", + "id": 5 + } + } + }, + "OptimizeRestoredTableMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "progress": { + "type": "OperationProgress", + "id": 2 + } + } + }, + "CreateTableRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "tableId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "table": { + "type": "Table", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "initialSplits": { + "rule": "repeated", + "type": "Split", + "id": 4 + } + }, + "nested": { + "Split": { + "fields": { + "key": { + "type": "bytes", + "id": 1 + } + } + } + } + }, + "CreateTableFromSnapshotRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "tableId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sourceSnapshot": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Snapshot" + } + } + } + }, + "DropRowRangeRequest": { + "oneofs": { + "target": { + "oneof": [ + "rowKeyPrefix", + "deleteAllDataFromTable" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "rowKeyPrefix": { + "type": "bytes", + "id": 2 + }, + "deleteAllDataFromTable": { + "type": "bool", + "id": 3 + } + } + }, + "ListTablesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "view": { + "type": "Table.View", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListTablesResponse": { + "fields": { + "tables": { + "rule": "repeated", + "type": "Table", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetTableRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "view": { + "type": "Table.View", + "id": 2 + } + } + }, + "UpdateTableRequest": { + "fields": { + "table": { + "type": "Table", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ignoreWarnings": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateTableMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "DeleteTableRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + } + } + }, + "UndeleteTableRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + } + } + }, + "UndeleteTableMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "ModifyColumnFamiliesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "modifications": { + "rule": "repeated", + "type": "Modification", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ignoreWarnings": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Modification": { + "oneofs": { + "mod": { + "oneof": [ + "create", + "update", + "drop" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "create": { + "type": "ColumnFamily", + "id": 2 + }, + "update": { + "type": "ColumnFamily", + "id": 3 + }, + "drop": { + "type": "bool", + "id": 4 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "GenerateConsistencyTokenRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + } + } + }, + "GenerateConsistencyTokenResponse": { + "fields": { + "consistencyToken": { + "type": "string", + "id": 1 + } + } + }, + "CheckConsistencyRequest": { + "oneofs": { + "mode": { + "oneof": [ + "standardReadRemoteWrites", + "dataBoostReadLocalWrites" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "consistencyToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "standardReadRemoteWrites": { + "type": "StandardReadRemoteWrites", + "id": 3 + }, + "dataBoostReadLocalWrites": { + "type": "DataBoostReadLocalWrites", + "id": 4 + } + } + }, + "StandardReadRemoteWrites": { + "fields": {} + }, + "DataBoostReadLocalWrites": { + "fields": {} + }, + "CheckConsistencyResponse": { + "fields": { + "consistent": { + "type": "bool", + "id": 1 + } + } + }, + "SnapshotTableRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "cluster": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Cluster" + } + }, + "snapshotId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ttl": { + "type": "google.protobuf.Duration", + "id": 4 + }, + "description": { + "type": "string", + "id": 5 + } + } + }, + "GetSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Snapshot" + } + } + } + }, + "ListSnapshotsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Cluster" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListSnapshotsResponse": { + "fields": { + "snapshots": { + "rule": "repeated", + "type": "Snapshot", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Snapshot" + } + } + } + }, + "SnapshotTableMetadata": { + "fields": { + "originalRequest": { + "type": "SnapshotTableRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "CreateTableFromSnapshotMetadata": { + "fields": { + "originalRequest": { + "type": "CreateTableFromSnapshotRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "CreateBackupRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Cluster" + } + }, + "backupId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backup": { + "type": "Backup", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateBackupMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "sourceTable": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "UpdateBackupRequest": { + "fields": { + "backup": { + "type": "Backup", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Backup" + } + } + } + }, + "DeleteBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Backup" + } + } + } + }, + "ListBackupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Cluster" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "orderBy": { + "type": "string", + "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 5 + } + } + }, + "ListBackupsResponse": { + "fields": { + "backups": { + "rule": "repeated", + "type": "Backup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CopyBackupRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Cluster" + } + }, + "backupId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sourceBackup": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Backup" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CopyBackupMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Backup" + } + }, + "sourceBackupInfo": { + "type": "BackupInfo", + "id": 2 + }, + "progress": { + "type": "OperationProgress", + "id": 3 + } + } + }, + "CreateAuthorizedViewRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "authorizedViewId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "authorizedView": { + "type": "AuthorizedView", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateAuthorizedViewMetadata": { + "fields": { + "originalRequest": { + "type": "CreateAuthorizedViewRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "ListAuthorizedViewsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "AuthorizedView.ResponseView", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAuthorizedViewsResponse": { + "fields": { + "authorizedViews": { + "rule": "repeated", + "type": "AuthorizedView", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetAuthorizedViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "view": { + "type": "AuthorizedView.ResponseView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAuthorizedViewRequest": { + "fields": { + "authorizedView": { + "type": "AuthorizedView", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ignoreWarnings": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAuthorizedViewMetadata": { + "fields": { + "originalRequest": { + "type": "UpdateAuthorizedViewRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "DeleteAuthorizedViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateSchemaBundleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "schemaBundleId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schemaBundle": { + "type": "SchemaBundle", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateSchemaBundleMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "UpdateSchemaBundleRequest": { + "fields": { + "schemaBundle": { + "type": "SchemaBundle", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ignoreWarnings": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateSchemaBundleMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "GetSchemaBundleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/SchemaBundle" + } + } + } + }, + "ListSchemaBundlesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigtableadmin.googleapis.com/SchemaBundle" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListSchemaBundlesResponse": { + "fields": { + "schemaBundles": { + "rule": "repeated", + "type": "SchemaBundle", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteSchemaBundleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/SchemaBundle" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RestoreInfo": { + "oneofs": { + "sourceInfo": { + "oneof": [ + "backupInfo" + ] + } + }, + "fields": { + "sourceType": { + "type": "RestoreSourceType", + "id": 1 + }, + "backupInfo": { + "type": "BackupInfo", + "id": 2 + } + } + }, + "ChangeStreamConfig": { + "fields": { + "retentionPeriod": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "Table": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/Table", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/tables/{table}" + }, + "oneofs": { + "automatedBackupConfig": { + "oneof": [ + "automatedBackupPolicy" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "clusterStates": { + "keyType": "string", + "type": "ClusterState", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "columnFamilies": { + "keyType": "string", + "type": "ColumnFamily", + "id": 3 + }, + "granularity": { + "type": "TimestampGranularity", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "restoreInfo": { + "type": "RestoreInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "changeStreamConfig": { + "type": "ChangeStreamConfig", + "id": 8 + }, + "deletionProtection": { + "type": "bool", + "id": 9 + }, + "automatedBackupPolicy": { + "type": "AutomatedBackupPolicy", + "id": 13 + }, + "tieredStorageConfig": { + "type": "TieredStorageConfig", + "id": 14 + }, + "rowKeySchema": { + "type": "Type.Struct", + "id": 15 + } + }, + "nested": { + "ClusterState": { + "fields": { + "replicationState": { + "type": "ReplicationState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "encryptionInfo": { + "rule": "repeated", + "type": "EncryptionInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ReplicationState": { + "values": { + "STATE_NOT_KNOWN": 0, + "INITIALIZING": 1, + "PLANNED_MAINTENANCE": 2, + "UNPLANNED_MAINTENANCE": 3, + "READY": 4, + "READY_OPTIMIZING": 5 + } + } + } + }, + "TimestampGranularity": { + "values": { + "TIMESTAMP_GRANULARITY_UNSPECIFIED": 0, + "MILLIS": 1 + } + }, + "View": { + "values": { + "VIEW_UNSPECIFIED": 0, + "NAME_ONLY": 1, + "SCHEMA_VIEW": 2, + "REPLICATION_VIEW": 3, + "ENCRYPTION_VIEW": 5, + "FULL": 4 + } + }, + "AutomatedBackupPolicy": { + "fields": { + "retentionPeriod": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "frequency": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + } + } + } + } + }, + "AuthorizedView": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/AuthorizedView", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}", + "(google.api.resource).plural": "authorizedViews", + "(google.api.resource).singular": "authorizedView" + }, + "oneofs": { + "authorizedView": { + "oneof": [ + "subsetView" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "subsetView": { + "type": "SubsetView", + "id": 2 + }, + "etag": { + "type": "string", + "id": 3 + }, + "deletionProtection": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "FamilySubsets": { + "fields": { + "qualifiers": { + "rule": "repeated", + "type": "bytes", + "id": 1 + }, + "qualifierPrefixes": { + "rule": "repeated", + "type": "bytes", + "id": 2 + } + } + }, + "SubsetView": { + "fields": { + "rowPrefixes": { + "rule": "repeated", + "type": "bytes", + "id": 1 + }, + "familySubsets": { + "keyType": "string", + "type": "FamilySubsets", + "id": 2 + } + } + }, + "ResponseView": { + "values": { + "RESPONSE_VIEW_UNSPECIFIED": 0, + "NAME_ONLY": 1, + "BASIC": 2, + "FULL": 3 + } + } + } + }, + "ColumnFamily": { + "fields": { + "gcRule": { + "type": "GcRule", + "id": 1 + }, + "valueType": { + "type": "Type", + "id": 3 + } + } + }, + "GcRule": { + "oneofs": { + "rule": { + "oneof": [ + "maxNumVersions", + "maxAge", + "intersection", + "union" + ] + } + }, + "fields": { + "maxNumVersions": { + "type": "int32", + "id": 1 + }, + "maxAge": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "intersection": { + "type": "Intersection", + "id": 3 + }, + "union": { + "type": "Union", + "id": 4 + } + }, + "nested": { + "Intersection": { + "fields": { + "rules": { + "rule": "repeated", + "type": "GcRule", + "id": 1 + } + } + }, + "Union": { + "fields": { + "rules": { + "rule": "repeated", + "type": "GcRule", + "id": 1 + } + } + } + } + }, + "EncryptionInfo": { + "fields": { + "encryptionType": { + "type": "EncryptionType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "encryptionStatus": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "kmsKeyVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + } + }, + "nested": { + "EncryptionType": { + "values": { + "ENCRYPTION_TYPE_UNSPECIFIED": 0, + "GOOGLE_DEFAULT_ENCRYPTION": 1, + "CUSTOMER_MANAGED_ENCRYPTION": 2 + } + } + } + }, + "Snapshot": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/Snapshot", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "sourceTable": { + "type": "Table", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSizeBytes": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_NOT_KNOWN": 0, + "READY": 1, + "CREATING": 2 + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "sourceTable": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sourceBackup": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sizeBytes": { + "type": "int64", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "encryptionInfo": { + "type": "EncryptionInfo", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupType": { + "type": "BackupType", + "id": 11 + }, + "hotToStandardTime": { + "type": "google.protobuf.Timestamp", + "id": 12 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2 + } + }, + "BackupType": { + "values": { + "BACKUP_TYPE_UNSPECIFIED": 0, + "STANDARD": 1, + "HOT": 2 + } + } + } + }, + "BackupInfo": { + "fields": { + "backup": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceTable": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceBackup": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RestoreSourceType": { + "values": { + "RESTORE_SOURCE_TYPE_UNSPECIFIED": 0, + "BACKUP": 1 + } + }, + "TieredStorageConfig": { + "fields": { + "infrequentAccess": { + "type": "TieredStorageRule", + "id": 1 + } + } + }, + "TieredStorageRule": { + "oneofs": { + "rule": { + "oneof": [ + "includeIfOlderThan" + ] + } + }, + "fields": { + "includeIfOlderThan": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "ProtoSchema": { + "fields": { + "protoDescriptors": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SchemaBundle": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/SchemaBundle", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}", + "(google.api.resource).plural": "schemaBundles", + "(google.api.resource).singular": "schemaBundle" + }, + "oneofs": { + "type": { + "oneof": [ + "protoSchema" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "protoSchema": { + "type": "ProtoSchema", + "id": 2 + }, + "etag": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Type": { + "oneofs": { + "kind": { + "oneof": [ + "bytesType", + "stringType", + "int64Type", + "float32Type", + "float64Type", + "boolType", + "timestampType", + "dateType", + "aggregateType", + "structType", + "arrayType", + "mapType", + "protoType", + "enumType" + ] + } + }, + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1 + }, + "stringType": { + "type": "String", + "id": 2 + }, + "int64Type": { + "type": "Int64", + "id": 5 + }, + "float32Type": { + "type": "Float32", + "id": 12 + }, + "float64Type": { + "type": "Float64", + "id": 9 + }, + "boolType": { + "type": "Bool", + "id": 8 + }, + "timestampType": { + "type": "Timestamp", + "id": 10 + }, + "dateType": { + "type": "Date", + "id": 11 + }, + "aggregateType": { + "type": "Aggregate", + "id": 6 + }, + "structType": { + "type": "Struct", + "id": 7 + }, + "arrayType": { + "type": "Array", + "id": 3 + }, + "mapType": { + "type": "Map", + "id": 4 + }, + "protoType": { + "type": "Proto", + "id": 13 + }, + "enumType": { + "type": "Enum", + "id": 14 + } + }, + "nested": { + "Bytes": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "raw" + ] + } + }, + "fields": { + "raw": { + "type": "Raw", + "id": 1 + } + }, + "nested": { + "Raw": { + "fields": {} + } + } + } + } + }, + "String": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "utf8Raw", + "utf8Bytes" + ] + } + }, + "fields": { + "utf8Raw": { + "type": "Utf8Raw", + "id": 1, + "options": { + "deprecated": true + } + }, + "utf8Bytes": { + "type": "Utf8Bytes", + "id": 2 + } + }, + "nested": { + "Utf8Raw": { + "options": { + "deprecated": true + }, + "fields": {} + }, + "Utf8Bytes": { + "fields": {} + } + } + } + } + }, + "Int64": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "bigEndianBytes", + "orderedCodeBytes" + ] + } + }, + "fields": { + "bigEndianBytes": { + "type": "BigEndianBytes", + "id": 1 + }, + "orderedCodeBytes": { + "type": "OrderedCodeBytes", + "id": 2 + } + }, + "nested": { + "BigEndianBytes": { + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1, + "options": { + "deprecated": true + } + } + } + }, + "OrderedCodeBytes": { + "fields": {} + } + } + } + } + }, + "Bool": { + "fields": {} + }, + "Float32": { + "fields": {} + }, + "Float64": { + "fields": {} + }, + "Timestamp": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "unixMicrosInt64" + ] + } + }, + "fields": { + "unixMicrosInt64": { + "type": "Int64.Encoding", + "id": 1 + } + } + } + } + }, + "Date": { + "fields": {} + }, + "Struct": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1 + }, + "encoding": { + "type": "Encoding", + "id": 2 + } + }, + "nested": { + "Field": { + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + } + } + }, + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "singleton", + "delimitedBytes", + "orderedCodeBytes" + ] + } + }, + "fields": { + "singleton": { + "type": "Singleton", + "id": 1 + }, + "delimitedBytes": { + "type": "DelimitedBytes", + "id": 2 + }, + "orderedCodeBytes": { + "type": "OrderedCodeBytes", + "id": 3 + } + }, + "nested": { + "Singleton": { + "fields": {} + }, + "DelimitedBytes": { + "fields": { + "delimiter": { + "type": "bytes", + "id": 1 + } + } + }, + "OrderedCodeBytes": { + "fields": {} + } + } + } + } + }, + "Proto": { + "fields": { + "schemaBundleId": { + "type": "string", + "id": 1 + }, + "messageName": { + "type": "string", + "id": 2 + } + } + }, + "Enum": { + "fields": { + "schemaBundleId": { + "type": "string", + "id": 1 + }, + "enumName": { + "type": "string", + "id": 2 + } + } + }, + "Array": { + "fields": { + "elementType": { + "type": "Type", + "id": 1 + } + } + }, + "Map": { + "fields": { + "keyType": { + "type": "Type", + "id": 1 + }, + "valueType": { + "type": "Type", + "id": 2 + } + } + }, + "Aggregate": { + "oneofs": { + "aggregator": { + "oneof": [ + "sum", + "hllppUniqueCount", + "max", + "min" + ] + } + }, + "fields": { + "inputType": { + "type": "Type", + "id": 1 + }, + "stateType": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sum": { + "type": "Sum", + "id": 4 + }, + "hllppUniqueCount": { + "type": "HyperLogLogPlusPlusUniqueCount", + "id": 5 + }, + "max": { + "type": "Max", + "id": 6 + }, + "min": { + "type": "Min", + "id": 7 + } + }, + "nested": { + "Sum": { + "fields": {} + }, + "Max": { + "fields": {} + }, + "Min": { + "fields": {} + }, + "HyperLogLogPlusPlusUniqueCount": { + "fields": {} + } + } + } + } + } + } + } + } + }, + "v2": { + "options": { + "csharp_namespace": "Google.Cloud.Bigtable.V2", + "go_package": "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb", + "java_multiple_files": true, + "java_outer_classname": "ResponseParamsProto", + "java_package": "com.google.bigtable.v2", + "php_namespace": "Google\\Cloud\\Bigtable\\V2", + "ruby_package": "Google::Cloud::Bigtable::V2", + "(google.api.resource_definition).type": "bigtableadmin.googleapis.com/MaterializedView", + "(google.api.resource_definition).pattern": "projects/{project}/instances/{instance}/materializedViews/{materialized_view}" + }, + "nested": { + "Bigtable": { + "options": { + "(google.api.default_host)": "bigtable.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" + }, + "methods": { + "ReadRows": { + "requestType": "ReadRowsRequest", + "responseType": "ReadRowsResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:readRows", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:readRows", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "materialized_view_name", + "(google.api.routing).routing_parameters.path_template": "{name=projects/*/instances/*}/**", + "(google.api.method_signature)": "table_name,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:readRows", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows", + "body": "*" + }, + { + "post": "/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:readRows", + "body": "*" + } + ] + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "table_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}" + }, + { + "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}/**" + }, + { + "field": "materialized_view_name", + "path_template": "{name=projects/*/instances/*}/**" + } + ] + } + }, + { + "(google.api.method_signature)": "table_name" + }, + { + "(google.api.method_signature)": "table_name,app_profile_id" + } + ] + }, + "SampleRowKeys": { + "requestType": "SampleRowKeysRequest", + "responseType": "SampleRowKeysResponse", + "responseStream": true, + "options": { + "(google.api.http).get": "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys", + "(google.api.http).additional_bindings.get": "/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:sampleRowKeys", + "(google.api.routing).routing_parameters.field": "materialized_view_name", + "(google.api.routing).routing_parameters.path_template": "{name=projects/*/instances/*}/**", + "(google.api.method_signature)": "table_name,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys", + "additional_bindings": [ + { + "get": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys" + }, + { + "get": "/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:sampleRowKeys" + } + ] + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "table_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}" + }, + { + "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}/**" + }, + { + "field": "materialized_view_name", + "path_template": "{name=projects/*/instances/*}/**" + } + ] + } + }, + { + "(google.api.method_signature)": "table_name" + }, + { + "(google.api.method_signature)": "table_name,app_profile_id" + } + ] + }, + "MutateRow": { + "requestType": "MutateRowRequest", + "responseType": "MutateRowResponse", + "options": { + "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}/**", + "(google.api.method_signature)": "table_name,row_key,mutations,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow", + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow", + "body": "*" + } + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "table_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}" + }, + { + "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}/**" + } + ] + } + }, + { + "(google.api.method_signature)": "table_name,row_key,mutations" + }, + { + "(google.api.method_signature)": "table_name,row_key,mutations,app_profile_id" + } + ] + }, + "MutateRows": { + "requestType": "MutateRowsRequest", + "responseType": "MutateRowsResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}/**", + "(google.api.method_signature)": "table_name,entries,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows", + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows", + "body": "*" + } + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "table_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}" + }, + { + "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}/**" + } + ] + } + }, + { + "(google.api.method_signature)": "table_name,entries" + }, + { + "(google.api.method_signature)": "table_name,entries,app_profile_id" + } + ] + }, + "CheckAndMutateRow": { + "requestType": "CheckAndMutateRowRequest", + "responseType": "CheckAndMutateRowResponse", + "options": { + "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}/**", + "(google.api.method_signature)": "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow", + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow", + "body": "*" + } + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "table_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}" + }, + { + "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}/**" + } + ] + } + }, + { + "(google.api.method_signature)": "table_name,row_key,predicate_filter,true_mutations,false_mutations" + }, + { + "(google.api.method_signature)": "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id" + } + ] + }, + "PingAndWarm": { + "requestType": "PingAndWarmRequest", + "responseType": "PingAndWarmResponse", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/instances/*}:ping", + "(google.api.http).body": "*", + "(google.api.routing).routing_parameters.field": "app_profile_id", + "(google.api.routing).routing_parameters.path_template": "{name=projects/*/instances/*}", + "(google.api.method_signature)": "name,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*}:ping", + "body": "*" + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "name", + "path_template": "{name=projects/*/instances/*}" + }, + { + "field": "app_profile_id" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.api.method_signature)": "name,app_profile_id" + } + ] + }, + "ReadModifyWriteRow": { + "requestType": "ReadModifyWriteRowRequest", + "responseType": "ReadModifyWriteRowResponse", + "options": { + "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}/**", + "(google.api.method_signature)": "table_name,row_key,rules,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow", + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow", + "body": "*" + } + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "table_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}" + }, + { + "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{table_name=projects/*/instances/*/tables/*}/**" + } + ] + } + }, + { + "(google.api.method_signature)": "table_name,row_key,rules" + }, + { + "(google.api.method_signature)": "table_name,row_key,rules,app_profile_id" + } + ] + }, + "GenerateInitialChangeStreamPartitions": { + "requestType": "GenerateInitialChangeStreamPartitionsRequest", + "responseType": "GenerateInitialChangeStreamPartitionsResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions", + "(google.api.http).body": "*", + "(google.api.method_signature)": "table_name,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions", + "body": "*" + } + }, + { + "(google.api.method_signature)": "table_name" + }, + { + "(google.api.method_signature)": "table_name,app_profile_id" + } + ] + }, + "ReadChangeStream": { + "requestType": "ReadChangeStreamRequest", + "responseType": "ReadChangeStreamResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream", + "(google.api.http).body": "*", + "(google.api.method_signature)": "table_name,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream", + "body": "*" + } + }, + { + "(google.api.method_signature)": "table_name" + }, + { + "(google.api.method_signature)": "table_name,app_profile_id" + } + ] + }, + "PrepareQuery": { + "requestType": "PrepareQueryRequest", + "responseType": "PrepareQueryResponse", + "options": { + "(google.api.http).post": "/v2/{instance_name=projects/*/instances/*}:prepareQuery", + "(google.api.http).body": "*", + "(google.api.routing).routing_parameters.field": "app_profile_id", + "(google.api.routing).routing_parameters.path_template": "{name=projects/*/instances/*}", + "(google.api.method_signature)": "instance_name,query,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{instance_name=projects/*/instances/*}:prepareQuery", + "body": "*" + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "instance_name", + "path_template": "{name=projects/*/instances/*}" + }, + { + "field": "app_profile_id" + } + ] + } + }, + { + "(google.api.method_signature)": "instance_name,query" + }, + { + "(google.api.method_signature)": "instance_name,query,app_profile_id" + } + ] + }, + "ExecuteQuery": { + "requestType": "ExecuteQueryRequest", + "responseType": "ExecuteQueryResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v2/{instance_name=projects/*/instances/*}:executeQuery", + "(google.api.http).body": "*", + "(google.api.routing).routing_parameters.field": "app_profile_id", + "(google.api.routing).routing_parameters.path_template": "{name=projects/*/instances/*}", + "(google.api.method_signature)": "instance_name,query,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{instance_name=projects/*/instances/*}:executeQuery", + "body": "*" + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "instance_name", + "path_template": "{name=projects/*/instances/*}" + }, + { + "field": "app_profile_id" + } + ] + } + }, + { + "(google.api.method_signature)": "instance_name,query" + }, + { + "(google.api.method_signature)": "instance_name,query,app_profile_id" + } + ] + }, + "GetClientConfiguration": { + "requestType": "GetClientConfigurationRequest", + "responseType": "ClientConfiguration" + }, + "OpenTable": { + "requestType": "SessionRequest", + "requestStream": true, + "responseType": "SessionResponse", + "responseStream": true, + "options": { + "(google.bigtable.v2.rpc_session_type)": "SESSION_TYPE_TABLE" + }, + "parsedOptions": [ + { + "(google.bigtable.v2.rpc_session_type)": "SESSION_TYPE_TABLE" + } + ] + }, + "OpenAuthorizedView": { + "requestType": "SessionRequest", + "requestStream": true, + "responseType": "SessionResponse", + "responseStream": true, + "options": { + "(google.bigtable.v2.rpc_session_type)": "SESSION_TYPE_AUTHORIZED_VIEW" + }, + "parsedOptions": [ + { + "(google.bigtable.v2.rpc_session_type)": "SESSION_TYPE_AUTHORIZED_VIEW" + } + ] + }, + "OpenMaterializedView": { + "requestType": "SessionRequest", + "requestStream": true, + "responseType": "SessionResponse", + "responseStream": true, + "options": { + "(google.bigtable.v2.rpc_session_type)": "SESSION_TYPE_MATERIALIZED_VIEW" + }, + "parsedOptions": [ + { + "(google.bigtable.v2.rpc_session_type)": "SESSION_TYPE_MATERIALIZED_VIEW" + } + ] + } + } + }, + "ReadRowsRequest": { + "fields": { + "tableName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "authorizedViewName": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "materializedViewName": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/MaterializedView" + } + }, + "appProfileId": { + "type": "string", + "id": 5 + }, + "rows": { + "type": "RowSet", + "id": 2 + }, + "filter": { + "type": "RowFilter", + "id": 3 + }, + "rowsLimit": { + "type": "int64", + "id": 4 + }, + "requestStatsView": { + "type": "RequestStatsView", + "id": 6 + }, + "reversed": { + "type": "bool", + "id": 7 + } + }, + "nested": { + "RequestStatsView": { + "values": { + "REQUEST_STATS_VIEW_UNSPECIFIED": 0, + "REQUEST_STATS_NONE": 1, + "REQUEST_STATS_FULL": 2 + } + } + } + }, + "ReadRowsResponse": { + "fields": { + "chunks": { + "rule": "repeated", + "type": "CellChunk", + "id": 1 + }, + "lastScannedRowKey": { + "type": "bytes", + "id": 2 + }, + "requestStats": { + "type": "RequestStats", + "id": 3 + } + }, + "nested": { + "CellChunk": { + "oneofs": { + "rowStatus": { + "oneof": [ + "resetRow", + "commitRow" + ] + } + }, + "fields": { + "rowKey": { + "type": "bytes", + "id": 1 + }, + "familyName": { + "type": "google.protobuf.StringValue", + "id": 2 + }, + "qualifier": { + "type": "google.protobuf.BytesValue", + "id": 3 + }, + "timestampMicros": { + "type": "int64", + "id": 4 + }, + "labels": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "value": { + "type": "bytes", + "id": 6 + }, + "valueSize": { + "type": "int32", + "id": 7 + }, + "resetRow": { + "type": "bool", + "id": 8 + }, + "commitRow": { + "type": "bool", + "id": 9 + } + } + } + } + }, + "SampleRowKeysRequest": { + "fields": { + "tableName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "authorizedViewName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "materializedViewName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/MaterializedView" + } + }, + "appProfileId": { + "type": "string", + "id": 2 + }, + "rowRange": { + "type": "RowRange", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SampleRowKeysResponse": { + "fields": { + "rowKey": { + "type": "bytes", + "id": 1 + }, + "offsetBytes": { + "type": "int64", + "id": 2 + } + } + }, + "MutateRowRequest": { + "fields": { + "tableName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "authorizedViewName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "appProfileId": { + "type": "string", + "id": 4 + }, + "rowKey": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mutations": { + "rule": "repeated", + "type": "Mutation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "idempotency": { + "type": "Idempotency", + "id": 8 + } + } + }, + "MutateRowResponse": { + "fields": {} + }, + "MutateRowsRequest": { + "fields": { + "tableName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "authorizedViewName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "appProfileId": { + "type": "string", + "id": 3 + }, + "entries": { + "rule": "repeated", + "type": "Entry", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Entry": { + "fields": { + "rowKey": { + "type": "bytes", + "id": 1 + }, + "mutations": { + "rule": "repeated", + "type": "Mutation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "idempotency": { + "type": "Idempotency", + "id": 3 + } + } + } + } + }, + "MutateRowsResponse": { + "oneofs": { + "_rateLimitInfo": { + "oneof": [ + "rateLimitInfo" + ] + } + }, + "fields": { + "entries": { + "rule": "repeated", + "type": "Entry", + "id": 1 + }, + "rateLimitInfo": { + "type": "RateLimitInfo", + "id": 3, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Entry": { + "fields": { + "index": { + "type": "int64", + "id": 1 + }, + "status": { + "type": "google.rpc.Status", + "id": 2 + } + } + } + } + }, + "RateLimitInfo": { + "fields": { + "period": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "factor": { + "type": "double", + "id": 2 + } + } + }, + "CheckAndMutateRowRequest": { + "fields": { + "tableName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "authorizedViewName": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "appProfileId": { + "type": "string", + "id": 7 + }, + "rowKey": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "predicateFilter": { + "type": "RowFilter", + "id": 6 + }, + "trueMutations": { + "rule": "repeated", + "type": "Mutation", + "id": 4 + }, + "falseMutations": { + "rule": "repeated", + "type": "Mutation", + "id": 5 + } + } + }, + "CheckAndMutateRowResponse": { + "fields": { + "predicateMatched": { + "type": "bool", + "id": 1 + } + } + }, + "PingAndWarmRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "appProfileId": { + "type": "string", + "id": 2 + } + } + }, + "PingAndWarmResponse": { + "fields": {} + }, + "ReadModifyWriteRowRequest": { + "fields": { + "tableName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "authorizedViewName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "appProfileId": { + "type": "string", + "id": 4 + }, + "rowKey": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rules": { + "rule": "repeated", + "type": "ReadModifyWriteRule", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReadModifyWriteRowResponse": { + "fields": { + "row": { + "type": "Row", + "id": 1 + } + } + }, + "GenerateInitialChangeStreamPartitionsRequest": { + "fields": { + "tableName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "appProfileId": { + "type": "string", + "id": 2 + } + } + }, + "GenerateInitialChangeStreamPartitionsResponse": { + "fields": { + "partition": { + "type": "StreamPartition", + "id": 1 + } + } + }, + "ReadChangeStreamRequest": { + "oneofs": { + "startFrom": { + "oneof": [ + "startTime", + "continuationTokens" + ] + } + }, + "fields": { + "tableName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" + } + }, + "appProfileId": { + "type": "string", + "id": 2 + }, + "partition": { + "type": "StreamPartition", + "id": 3 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "continuationTokens": { + "type": "StreamContinuationTokens", + "id": 6 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "heartbeatDuration": { + "type": "google.protobuf.Duration", + "id": 7 + } + } + }, + "ReadChangeStreamResponse": { + "oneofs": { + "streamRecord": { + "oneof": [ + "dataChange", + "heartbeat", + "closeStream" + ] + } + }, + "fields": { + "dataChange": { + "type": "DataChange", + "id": 1 + }, + "heartbeat": { + "type": "Heartbeat", + "id": 2 + }, + "closeStream": { + "type": "CloseStream", + "id": 3 + } + }, + "nested": { + "MutationChunk": { + "fields": { + "chunkInfo": { + "type": "ChunkInfo", + "id": 1 + }, + "mutation": { + "type": "Mutation", + "id": 2 + } + }, + "nested": { + "ChunkInfo": { + "fields": { + "chunkedValueSize": { + "type": "int32", + "id": 1 + }, + "chunkedValueOffset": { + "type": "int32", + "id": 2 + }, + "lastChunk": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "DataChange": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "sourceClusterId": { + "type": "string", + "id": 2 + }, + "rowKey": { + "type": "bytes", + "id": 3 + }, + "commitTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "tiebreaker": { + "type": "int32", + "id": 5 + }, + "chunks": { + "rule": "repeated", + "type": "MutationChunk", + "id": 6 + }, + "done": { + "type": "bool", + "id": 8 + }, + "token": { + "type": "string", + "id": 9 + }, + "estimatedLowWatermark": { + "type": "google.protobuf.Timestamp", + "id": 10 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "USER": 1, + "GARBAGE_COLLECTION": 2, + "CONTINUATION": 3 + } + } + } + }, + "Heartbeat": { + "fields": { + "continuationToken": { + "type": "StreamContinuationToken", + "id": 1 + }, + "estimatedLowWatermark": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "CloseStream": { + "fields": { + "status": { + "type": "google.rpc.Status", + "id": 1 + }, + "continuationTokens": { + "rule": "repeated", + "type": "StreamContinuationToken", + "id": 2 + }, + "newPartitions": { + "rule": "repeated", + "type": "StreamPartition", + "id": 3 + } + } + } + } + }, + "ExecuteQueryRequest": { + "oneofs": { + "dataFormat": { + "oneof": [ + "protoFormat" + ] + } + }, + "fields": { + "instanceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "appProfileId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "query": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "preparedQuery": { + "type": "bytes", + "id": 9 + }, + "protoFormat": { + "type": "ProtoFormat", + "id": 4, + "options": { + "deprecated": true + } + }, + "resumeToken": { + "type": "bytes", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "params": { + "keyType": "string", + "type": "Value", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "viewParameters": { + "keyType": "string", + "type": "Value", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExecuteQueryResponse": { + "oneofs": { + "response": { + "oneof": [ + "metadata", + "results" + ] + } + }, + "fields": { + "metadata": { + "type": "ResultSetMetadata", + "id": 1 + }, + "results": { + "type": "PartialResultSet", + "id": 2 + } + } + }, + "PrepareQueryRequest": { + "oneofs": { + "dataFormat": { + "oneof": [ + "protoFormat" + ] + } + }, + "fields": { + "instanceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "appProfileId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "query": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protoFormat": { + "type": "ProtoFormat", + "id": 4 + }, + "paramTypes": { + "keyType": "string", + "type": "Type", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PrepareQueryResponse": { + "fields": { + "metadata": { + "type": "ResultSetMetadata", + "id": 1 + }, + "preparedQuery": { + "type": "bytes", + "id": 2 + }, + "validUntil": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "Row": { + "fields": { + "key": { + "type": "bytes", + "id": 1 + }, + "families": { + "rule": "repeated", + "type": "Family", + "id": 2 + } + } + }, + "Family": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "columns": { + "rule": "repeated", + "type": "Column", + "id": 2 + } + } + }, + "Column": { + "fields": { + "qualifier": { + "type": "bytes", + "id": 1 + }, + "cells": { + "rule": "repeated", + "type": "Cell", + "id": 2 + } + } + }, + "Cell": { + "fields": { + "timestampMicros": { + "type": "int64", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + }, + "labels": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "rawValue", + "rawTimestampMicros", + "bytesValue", + "stringValue", + "intValue", + "boolValue", + "floatValue", + "timestampValue", + "dateValue", + "arrayValue" + ] + } + }, + "fields": { + "type": { + "type": "Type", + "id": 7 + }, + "rawValue": { + "type": "bytes", + "id": 8 + }, + "rawTimestampMicros": { + "type": "int64", + "id": 9 + }, + "bytesValue": { + "type": "bytes", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "intValue": { + "type": "int64", + "id": 6 + }, + "boolValue": { + "type": "bool", + "id": 10 + }, + "floatValue": { + "type": "double", + "id": 11 + }, + "timestampValue": { + "type": "google.protobuf.Timestamp", + "id": 12 + }, + "dateValue": { + "type": "google.type.Date", + "id": 13 + }, + "arrayValue": { + "type": "ArrayValue", + "id": 4 + } + } + }, + "ArrayValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "RowRange": { + "oneofs": { + "startKey": { + "oneof": [ + "startKeyClosed", + "startKeyOpen" + ] + }, + "endKey": { + "oneof": [ + "endKeyOpen", + "endKeyClosed" + ] + } + }, + "fields": { + "startKeyClosed": { + "type": "bytes", + "id": 1 + }, + "startKeyOpen": { + "type": "bytes", + "id": 2 + }, + "endKeyOpen": { + "type": "bytes", + "id": 3 + }, + "endKeyClosed": { + "type": "bytes", + "id": 4 + } + } + }, + "RowSet": { + "fields": { + "rowKeys": { + "rule": "repeated", + "type": "bytes", + "id": 1 + }, + "rowRanges": { + "rule": "repeated", + "type": "RowRange", + "id": 2 + } + } + }, + "ColumnRange": { + "oneofs": { + "startQualifier": { + "oneof": [ + "startQualifierClosed", + "startQualifierOpen" + ] + }, + "endQualifier": { + "oneof": [ + "endQualifierClosed", + "endQualifierOpen" + ] + } + }, + "fields": { + "familyName": { + "type": "string", + "id": 1 + }, + "startQualifierClosed": { + "type": "bytes", + "id": 2 + }, + "startQualifierOpen": { + "type": "bytes", + "id": 3 + }, + "endQualifierClosed": { + "type": "bytes", + "id": 4 + }, + "endQualifierOpen": { + "type": "bytes", + "id": 5 + } + } + }, + "TimestampRange": { + "fields": { + "startTimestampMicros": { + "type": "int64", + "id": 1 + }, + "endTimestampMicros": { + "type": "int64", + "id": 2 + } + } + }, + "ValueRange": { + "oneofs": { + "startValue": { + "oneof": [ + "startValueClosed", + "startValueOpen" + ] + }, + "endValue": { + "oneof": [ + "endValueClosed", + "endValueOpen" + ] + } + }, + "fields": { + "startValueClosed": { + "type": "bytes", + "id": 1 + }, + "startValueOpen": { + "type": "bytes", + "id": 2 + }, + "endValueClosed": { + "type": "bytes", + "id": 3 + }, + "endValueOpen": { + "type": "bytes", + "id": 4 + } + } + }, + "ValueBitmask": { + "fields": { + "mask": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RowFilter": { + "oneofs": { + "filter": { + "oneof": [ + "chain", + "interleave", + "condition", + "sink", + "passAllFilter", + "blockAllFilter", + "rowKeyRegexFilter", + "rowSampleFilter", + "familyNameRegexFilter", + "columnQualifierRegexFilter", + "columnRangeFilter", + "timestampRangeFilter", + "valueRegexFilter", + "valueRangeFilter", + "cellsPerRowOffsetFilter", + "cellsPerRowLimitFilter", + "cellsPerColumnLimitFilter", + "stripValueTransformer", + "applyLabelTransformer", + "valueBitmaskFilter" + ] + } + }, + "fields": { + "chain": { + "type": "Chain", + "id": 1 + }, + "interleave": { + "type": "Interleave", + "id": 2 + }, + "condition": { + "type": "Condition", + "id": 3 + }, + "sink": { + "type": "bool", + "id": 16 + }, + "passAllFilter": { + "type": "bool", + "id": 17 + }, + "blockAllFilter": { + "type": "bool", + "id": 18 + }, + "rowKeyRegexFilter": { + "type": "bytes", + "id": 4 + }, + "rowSampleFilter": { + "type": "double", + "id": 14 + }, + "familyNameRegexFilter": { + "type": "string", + "id": 5 + }, + "columnQualifierRegexFilter": { + "type": "bytes", + "id": 6 + }, + "columnRangeFilter": { + "type": "ColumnRange", + "id": 7 + }, + "timestampRangeFilter": { + "type": "TimestampRange", + "id": 8 + }, + "valueRegexFilter": { + "type": "bytes", + "id": 9 + }, + "valueRangeFilter": { + "type": "ValueRange", + "id": 15 + }, + "cellsPerRowOffsetFilter": { + "type": "int32", + "id": 10 + }, + "cellsPerRowLimitFilter": { + "type": "int32", + "id": 11 + }, + "cellsPerColumnLimitFilter": { + "type": "int32", + "id": 12 + }, + "stripValueTransformer": { + "type": "bool", + "id": 13 + }, + "applyLabelTransformer": { + "type": "string", + "id": 19 + }, + "valueBitmaskFilter": { + "type": "ValueBitmask", + "id": 20 + } + }, + "nested": { + "Chain": { + "fields": { + "filters": { + "rule": "repeated", + "type": "RowFilter", + "id": 1 + } + } + }, + "Interleave": { + "fields": { + "filters": { + "rule": "repeated", + "type": "RowFilter", + "id": 1 + } + } + }, + "Condition": { + "fields": { + "predicateFilter": { + "type": "RowFilter", + "id": 1 + }, + "trueFilter": { + "type": "RowFilter", + "id": 2 + }, + "falseFilter": { + "type": "RowFilter", + "id": 3 + } + } + } + } + }, + "Mutation": { + "oneofs": { + "mutation": { + "oneof": [ + "setCell", + "addToCell", + "mergeToCell", + "deleteFromColumn", + "deleteFromFamily", + "deleteFromRow" + ] + } + }, + "fields": { + "setCell": { + "type": "SetCell", + "id": 1 + }, + "addToCell": { + "type": "AddToCell", + "id": 5 + }, + "mergeToCell": { + "type": "MergeToCell", + "id": 6 + }, + "deleteFromColumn": { + "type": "DeleteFromColumn", + "id": 2 + }, + "deleteFromFamily": { + "type": "DeleteFromFamily", + "id": 3 + }, + "deleteFromRow": { + "type": "DeleteFromRow", + "id": 4 + } + }, + "nested": { + "SetCell": { + "fields": { + "familyName": { + "type": "string", + "id": 1 + }, + "columnQualifier": { + "type": "bytes", + "id": 2 + }, + "timestampMicros": { + "type": "int64", + "id": 3 + }, + "value": { + "type": "bytes", + "id": 4 + } + } + }, + "AddToCell": { + "fields": { + "familyName": { + "type": "string", + "id": 1 + }, + "columnQualifier": { + "type": "Value", + "id": 2 + }, + "timestamp": { + "type": "Value", + "id": 3 + }, + "input": { + "type": "Value", + "id": 4 + } + } + }, + "MergeToCell": { + "fields": { + "familyName": { + "type": "string", + "id": 1 + }, + "columnQualifier": { + "type": "Value", + "id": 2 + }, + "timestamp": { + "type": "Value", + "id": 3 + }, + "input": { + "type": "Value", + "id": 4 + } + } + }, + "DeleteFromColumn": { + "fields": { + "familyName": { + "type": "string", + "id": 1 + }, + "columnQualifier": { + "type": "bytes", + "id": 2 + }, + "timeRange": { + "type": "TimestampRange", + "id": 3 + } + } + }, + "DeleteFromFamily": { + "fields": { + "familyName": { + "type": "string", + "id": 1 + } + } + }, + "DeleteFromRow": { + "fields": {} + } + } + }, + "ReadModifyWriteRule": { + "oneofs": { + "rule": { + "oneof": [ + "appendValue", + "incrementAmount" + ] + } + }, + "fields": { + "familyName": { + "type": "string", + "id": 1 + }, + "columnQualifier": { + "type": "bytes", + "id": 2 + }, + "appendValue": { + "type": "bytes", + "id": 3 + }, + "incrementAmount": { + "type": "int64", + "id": 4 + } + } + }, + "StreamPartition": { + "fields": { + "rowRange": { + "type": "RowRange", + "id": 1 + } + } + }, + "StreamContinuationTokens": { + "fields": { + "tokens": { + "rule": "repeated", + "type": "StreamContinuationToken", + "id": 1 + } + } + }, + "StreamContinuationToken": { + "fields": { + "partition": { + "type": "StreamPartition", + "id": 1 + }, + "token": { + "type": "string", + "id": 2 + } + } + }, + "ProtoFormat": { + "fields": {} + }, + "ColumnMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + } + } + }, + "ProtoSchema": { + "fields": { + "columns": { + "rule": "repeated", + "type": "ColumnMetadata", + "id": 1 + } + } + }, + "ResultSetMetadata": { + "oneofs": { + "schema": { + "oneof": [ + "protoSchema" + ] + } + }, + "fields": { + "protoSchema": { + "type": "ProtoSchema", + "id": 1 + } + } + }, + "ProtoRows": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 2 + } + } + }, + "ProtoRowsBatch": { + "fields": { + "batchData": { + "type": "bytes", + "id": 1 + } + } + }, + "PartialResultSet": { + "oneofs": { + "partialRows": { + "oneof": [ + "protoRowsBatch" + ] + }, + "_batchChecksum": { + "oneof": [ + "batchChecksum" + ] + } + }, + "fields": { + "protoRowsBatch": { + "type": "ProtoRowsBatch", + "id": 3 + }, + "batchChecksum": { + "type": "uint32", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "resumeToken": { + "type": "bytes", + "id": 5 + }, + "reset": { + "type": "bool", + "id": 7 + }, + "estimatedBatchSize": { + "type": "int32", + "id": 4 + } + } + }, + "Idempotency": { + "fields": { + "token": { + "type": "bytes", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "Type": { + "oneofs": { + "kind": { + "oneof": [ + "bytesType", + "stringType", + "int64Type", + "float32Type", + "float64Type", + "boolType", + "timestampType", + "dateType", + "aggregateType", + "structType", + "arrayType", + "mapType", + "protoType", + "enumType" + ] + } + }, + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1 + }, + "stringType": { + "type": "String", + "id": 2 + }, + "int64Type": { + "type": "Int64", + "id": 5 + }, + "float32Type": { + "type": "Float32", + "id": 12 + }, + "float64Type": { + "type": "Float64", + "id": 9 + }, + "boolType": { + "type": "Bool", + "id": 8 + }, + "timestampType": { + "type": "Timestamp", + "id": 10 + }, + "dateType": { + "type": "Date", + "id": 11 + }, + "aggregateType": { + "type": "Aggregate", + "id": 6 + }, + "structType": { + "type": "Struct", + "id": 7 + }, + "arrayType": { + "type": "Array", + "id": 3 + }, + "mapType": { + "type": "Map", + "id": 4 + }, + "protoType": { + "type": "Proto", + "id": 13 + }, + "enumType": { + "type": "Enum", + "id": 14 + } + }, + "nested": { + "Bytes": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "raw" + ] + } + }, + "fields": { + "raw": { + "type": "Raw", + "id": 1 + } + }, + "nested": { + "Raw": { + "fields": { + "escapeNulls": { + "type": "bool", + "id": 1 + } + } + } + } + } + } + }, + "String": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "utf8Raw", + "utf8Bytes" + ] + } + }, + "fields": { + "utf8Raw": { + "type": "Utf8Raw", + "id": 1, + "options": { + "deprecated": true + } + }, + "utf8Bytes": { + "type": "Utf8Bytes", + "id": 2 + } + }, + "nested": { + "Utf8Raw": { + "options": { + "deprecated": true + }, + "fields": {} + }, + "Utf8Bytes": { + "fields": { + "nullEscapeChar": { + "type": "string", + "id": 1 + } + } + } + } + } + } + }, + "Int64": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "bigEndianBytes", + "orderedCodeBytes" + ] + } + }, + "fields": { + "bigEndianBytes": { + "type": "BigEndianBytes", + "id": 1 + }, + "orderedCodeBytes": { + "type": "OrderedCodeBytes", + "id": 2 + } + }, + "nested": { + "BigEndianBytes": { + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1, + "options": { + "deprecated": true + } + } + } + }, + "OrderedCodeBytes": { + "fields": {} + } + } + } + } + }, + "Bool": { + "fields": {} + }, + "Float32": { + "fields": {} + }, + "Float64": { + "fields": {} + }, + "Timestamp": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "unixMicrosInt64" + ] + } + }, + "fields": { + "unixMicrosInt64": { + "type": "Int64.Encoding", + "id": 1 + } + } + } + } + }, + "Date": { + "fields": {} + }, + "Struct": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1 + }, + "encoding": { + "type": "Encoding", + "id": 2 + } + }, + "nested": { + "Field": { + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + } + } + }, + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "singleton", + "delimitedBytes", + "orderedCodeBytes" + ] + } + }, + "fields": { + "singleton": { + "type": "Singleton", + "id": 1 + }, + "delimitedBytes": { + "type": "DelimitedBytes", + "id": 2 + }, + "orderedCodeBytes": { + "type": "OrderedCodeBytes", + "id": 3 + } + }, + "nested": { + "Singleton": { + "fields": {} + }, + "DelimitedBytes": { + "fields": { + "delimiter": { + "type": "bytes", + "id": 1 + } + } + }, + "OrderedCodeBytes": { + "fields": {} + } + } + } + } + }, + "Proto": { + "fields": { + "schemaBundleId": { + "type": "string", + "id": 1 + }, + "messageName": { + "type": "string", + "id": 2 + } + } + }, + "Enum": { + "fields": { + "schemaBundleId": { + "type": "string", + "id": 1 + }, + "enumName": { + "type": "string", + "id": 2 + } + } + }, + "Array": { + "fields": { + "elementType": { + "type": "Type", + "id": 1 + } + } + }, + "Map": { + "fields": { + "keyType": { + "type": "Type", + "id": 1 + }, + "valueType": { + "type": "Type", + "id": 2 + } + } + }, + "Aggregate": { + "oneofs": { + "aggregator": { + "oneof": [ + "sum", + "hllppUniqueCount", + "max", + "min" + ] + } + }, + "fields": { + "inputType": { + "type": "Type", + "id": 1 + }, + "stateType": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sum": { + "type": "Sum", + "id": 4 + }, + "hllppUniqueCount": { + "type": "HyperLogLogPlusPlusUniqueCount", + "id": 5 + }, + "max": { + "type": "Max", + "id": 6 + }, + "min": { + "type": "Min", + "id": 7 + } + }, + "nested": { + "Sum": { + "fields": {} + }, + "Max": { + "fields": {} + }, + "Min": { + "fields": {} + }, + "HyperLogLogPlusPlusUniqueCount": { + "fields": {} + } + } + } + } + }, + "ReadIterationStats": { + "fields": { + "rowsSeenCount": { + "type": "int64", + "id": 1 + }, + "rowsReturnedCount": { + "type": "int64", + "id": 2 + }, + "cellsSeenCount": { + "type": "int64", + "id": 3 + }, + "cellsReturnedCount": { + "type": "int64", + "id": 4 + } + } + }, + "RequestLatencyStats": { + "fields": { + "frontendServerLatency": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "FullReadStatsView": { + "fields": { + "readIterationStats": { + "type": "ReadIterationStats", + "id": 1 + }, + "requestLatencyStats": { + "type": "RequestLatencyStats", + "id": 2 + } + } + }, + "RequestStats": { + "oneofs": { + "statsView": { + "oneof": [ + "fullReadStatsView" + ] + } + }, + "fields": { + "fullReadStatsView": { + "type": "FullReadStatsView", + "id": 1 + } + } + }, + "openSessionType": { + "type": "google.bigtable.v2.SessionType", + "id": 138898474, + "extend": "google.protobuf.MessageOptions" + }, + "vrpcSessionType": { + "rule": "repeated", + "type": "google.bigtable.v2.SessionType", + "id": 138899157, + "extend": "google.protobuf.MessageOptions" + }, + "rpcSessionType": { + "type": "google.bigtable.v2.SessionType", + "id": 137964804, + "extend": "google.protobuf.MethodOptions" + }, + "SessionType": { + "values": { + "SESSION_TYPE_UNSET": 0, + "SESSION_TYPE_TABLE": 1, + "SESSION_TYPE_AUTHORIZED_VIEW": 2, + "SESSION_TYPE_MATERIALIZED_VIEW": 3, + "SESSION_TYPE_TEST": 9999 + } + }, + "GetClientConfigurationRequest": { + "fields": { + "instanceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "appProfileId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "LoadBalancingOptions": { + "oneofs": { + "loadBalancingStrategy": { + "oneof": [ + "leastInFlight", + "peakEwma", + "random" + ] + } + }, + "fields": { + "leastInFlight": { + "type": "LeastInFlight", + "id": 1 + }, + "peakEwma": { + "type": "PeakEwma", + "id": 2 + }, + "random": { + "type": "Random", + "id": 4 + } + }, + "nested": { + "LeastInFlight": { + "fields": { + "randomSubsetSize": { + "type": "int64", + "id": 1 + } + } + }, + "PeakEwma": { + "fields": { + "randomSubsetSize": { + "type": "int64", + "id": 1 + } + } + }, + "Random": { + "fields": {} + } + } + }, + "SessionClientConfiguration": { + "fields": { + "sessionLoad": { + "type": "float", + "id": 1 + }, + "loadBalancingOptions": { + "type": "LoadBalancingOptions", + "id": 2, + "options": { + "deprecated": true + } + }, + "channelConfiguration": { + "type": "ChannelPoolConfiguration", + "id": 3 + }, + "sessionPoolConfiguration": { + "type": "SessionPoolConfiguration", + "id": 4 + } + }, + "nested": { + "ChannelPoolConfiguration": { + "oneofs": { + "mode": { + "oneof": [ + "directAccessWithFallback", + "directAccessOnly", + "cloudPathOnly" + ] + } + }, + "fields": { + "minServerCount": { + "type": "int32", + "id": 1 + }, + "maxServerCount": { + "type": "int32", + "id": 2 + }, + "perServerSessionCount": { + "type": "int32", + "id": 3 + }, + "directAccessWithFallback": { + "type": "DirectAccessWithFallback", + "id": 4 + }, + "directAccessOnly": { + "type": "DirectAccessOnly", + "id": 5 + }, + "cloudPathOnly": { + "type": "CloudPathOnly", + "id": 6 + } + }, + "nested": { + "DirectAccessWithFallback": { + "fields": { + "errorRateThreshold": { + "type": "float", + "id": 1 + }, + "checkInterval": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "DirectAccessOnly": { + "fields": {} + }, + "CloudPathOnly": { + "fields": {} + } + } + }, + "SessionPoolConfiguration": { + "fields": { + "headroom": { + "type": "float", + "id": 1 + }, + "minSessionCount": { + "type": "int32", + "id": 2 + }, + "maxSessionCount": { + "type": "int32", + "id": 3 + }, + "newSessionQueueLength": { + "type": "int32", + "id": 4 + }, + "newSessionCreationBudget": { + "type": "int32", + "id": 5 + }, + "newSessionCreationPenalty": { + "type": "google.protobuf.Duration", + "id": 6 + }, + "consecutiveSessionFailureThreshold": { + "type": "int32", + "id": 8 + }, + "loadBalancingOptions": { + "type": "LoadBalancingOptions", + "id": 9 + } + } + } + } + }, + "TelemetryConfiguration": { + "fields": { + "debugTagLevel": { + "type": "Level", + "id": 1 + } + }, + "nested": { + "Level": { + "values": { + "LEVEL_UNSPECIFIED": 0, + "DEBUG": 1, + "INFO": 2, + "WARN": 3, + "ERROR": 4 + } + } + } + }, + "ClientConfiguration": { + "oneofs": { + "polling": { + "oneof": [ + "stopPolling", + "pollingInterval", + "pollingConfiguration" + ] + } + }, + "fields": { + "sessionConfiguration": { + "type": "SessionClientConfiguration", + "id": 2 + }, + "stopPolling": { + "type": "bool", + "id": 3 + }, + "pollingInterval": { + "type": "google.protobuf.Duration", + "id": 4, + "options": { + "deprecated": true + } + }, + "pollingConfiguration": { + "type": "PollingConfiguration", + "id": 5 + }, + "telemetryConfiguration": { + "type": "TelemetryConfiguration", + "id": 6 + } + }, + "nested": { + "PollingConfiguration": { + "fields": { + "pollingInterval": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "validityDuration": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "maxRpcRetryCount": { + "type": "int32", + "id": 6 + } + } + } + } + }, + "SessionRequest": { + "oneofs": { + "payload": { + "oneof": [ + "openSession", + "closeSession", + "virtualRpc" + ] + } + }, + "fields": { + "openSession": { + "type": "OpenSessionRequest", + "id": 1 + }, + "closeSession": { + "type": "CloseSessionRequest", + "id": 2 + }, + "virtualRpc": { + "type": "VirtualRpcRequest", + "id": 3 + } + } + }, + "SessionResponse": { + "oneofs": { + "payload": { + "oneof": [ + "openSession", + "virtualRpc", + "error", + "sessionParameters", + "heartbeat", + "goAway", + "sessionRefreshConfig" + ] + } + }, + "fields": { + "openSession": { + "type": "OpenSessionResponse", + "id": 1 + }, + "virtualRpc": { + "type": "VirtualRpcResponse", + "id": 2 + }, + "error": { + "type": "ErrorResponse", + "id": 3 + }, + "sessionParameters": { + "type": "SessionParametersResponse", + "id": 4 + }, + "heartbeat": { + "type": "HeartbeatResponse", + "id": 5 + }, + "goAway": { + "type": "GoAwayResponse", + "id": 6 + }, + "sessionRefreshConfig": { + "type": "SessionRefreshConfig", + "id": 7 + } + } + }, + "OpenSessionRequest": { + "fields": { + "protocolVersion": { + "type": "int64", + "id": 1 + }, + "flags": { + "type": "FeatureFlags", + "id": 2 + }, + "consecutiveFailedConnectionAttempts": { + "type": "int64", + "id": 3 + }, + "routingCookie": { + "type": "bytes", + "id": 4 + }, + "payload": { + "type": "bytes", + "id": 5 + } + } + }, + "BackendIdentifier": { + "fields": { + "googleFrontendId": { + "type": "int64", + "id": 1 + }, + "applicationFrontendId": { + "type": "int64", + "id": 2 + }, + "applicationFrontendZone": { + "type": "string", + "id": 3 + } + } + }, + "OpenSessionResponse": { + "fields": { + "backend": { + "type": "BackendIdentifier", + "id": 2 + }, + "payload": { + "type": "bytes", + "id": 1 + } + } + }, + "CloseSessionRequest": { + "fields": { + "reason": { + "type": "CloseSessionReason", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + } + }, + "nested": { + "CloseSessionReason": { + "values": { + "CLOSE_SESSION_REASON_UNSET": 0, + "CLOSE_SESSION_REASON_GOAWAY": 1, + "CLOSE_SESSION_REASON_ERROR": 2, + "CLOSE_SESSION_REASON_USER": 3, + "CLOSE_SESSION_REASON_DOWNSIZE": 4, + "CLOSE_SESSION_REASON_MISSED_HEARTBEAT": 5 + } + } + } + }, + "OpenTableRequest": { + "options": { + "(google.bigtable.v2.open_session_type)": "SESSION_TYPE_TABLE" + }, + "fields": { + "tableName": { + "type": "string", + "id": 1 + }, + "appProfileId": { + "type": "string", + "id": 2 + }, + "permission": { + "type": "Permission", + "id": 3 + } + }, + "nested": { + "Permission": { + "values": { + "PERMISSION_UNSET": 0, + "PERMISSION_READ": 1, + "PERMISSION_WRITE": 2, + "PERMISSION_READ_WRITE": 3 + } + } + } + }, + "OpenTableResponse": { + "options": { + "(google.bigtable.v2.open_session_type)": "SESSION_TYPE_TABLE" + }, + "fields": {} + }, + "OpenAuthorizedViewRequest": { + "options": { + "(google.bigtable.v2.open_session_type)": "SESSION_TYPE_AUTHORIZED_VIEW" + }, + "fields": { + "authorizedViewName": { + "type": "string", + "id": 1 + }, + "appProfileId": { + "type": "string", + "id": 2 + }, + "permission": { + "type": "Permission", + "id": 3 + } + }, + "nested": { + "Permission": { + "values": { + "PERMISSION_UNSET": 0, + "PERMISSION_READ": 1, + "PERMISSION_WRITE": 2, + "PERMISSION_READ_WRITE": 3 + } + } + } + }, + "OpenAuthorizedViewResponse": { + "options": { + "(google.bigtable.v2.open_session_type)": "SESSION_TYPE_AUTHORIZED_VIEW" + }, + "fields": {} + }, + "OpenMaterializedViewRequest": { + "options": { + "(google.bigtable.v2.open_session_type)": "SESSION_TYPE_MATERIALIZED_VIEW" + }, + "fields": { + "materializedViewName": { + "type": "string", + "id": 1 + }, + "appProfileId": { + "type": "string", + "id": 2 + }, + "permission": { + "type": "Permission", + "id": 3 + } + }, + "nested": { + "Permission": { + "values": { + "PERMISSION_UNSET": 0, + "PERMISSION_READ": 1 + } + } + } + }, + "OpenMaterializedViewResponse": { + "options": { + "(google.bigtable.v2.open_session_type)": "SESSION_TYPE_MATERIALIZED_VIEW" + }, + "fields": {} + }, + "VirtualRpcRequest": { + "fields": { + "rpcId": { + "type": "int64", + "id": 1 + }, + "deadline": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "metadata": { + "type": "Metadata", + "id": 3 + }, + "payload": { + "type": "bytes", + "id": 4 + } + }, + "nested": { + "Metadata": { + "fields": { + "attemptNumber": { + "type": "int64", + "id": 1 + }, + "attemptStart": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "traceparent": { + "type": "string", + "id": 3 + } + } + } + } + }, + "ClusterInformation": { + "fields": { + "clusterId": { + "type": "string", + "id": 1 + }, + "zoneId": { + "type": "string", + "id": 2 + } + } + }, + "SessionRequestStats": { + "fields": { + "backendLatency": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "VirtualRpcResponse": { + "fields": { + "rpcId": { + "type": "int64", + "id": 1 + }, + "clusterInfo": { + "type": "ClusterInformation", + "id": 2 + }, + "stats": { + "type": "SessionRequestStats", + "id": 4 + }, + "payload": { + "type": "bytes", + "id": 3 + } + } + }, + "ErrorResponse": { + "fields": { + "rpcId": { + "type": "int64", + "id": 1 + }, + "clusterInfo": { + "type": "ClusterInformation", + "id": 2 + }, + "status": { + "type": "google.rpc.Status", + "id": 3 + }, + "retryInfo": { + "type": "google.rpc.RetryInfo", + "id": 4 + } + } + }, + "TableRequest": { + "options": { + "(google.bigtable.v2.vrpc_session_type)": "SESSION_TYPE_TABLE" + }, + "oneofs": { + "payload": { + "oneof": [ + "readRow", + "mutateRow" + ] + } + }, + "fields": { + "readRow": { + "type": "SessionReadRowRequest", + "id": 1 + }, + "mutateRow": { + "type": "SessionMutateRowRequest", + "id": 2 + } + } + }, + "TableResponse": { + "options": { + "(google.bigtable.v2.vrpc_session_type)": "SESSION_TYPE_TABLE" + }, + "oneofs": { + "payload": { + "oneof": [ + "readRow", + "mutateRow" + ] + } + }, + "fields": { + "readRow": { + "type": "SessionReadRowResponse", + "id": 1 + }, + "mutateRow": { + "type": "SessionMutateRowResponse", + "id": 2 + } + } + }, + "AuthorizedViewRequest": { + "options": { + "(google.bigtable.v2.vrpc_session_type)": "SESSION_TYPE_AUTHORIZED_VIEW" + }, + "oneofs": { + "payload": { + "oneof": [ + "readRow", + "mutateRow" + ] + } + }, + "fields": { + "readRow": { + "type": "SessionReadRowRequest", + "id": 1 + }, + "mutateRow": { + "type": "SessionMutateRowRequest", + "id": 2 + } + } + }, + "AuthorizedViewResponse": { + "options": { + "(google.bigtable.v2.vrpc_session_type)": "SESSION_TYPE_AUTHORIZED_VIEW" + }, + "oneofs": { + "payload": { + "oneof": [ + "readRow", + "mutateRow" + ] + } + }, + "fields": { + "readRow": { + "type": "SessionReadRowResponse", + "id": 1 + }, + "mutateRow": { + "type": "SessionMutateRowResponse", + "id": 2 + } + } + }, + "MaterializedViewRequest": { + "options": { + "(google.bigtable.v2.vrpc_session_type)": "SESSION_TYPE_MATERIALIZED_VIEW" + }, + "oneofs": { + "payload": { + "oneof": [ + "readRow" + ] + } + }, + "fields": { + "readRow": { + "type": "SessionReadRowRequest", + "id": 1 + } + } + }, + "MaterializedViewResponse": { + "options": { + "(google.bigtable.v2.vrpc_session_type)": "SESSION_TYPE_MATERIALIZED_VIEW" + }, + "oneofs": { + "payload": { + "oneof": [ + "readRow" + ] + } + }, + "fields": { + "readRow": { + "type": "SessionReadRowResponse", + "id": 1 + } + } + }, + "SessionReadRowRequest": { + "fields": { + "key": { + "type": "bytes", + "id": 1 + }, + "filter": { + "type": "RowFilter", + "id": 2 + } + } + }, + "SessionReadRowResponse": { + "fields": { + "row": { + "type": "Row", + "id": 1 + }, + "stats": { + "type": "RequestStats", + "id": 2 + } + } + }, + "SessionMutateRowRequest": { + "fields": { + "key": { + "type": "bytes", + "id": 1 + }, + "mutations": { + "rule": "repeated", + "type": "Mutation", + "id": 2 + } + } + }, + "SessionMutateRowResponse": { + "fields": {} + }, + "SessionParametersResponse": { + "fields": { + "keepAlive": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "HeartbeatResponse": { + "fields": {} + }, + "GoAwayResponse": { + "fields": { + "reason": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "lastRpcIdAdmitted": { + "type": "int64", + "id": 3 + } + } + }, + "SessionRefreshConfig": { + "fields": { + "optimizedOpenRequest": { + "type": "OpenSessionRequest", + "id": 1 + }, + "metadata": { + "rule": "repeated", + "type": "Metadata", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Metadata": { + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "value": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "FeatureFlags": { + "fields": { + "reverseScans": { + "type": "bool", + "id": 1 + }, + "mutateRowsRateLimit": { + "type": "bool", + "id": 3 + }, + "mutateRowsRateLimit2": { + "type": "bool", + "id": 5 + }, + "lastScannedRowResponses": { + "type": "bool", + "id": 4 + }, + "routingCookie": { + "type": "bool", + "id": 6 + }, + "retryInfo": { + "type": "bool", + "id": 7 + }, + "clientSideMetricsEnabled": { + "type": "bool", + "id": 8 + }, + "trafficDirectorEnabled": { + "type": "bool", + "id": 9 + }, + "directAccessRequested": { + "type": "bool", + "id": 10 + }, + "peerInfo": { + "type": "bool", + "id": 11 + }, + "sessionsCompatible": { + "type": "bool", + "id": 12 + }, + "sessionsRequired": { + "type": "bool", + "id": 13 + } + } + }, + "PeerInfo": { + "fields": { + "googleFrontendId": { + "type": "int64", + "id": 1 + }, + "applicationFrontendId": { + "type": "int64", + "id": 2 + }, + "applicationFrontendRegion": { + "type": "string", + "id": 6 + }, + "applicationFrontendZone": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "applicationFrontendSubzone": { + "type": "string", + "id": 4 + }, + "transportType": { + "type": "TransportType", + "id": 5 + } + }, + "nested": { + "TransportType": { + "values": { + "TRANSPORT_TYPE_UNKNOWN": 0, + "TRANSPORT_TYPE_EXTERNAL": 1, + "TRANSPORT_TYPE_CLOUD_PATH": 2, + "TRANSPORT_TYPE_DIRECT_ACCESS": 3, + "TRANSPORT_TYPE_SESSION_UNKNOWN": 4, + "TRANSPORT_TYPE_SESSION_EXTERNAL": 5, + "TRANSPORT_TYPE_SESSION_CLOUD_PATH": 6, + "TRANSPORT_TYPE_SESSION_DIRECT_ACCESS": 7 + } + } + } + }, + "ResponseParams": { + "oneofs": { + "_zoneId": { + "oneof": [ + "zoneId" + ] + }, + "_clusterId": { + "oneof": [ + "clusterId" + ] + }, + "_afeId": { + "oneof": [ + "afeId" + ] + } + }, + "fields": { + "zoneId": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "clusterId": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "afeId": { + "type": "int64", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "RoutingProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI" + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 + } + } + }, + "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 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "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 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "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, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, + "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", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "routing": { + "type": "google.api.RoutingRule", + "id": 72295729, + "extend": "google.protobuf.MethodOptions" + }, + "RoutingRule": { + "fields": { + "routingParameters": { + "rule": "repeated", + "type": "RoutingParameter", + "id": 2 + } + } + }, + "RoutingParameter": { + "fields": { + "field": { + "type": "string", + "id": 1 + }, + "pathTemplate": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + }, + "reserved": [ + [ + 4, + 4 + ], + "stream" + ] + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + "php_generic_services", + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false, + "deprecated": true + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "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 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } + } + }, + "extensions": [ + [ + 1000, + 9994 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + }, + "reserved": [ + [ + 1, + 1 + ] + ] + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "overridableFeatures": { + "type": "FeatureSet", + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 + } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1", + "cc_enable_arenas": true + }, + "nested": { + "IAMPolicy": { + "options": { + "(google.api.default_host)": "iam-meta-api.googleapis.com" + }, + "methods": { + "SetIamPolicy": { + "requestType": "SetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "GetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "TestIamPermissionsRequest", + "responseType": "TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] + } + } + }, + "SetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "policy": { + "type": "Policy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "options": { + "type": "GetPolicyOptions", + "id": 2 + } + } + }, + "TestIamPermissionsRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "permissions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TestIamPermissionsResponse": { + "fields": { + "permissions": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "GetPolicyOptions": { + "fields": { + "requestedPolicyVersion": { + "type": "int32", + "id": 1 + } + } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/date;date", + "java_multiple_files": true, + "java_outer_classname": "DateProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP", + "cc_enable_arenas": true + }, + "nested": { + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + }, + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails", + "java_multiple_files": true, + "java_outer_classname": "ErrorDetailsProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + }, + "ErrorInfo": { + "fields": { + "reason": { + "type": "string", + "id": 1 + }, + "domain": { + "type": "string", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + } + } + }, + "RetryInfo": { + "fields": { + "retryDelay": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "DebugInfo": { + "fields": { + "stackEntries": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "detail": { + "type": "string", + "id": 2 + } + } + }, + "QuotaFailure": { + "fields": { + "violations": { + "rule": "repeated", + "type": "Violation", + "id": 1 + } + }, + "nested": { + "Violation": { + "oneofs": { + "_futureQuotaValue": { + "oneof": [ + "futureQuotaValue" + ] + } + }, + "fields": { + "subject": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "apiService": { + "type": "string", + "id": 3 + }, + "quotaMetric": { + "type": "string", + "id": 4 + }, + "quotaId": { + "type": "string", + "id": 5 + }, + "quotaDimensions": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "quotaValue": { + "type": "int64", + "id": 7 + }, + "futureQuotaValue": { + "type": "int64", + "id": 8, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "PreconditionFailure": { + "fields": { + "violations": { + "rule": "repeated", + "type": "Violation", + "id": 1 + } + }, + "nested": { + "Violation": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "subject": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + } + } + } + }, + "BadRequest": { + "fields": { + "fieldViolations": { + "rule": "repeated", + "type": "FieldViolation", + "id": 1 + } + }, + "nested": { + "FieldViolation": { + "fields": { + "field": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "reason": { + "type": "string", + "id": 3 + }, + "localizedMessage": { + "type": "LocalizedMessage", + "id": 4 + } + } + } + } + }, + "RequestInfo": { + "fields": { + "requestId": { + "type": "string", + "id": 1 + }, + "servingData": { + "type": "string", + "id": 2 + } + } + }, + "ResourceInfo": { + "fields": { + "resourceType": { + "type": "string", + "id": 1 + }, + "resourceName": { + "type": "string", + "id": 2 + }, + "owner": { + "type": "string", + "id": 3 + }, + "description": { + "type": "string", + "id": 4 + } + } + }, + "Help": { + "fields": { + "links": { + "rule": "repeated", + "type": "Link", + "id": 1 + } + }, + "nested": { + "Link": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "url": { + "type": "string", + "id": 2 + } + } + } + } + }, + "LocalizedMessage": { + "fields": { + "locale": { + "type": "string", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.check_and_mutate_row.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.check_and_mutate_row.js new file mode 100644 index 000000000000..201005bb33e6 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.check_and_mutate_row.js @@ -0,0 +1,104 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(rowKey) { + // [START bigtable_v2_generated_Bigtable_CheckAndMutateRow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + */ + // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + */ + // const appProfileId = 'abc123' + /** + * Required. The key of the row to which the conditional mutation should be + * applied. + */ + // const rowKey = Buffer.from('string') + /** + * The filter to be applied to the contents of the specified row. Depending + * on whether or not any results are yielded, either `true_mutations` or + * `false_mutations` will be executed. If unset, checks that the row contains + * any values at all. + */ + // const predicateFilter = {} + /** + * Changes to be atomically applied to the specified row if `predicate_filter` + * yields at least one cell when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `false_mutations` is empty, and at most + * 100000. + */ + // const trueMutations = [1,2,3,4] + /** + * Changes to be atomically applied to the specified row if `predicate_filter` + * does not yield any cells when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `true_mutations` is empty, and at most + * 100000. + */ + // const falseMutations = [1,2,3,4] + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callCheckAndMutateRow() { + // Construct request + const request = { + rowKey, + }; + + // Run request + const response = await bigtableClient.checkAndMutateRow(request); + console.log(response); + } + + callCheckAndMutateRow(); + // [END bigtable_v2_generated_Bigtable_CheckAndMutateRow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.execute_query.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.execute_query.js new file mode 100644 index 000000000000..404b0bbab1df --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.execute_query.js @@ -0,0 +1,133 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(instanceName, query, params) { + // [START bigtable_v2_generated_Bigtable_ExecuteQuery_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + */ + // const instanceName = 'abc123' + /** + * Optional. This value specifies routing for replication. If not specified, + * the `default` application profile will be used. + */ + // const appProfileId = 'abc123' + /** + * Required. The query string. + * Exactly one of `query` and `prepared_query` is required. Setting both + * or neither is an `INVALID_ARGUMENT`. + */ + // const query = 'abc123' + /** + * A prepared query that was returned from `PrepareQueryResponse`. + * Exactly one of `query` and `prepared_query` is required. Setting both + * or neither is an `INVALID_ARGUMENT`. + * Setting this field also places restrictions on several other fields: + * - `data_format` must be empty. + * - `validate_only` must be false. + * - `params` must match the `param_types` set in the `PrepareQueryRequest`. + */ + // const preparedQuery = Buffer.from('string') + /** + * Protocol buffer format as described by ProtoSchema and ProtoRows + * messages. + */ + // const protoFormat = {} + /** + * Optional. If this request is resuming a previously interrupted query + * execution, `resume_token` should be copied from the last + * PartialResultSet yielded before the interruption. Doing this + * enables the query execution to resume where the last one left + * off. + * The rest of the request parameters must exactly match the + * request that yielded this token. Otherwise the request will fail. + */ + // const resumeToken = Buffer.from('string') + /** + * Required. params contains string type keys and Bigtable type values that + * bind to placeholders in the query string. In query string, a parameter + * placeholder consists of the + * `@` character followed by the parameter name (for example, `@firstName`) in + * the query string. + * For example, if + * `params"firstName" = bytes_value: "foo" type {bytes_type {}}` + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params"firstName" = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. + */ + // const params = [1,2,3,4] + /** + * Optional. This map provides the runtime values returned by the + * VIEW_PARAMETERS() function calls, typically used for user-level scoping of + * data based on identity. + * The key is the name of the view parameter e.g. `user_id`, and + * the value is the parameter value e.g. `alice@example.com`. + */ + // const viewParameters = [1,2,3,4] + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callExecuteQuery() { + // Construct request + const request = { + instanceName, + query, + params, + }; + + // Run request + const stream = await bigtableClient.executeQuery(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callExecuteQuery(); + // [END bigtable_v2_generated_Bigtable_ExecuteQuery_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js new file mode 100644 index 000000000000..ea7e5e7613a2 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(tableName) { + // [START bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table from which to get change stream + * partitions. Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + */ + // const tableName = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + */ + // const appProfileId = 'abc123' + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callGenerateInitialChangeStreamPartitions() { + // Construct request + const request = { + tableName, + }; + + // Run request + const stream = await bigtableClient.generateInitialChangeStreamPartitions(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callGenerateInitialChangeStreamPartitions(); + // [END bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.mutate_row.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.mutate_row.js new file mode 100644 index 000000000000..1e2358eda1ea --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.mutate_row.js @@ -0,0 +1,92 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(rowKey, mutations) { + // [START bigtable_v2_generated_Bigtable_MutateRow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + */ + // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + */ + // const appProfileId = 'abc123' + /** + * Required. The key of the row to which the mutation should be applied. + */ + // const rowKey = Buffer.from('string') + /** + * Required. Changes to be atomically applied to the specified row. Entries + * are applied in order, meaning that earlier mutations can be masked by later + * ones. Must contain at least one entry and at most 100000. + */ + // const mutations = [1,2,3,4] + /** + * If set consistently across retries, prevents this mutation from being + * double applied to aggregate column families within a 15m window. + */ + // const idempotency = {} + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callMutateRow() { + // Construct request + const request = { + rowKey, + mutations, + }; + + // Run request + const response = await bigtableClient.mutateRow(request); + console.log(response); + } + + callMutateRow(); + // [END bigtable_v2_generated_Bigtable_MutateRow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.mutate_rows.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.mutate_rows.js new file mode 100644 index 000000000000..d74bb67c19e7 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.mutate_rows.js @@ -0,0 +1,86 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(entries) { + // [START bigtable_v2_generated_Bigtable_MutateRows_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. The unique name of the table to which the mutations should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + */ + // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + */ + // const appProfileId = 'abc123' + /** + * Required. The row keys and corresponding mutations to be applied in bulk. + * Each entry is applied as an atomic mutation, but the entries may be + * applied in arbitrary order (even between entries for the same row). + * At least one entry must be specified, and in total the entries can + * contain at most 100000 mutations. + */ + // const entries = [1,2,3,4] + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callMutateRows() { + // Construct request + const request = { + entries, + }; + + // Run request + const stream = await bigtableClient.mutateRows(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callMutateRows(); + // [END bigtable_v2_generated_Bigtable_MutateRows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.ping_and_warm.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.ping_and_warm.js new file mode 100644 index 000000000000..8f0b22e290dc --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.ping_and_warm.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtable_v2_generated_Bigtable_PingAndWarm_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance to check permissions for as well + * as respond. Values are of the form + * `projects//instances/`. + */ + // const name = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + */ + // const appProfileId = 'abc123' + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callPingAndWarm() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await bigtableClient.pingAndWarm(request); + console.log(response); + } + + callPingAndWarm(); + // [END bigtable_v2_generated_Bigtable_PingAndWarm_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.prepare_query.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.prepare_query.js new file mode 100644 index 000000000000..bf8d73d3f31c --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.prepare_query.js @@ -0,0 +1,93 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(instanceName, query, paramTypes) { + // [START bigtable_v2_generated_Bigtable_PrepareQuery_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + */ + // const instanceName = 'abc123' + /** + * Optional. This value specifies routing for preparing the query. Note that + * this `app_profile_id` is only used for preparing the query. The actual + * query execution will use the app profile specified in the + * `ExecuteQueryRequest`. If not specified, the `default` application profile + * will be used. + */ + // const appProfileId = 'abc123' + /** + * Required. The query string. + */ + // const query = 'abc123' + /** + * Protocol buffer format as described by ProtoSchema and ProtoRows + * messages. + */ + // const protoFormat = {} + /** + * Required. `param_types` is a map of parameter identifier strings to their + * `Type`s. + * In query string, a parameter placeholder consists of the + * `@` character followed by the parameter name (for example, `@firstName`) in + * the query string. + * For example, if param_types"firstName" = Bytes then @firstName will be a + * query parameter of type Bytes. The specific `Value` to be used for the + * query execution must be sent in `ExecuteQueryRequest` in the `params` map. + */ + // const paramTypes = [1,2,3,4] + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callPrepareQuery() { + // Construct request + const request = { + instanceName, + query, + paramTypes, + }; + + // Run request + const response = await bigtableClient.prepareQuery(request); + console.log(response); + } + + callPrepareQuery(); + // [END bigtable_v2_generated_Bigtable_PrepareQuery_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_change_stream.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_change_stream.js new file mode 100644 index 000000000000..fc53f2c17056 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_change_stream.js @@ -0,0 +1,106 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(tableName) { + // [START bigtable_v2_generated_Bigtable_ReadChangeStream_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table from which to read a change stream. + * Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + */ + // const tableName = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + */ + // const appProfileId = 'abc123' + /** + * The partition to read changes from. + */ + // const partition = {} + /** + * Start reading the stream at the specified timestamp. This timestamp must + * be within the change stream retention period, less than or equal to the + * current time, and after change stream creation, whichever is greater. + * This value is inclusive and will be truncated to microsecond granularity. + */ + // const startTime = {} + /** + * Tokens that describe how to resume reading a stream where reading + * previously left off. If specified, changes will be read starting at the + * the position. Tokens are delivered on the stream as part of `Heartbeat` + * and `CloseStream` messages. + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case + * of a partition merge, the union of the token partitions must exactly + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be + * returned. + */ + // const continuationTokens = {} + /** + * If specified, OK will be returned when the stream advances beyond + * this time. Otherwise, changes will be continuously delivered on the stream. + * This value is inclusive and will be truncated to microsecond granularity. + */ + // const endTime = {} + /** + * If specified, the duration between `Heartbeat` messages on the stream. + * Otherwise, defaults to 5 seconds. + */ + // const heartbeatDuration = {} + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callReadChangeStream() { + // Construct request + const request = { + tableName, + }; + + // Run request + const stream = await bigtableClient.readChangeStream(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callReadChangeStream(); + // [END bigtable_v2_generated_Bigtable_ReadChangeStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_modify_write_row.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_modify_write_row.js new file mode 100644 index 000000000000..f58df861a5f2 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_modify_write_row.js @@ -0,0 +1,89 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(rowKey, rules) { + // [START bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + */ + // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + */ + // const appProfileId = 'abc123' + /** + * Required. The key of the row to which the read/modify/write rules should be + * applied. + */ + // const rowKey = Buffer.from('string') + /** + * Required. Rules specifying how the specified row's contents are to be + * transformed into writes. Entries are applied in order, meaning that earlier + * rules will affect the results of later ones. At least one entry must be + * specified, and there can be at most 100000 rules. + */ + // const rules = [1,2,3,4] + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callReadModifyWriteRow() { + // Construct request + const request = { + rowKey, + rules, + }; + + // Run request + const response = await bigtableClient.readModifyWriteRow(request); + console.log(response); + } + + callReadModifyWriteRow(); + // [END bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_rows.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_rows.js new file mode 100644 index 000000000000..6b01bccd6bf0 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.read_rows.js @@ -0,0 +1,112 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START bigtable_v2_generated_Bigtable_ReadRows_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. The unique name of the table from which to read. + * Values are of the form + * `projects//instances//tables/
`. + */ + // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' + /** + * Optional. The unique name of the MaterializedView from which to read. + * Values are of the form + * `projects//instances//materializedViews/`. + */ + // const materializedViewName = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + */ + // const appProfileId = 'abc123' + /** + * The row keys and/or ranges to read sequentially. If not specified, reads + * from all rows. + */ + // const rows = {} + /** + * The filter to apply to the contents of the specified row(s). If unset, + * reads the entirety of each row. + */ + // const filter = {} + /** + * The read will stop after committing to N rows' worth of results. The + * default (zero) is to return all results. + */ + // const rowsLimit = 1234 + /** + * The view into RequestStats, as described above. + */ + // const requestStatsView = {} + /** + * Experimental API - Please note that this API is currently experimental + * and can change in the future. + * Return rows in lexiographical descending order of the row keys. The row + * contents will not be affected by this flag. + * Example result set: + * + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * + */ + // const reversed = true + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callReadRows() { + // Construct request + const request = { + }; + + // Run request + const stream = await bigtableClient.readRows(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callReadRows(); + // [END bigtable_v2_generated_Bigtable_ReadRows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.sample_row_keys.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.sample_row_keys.js new file mode 100644 index 000000000000..5e47bee8608d --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable.sample_row_keys.js @@ -0,0 +1,89 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START bigtable_v2_generated_Bigtable_SampleRowKeys_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. The unique name of the table from which to sample row keys. + * Values are of the form + * `projects//instances//tables/
`. + */ + // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' + /** + * Optional. The unique name of the MaterializedView from which to read. + * Values are of the form + * `projects//instances//materializedViews/`. + */ + // const materializedViewName = 'abc123' + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + */ + // const appProfileId = 'abc123' + /** + * Optional. The row range to sample. If not specified, samples + * from all rows. + * The output will always return the end key in the range as the last sample + * returned. + */ + // const rowRange = {} + + // Imports the Bigtable library + const {BigtableClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const bigtableClient = new BigtableClient(); + + async function callSampleRowKeys() { + // Construct request + const request = { + }; + + // Run request + const stream = await bigtableClient.sampleRowKeys(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callSampleRowKeys(); + // [END bigtable_v2_generated_Bigtable_SampleRowKeys_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_app_profile.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_app_profile.js new file mode 100644 index 000000000000..88a6e1ab9521 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_app_profile.js @@ -0,0 +1,79 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, appProfileId, appProfile) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance in which to create the new app + * profile. Values are of the form `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + */ + // const appProfileId = 'abc123' + /** + * Required. The app profile to be created. + * Fields marked `OutputOnly` will be ignored. + */ + // const appProfile = {} + /** + * If true, ignore safety checks when creating the app profile. + */ + // const ignoreWarnings = true + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callCreateAppProfile() { + // Construct request + const request = { + parent, + appProfileId, + appProfile, + }; + + // Run request + const response = await adminClient.createAppProfile(request); + console.log(response); + } + + callCreateAppProfile(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_cluster.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_cluster.js new file mode 100644 index 000000000000..ece420aacdc0 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_cluster.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, clusterId, cluster) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance in which to create the new + * cluster. Values are of the form `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + */ + // const clusterId = 'abc123' + /** + * Required. The cluster to be created. + * Fields marked `OutputOnly` must be left blank. + */ + // const cluster = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callCreateCluster() { + // Construct request + const request = { + parent, + clusterId, + cluster, + }; + + // Run request + const [operation] = await adminClient.createCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateCluster(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_instance.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_instance.js new file mode 100644 index 000000000000..a05b5b55c8a2 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_instance.js @@ -0,0 +1,84 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, instanceId, instance, clusters) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the project in which to create the new + * instance. Values are of the form `projects/{project}`. + */ + // const parent = 'abc123' + /** + * Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than + * `projects/myproject/instances/myinstance`. + */ + // const instanceId = 'abc123' + /** + * Required. The instance to create. + * Fields marked `OutputOnly` must be left blank. + */ + // const instance = {} + /** + * Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * Fields marked `OutputOnly` must be left blank. + */ + // const clusters = [1,2,3,4] + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callCreateInstance() { + // Construct request + const request = { + parent, + instanceId, + instance, + clusters, + }; + + // Run request + const [operation] = await adminClient.createInstance(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateInstance(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_logical_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_logical_view.js new file mode 100644 index 000000000000..3d2da84d8184 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_logical_view.js @@ -0,0 +1,74 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, logicalViewId, logicalView) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent instance where this logical view will be created. + * Format: `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * Required. The ID to use for the logical view, which will become the final + * component of the logical view's resource name. + */ + // const logicalViewId = 'abc123' + /** + * Required. The logical view to create. + */ + // const logicalView = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callCreateLogicalView() { + // Construct request + const request = { + parent, + logicalViewId, + logicalView, + }; + + // Run request + const [operation] = await adminClient.createLogicalView(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateLogicalView(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_materialized_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_materialized_view.js new file mode 100644 index 000000000000..2a25daa292af --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.create_materialized_view.js @@ -0,0 +1,74 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, materializedViewId, materializedView) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent instance where this materialized view will be created. + * Format: `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * Required. The ID to use for the materialized view, which will become the + * final component of the materialized view's resource name. + */ + // const materializedViewId = 'abc123' + /** + * Required. The materialized view to create. + */ + // const materializedView = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callCreateMaterializedView() { + // Construct request + const request = { + parent, + materializedViewId, + materializedView, + }; + + // Run request + const [operation] = await adminClient.createMaterializedView(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateMaterializedView(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js new file mode 100644 index 000000000000..1053270572e8 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, ignoreWarnings) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the app profile to be deleted. Values are of + * the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + */ + // const name = 'abc123' + /** + * Required. If true, ignore safety checks when deleting the app profile. + */ + // const ignoreWarnings = true + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callDeleteAppProfile() { + // Construct request + const request = { + name, + ignoreWarnings, + }; + + // Run request + const response = await adminClient.deleteAppProfile(request); + console.log(response); + } + + callDeleteAppProfile(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_cluster.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_cluster.js new file mode 100644 index 000000000000..cda89ea25659 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_cluster.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the cluster to be deleted. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callDeleteCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteCluster(request); + console.log(response); + } + + callDeleteCluster(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_instance.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_instance.js new file mode 100644 index 000000000000..d58ac0d80e48 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_instance.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance to be deleted. + * Values are of the form `projects/{project}/instances/{instance}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callDeleteInstance() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteInstance(request); + console.log(response); + } + + callDeleteInstance(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_logical_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_logical_view.js new file mode 100644 index 000000000000..0df940267523 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_logical_view.js @@ -0,0 +1,70 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the logical view to be deleted. + * Format: + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + */ + // const name = 'abc123' + /** + * Optional. The current etag of the logical view. + * If an etag is provided and does not match the current etag of the + * logical view, deletion will be blocked and an ABORTED error will be + * returned. + */ + // const etag = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callDeleteLogicalView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteLogicalView(request); + console.log(response); + } + + callDeleteLogicalView(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_materialized_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_materialized_view.js new file mode 100644 index 000000000000..5529c4c4f502 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.delete_materialized_view.js @@ -0,0 +1,70 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the materialized view to be deleted. + * Format: + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + */ + // const name = 'abc123' + /** + * Optional. The current etag of the materialized view. + * If an etag is provided and does not match the current etag of the + * materialized view, deletion will be blocked and an ABORTED error will be + * returned. + */ + // const etag = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callDeleteMaterializedView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteMaterializedView(request); + console.log(response); + } + + callDeleteMaterializedView(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_app_profile.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_app_profile.js new file mode 100644 index 000000000000..edb12c36d513 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_app_profile.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested app profile. Values are of the + * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callGetAppProfile() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAppProfile(request); + console.log(response); + } + + callGetAppProfile(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_cluster.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_cluster.js new file mode 100644 index 000000000000..11e02a6192f7 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_cluster.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callGetCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getCluster(request); + console.log(response); + } + + callGetCluster(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js new file mode 100644 index 000000000000..1a6abbc494cd --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + */ + // const options = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await adminClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_instance.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_instance.js new file mode 100644 index 000000000000..8d1d14f5cc41 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_instance.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested instance. Values are of the form + * `projects/{project}/instances/{instance}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callGetInstance() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getInstance(request); + console.log(response); + } + + callGetInstance(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_logical_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_logical_view.js new file mode 100644 index 000000000000..5989617aa01c --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_logical_view.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested logical view. Values are of the + * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callGetLogicalView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getLogicalView(request); + console.log(response); + } + + callGetLogicalView(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_materialized_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_materialized_view.js new file mode 100644 index 000000000000..06413f1e32b7 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.get_materialized_view.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested materialized view. Values are of + * the form + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callGetMaterializedView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getMaterializedView(request); + console.log(response); + } + + callGetMaterializedView(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js new file mode 100644 index 000000000000..f9ef9b105ea2 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. + */ + // const parent = 'abc123' + /** + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + */ + // const pageSize = 1234 + /** + * The value of `next_page_token` returned by a previous call. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callListAppProfiles() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listAppProfilesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAppProfiles(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_clusters.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_clusters.js new file mode 100644 index 000000000000..2f885d671a8a --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_clusters.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance for which a list of clusters is + * requested. Values are of the form + * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list + * Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + */ + // const parent = 'abc123' + /** + * DEPRECATED: This field is unused and ignored. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callListClusters() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await adminClient.listClusters(request); + console.log(response); + } + + callListClusters(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js new file mode 100644 index 000000000000..1befb1aa4697 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js @@ -0,0 +1,92 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + */ + // const parent = 'abc123' + /** + * The start time to list hot tablets. The hot tablets in the response will + * have start times between the requested start time and end time. Start time + * defaults to Now if it is unset, and end time defaults to Now - 24 hours if + * it is unset. The start time should be less than the end time, and the + * maximum allowed time range between start time and end time is 48 hours. + * Start time and end time should have values between Now and Now - 14 days. + */ + // const startTime = {} + /** + * The end time to list hot tablets. + */ + // const endTime = {} + /** + * Maximum number of results per page. + * A page_size that is empty or zero lets the server choose the number of + * items to return. A page_size which is strictly positive will return at most + * that many items. A negative page_size will cause an error. + * Following the first request, subsequent paginated calls do not need a + * page_size field. If a page_size is set in subsequent calls, it must match + * the page_size given in the first request. + */ + // const pageSize = 1234 + /** + * The value of `next_page_token` returned by a previous call. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callListHotTablets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listHotTabletsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListHotTablets(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_instances.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_instances.js new file mode 100644 index 000000000000..73d291a9b8ec --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_instances.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the project for which a list of instances is + * requested. Values are of the form `projects/{project}`. + */ + // const parent = 'abc123' + /** + * DEPRECATED: This field is unused and ignored. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callListInstances() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await adminClient.listInstances(request); + console.log(response); + } + + callListInstances(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_logical_views.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_logical_views.js new file mode 100644 index 000000000000..48b4b34daa3c --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_logical_views.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance for which the list of logical + * views is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of logical views to return. The service may + * return fewer than this value + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListLogicalViews` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListLogicalViews` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callListLogicalViews() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listLogicalViewsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLogicalViews(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_materialized_views.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_materialized_views.js new file mode 100644 index 000000000000..9695b83e15bb --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.list_materialized_views.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance for which the list of + * materialized views is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of materialized views to return. The service + * may return fewer than this value + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListMaterializedViews` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMaterializedViews` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callListMaterializedViews() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listMaterializedViewsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMaterializedViews(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js new file mode 100644 index 000000000000..fc20d12414b3 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(cluster, updateMask) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Cluster which contains the partial updates to be applied, + * subject to the update_mask. + */ + // const cluster = {} + /** + * Required. The subset of Cluster fields which should be replaced. + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callPartialUpdateCluster() { + // Construct request + const request = { + cluster, + updateMask, + }; + + // Run request + const [operation] = await adminClient.partialUpdateCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callPartialUpdateCluster(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js new file mode 100644 index 000000000000..11298562231d --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(instance, updateMask) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Instance which will (partially) replace the current value. + */ + // const instance = {} + /** + * Required. The subset of Instance fields which should be replaced. + * Must be explicitly set. + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callPartialUpdateInstance() { + // Construct request + const request = { + instance, + updateMask, + }; + + // Run request + const [operation] = await adminClient.partialUpdateInstance(request); + const [response] = await operation.promise(); + console.log(response); + } + + callPartialUpdateInstance(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js new file mode 100644 index 000000000000..b4f0f58bfb36 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await adminClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js new file mode 100644 index 000000000000..59abe4ed33f9 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, permissions) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = ['abc','def'] + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await adminClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_app_profile.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_app_profile.js new file mode 100644 index 000000000000..5ec9bef02400 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_app_profile.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(appProfile, updateMask) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The app profile which will (partially) replace the current value. + */ + // const appProfile = {} + /** + * Required. The subset of app profile fields which should be replaced. + * If unset, all fields will be replaced. + */ + // const updateMask = {} + /** + * If true, ignore safety checks when updating the app profile. + */ + // const ignoreWarnings = true + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callUpdateAppProfile() { + // Construct request + const request = { + appProfile, + updateMask, + }; + + // Run request + const [operation] = await adminClient.updateAppProfile(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAppProfile(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_cluster.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_cluster.js new file mode 100644 index 000000000000..056469d80725 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_cluster.js @@ -0,0 +1,101 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(location, state, nodeScalingFactor, defaultStorageType, encryptionConfig) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The unique name of the cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. + */ + // const name = 'abc123' + /** + * Immutable. The location where this cluster's nodes and storage reside. For + * best performance, clients should be located as close as possible to this + * cluster. Currently only zones are supported, so values should be of the + * form `projects/{project}/locations/{zone}`. + */ + // const location = 'abc123' + /** + * Output only. The current state of the cluster. + */ + // const state = {} + /** + * The number of nodes in the cluster. If no value is set, + * Cloud Bigtable automatically allocates nodes based on your data footprint + * and optimized for 50% storage utilization. + */ + // const serveNodes = 1234 + /** + * Immutable. The node scaling factor of this cluster. + */ + // const nodeScalingFactor = {} + /** + * Configuration for this cluster. + */ + // const clusterConfig = {} + /** + * Immutable. The type of storage used by this cluster to serve its + * parent instance's tables, unless explicitly overridden. + */ + // const defaultStorageType = {} + /** + * Immutable. The encryption configuration for CMEK-protected clusters. + */ + // const encryptionConfig = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callUpdateCluster() { + // Construct request + const request = { + location, + state, + nodeScalingFactor, + defaultStorageType, + encryptionConfig, + }; + + // Run request + const [operation] = await adminClient.updateCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateCluster(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_instance.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_instance.js new file mode 100644 index 000000000000..8e5cb0ce765d --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_instance.js @@ -0,0 +1,124 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(displayName, state, createTime, satisfiesPzs, satisfiesPzi, tags) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The unique name of the instance. Values are of the form + * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. + */ + // const name = 'abc123' + /** + * Required. The descriptive name for this instance as it appears in UIs. + * Can be changed at any time, but should be kept globally unique + * to avoid confusion. + */ + // const displayName = 'abc123' + /** + * Output only. The current state of the instance. + */ + // const state = {} + /** + * The type of the instance. Defaults to `PRODUCTION`. + */ + // const type = {} + /** + * Optional. The edition of the instance. See + * Edition google.bigtable.admin.v2.Instance.Edition for details. + */ + // const edition = {} + /** + * Labels are a flexible and lightweight mechanism for organizing cloud + * resources into groups that reflect a customer's organizational needs and + * deployment strategies. They can be used to filter resources and aggregate + * metrics. + * * Label keys must be between 1 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. + * * Keys and values must both be under 128 bytes. + */ + // const labels = [1,2,3,4] + /** + * Output only. A commit timestamp representing when this Instance was + * created. For instances created before this field was added (August 2021), + * this value is `seconds: 0, nanos: 1`. + */ + // const createTime = {} + /** + * Output only. Reserved for future use. + */ + // const satisfiesPzs = true + /** + * Output only. Reserved for future use. + */ + // const satisfiesPzi = true + /** + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * - "123/environment": "production", + * - "123/costCenter": "marketing" + * Tags and Labels (above) are both used to bind metadata to resources, with + * different use-cases. See + * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an + * in-depth overview on the difference between tags and labels. + */ + // const tags = [1,2,3,4] + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callUpdateInstance() { + // Construct request + const request = { + displayName, + state, + createTime, + satisfiesPzs, + satisfiesPzi, + tags, + }; + + // Run request + const response = await adminClient.updateInstance(request); + console.log(response); + } + + callUpdateInstance(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_logical_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_logical_view.js new file mode 100644 index 000000000000..bd10f1dc2b01 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_logical_view.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(logicalView) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The logical view to update. + * The logical view's `name` field is used to identify the view to update. + * Format: + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + */ + // const logicalView = {} + /** + * Optional. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callUpdateLogicalView() { + // Construct request + const request = { + logicalView, + }; + + // Run request + const [operation] = await adminClient.updateLogicalView(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateLogicalView(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_materialized_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_materialized_view.js new file mode 100644 index 000000000000..843c349bb9ff --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_instance_admin.update_materialized_view.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(materializedView) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The materialized view to update. + * The materialized view's `name` field is used to identify the view to + * update. Format: + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + */ + // const materializedView = {} + /** + * Optional. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callUpdateMaterializedView() { + // Construct request + const request = { + materializedView, + }; + + // Run request + const [operation] = await adminClient.updateMaterializedView(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateMaterializedView(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.check_consistency.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.check_consistency.js new file mode 100644 index 000000000000..af6f6cb1c638 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.check_consistency.js @@ -0,0 +1,80 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, consistencyToken) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the Table for which to check replication + * consistency. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const name = 'abc123' + /** + * Required. The token created using GenerateConsistencyToken for the Table. + */ + // const consistencyToken = 'abc123' + /** + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + */ + // const standardReadRemoteWrites = {} + /** + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. + */ + // const dataBoostReadLocalWrites = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callCheckConsistency() { + // Construct request + const request = { + name, + consistencyToken, + }; + + // Run request + const response = await adminClient.checkConsistency(request); + console.log(response); + } + + callCheckConsistency(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.copy_backup.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.copy_backup.js new file mode 100644 index 000000000000..9b5d8a7fa7df --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.copy_backup.js @@ -0,0 +1,94 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, backupId, sourceBackup, expireTime) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the destination cluster that will contain the backup + * copy. The cluster must already exist. Values are of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + */ + // const parent = 'abc123' + /** + * Required. The id of the new backup. The `backup_id` along with `parent` + * are combined as {parent}/backups/{backup_id} to create the full backup + * name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex _a-zA-Z0-9 -_.a-zA-Z0-9 *. + */ + // const backupId = 'abc123' + /** + * Required. The source backup to be copied from. + * The source backup needs to be in READY state for it to be copied. + * Copying a copied backup is not allowed. + * Once CopyBackup is in progress, the source backup cannot be deleted or + * cleaned up on expiration until CopyBackup is finished. + * Values are of the form: + * `projects//instances//clusters//backups/`. + */ + // const sourceBackup = 'abc123' + /** + * Required. Required. The expiration time of the copied backup with + * microsecond granularity that must be at least 6 hours and at most 30 days + * from the time the request is received. Once the `expire_time` has + * passed, Cloud Bigtable will delete the backup and free the resources used + * by the backup. + */ + // const expireTime = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callCopyBackup() { + // Construct request + const request = { + parent, + backupId, + sourceBackup, + expireTime, + }; + + // Run request + const [operation] = await adminClient.copyBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCopyBackup(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_authorized_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_authorized_view.js new file mode 100644 index 000000000000..b1ffd94c616c --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_authorized_view.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, authorizedViewId, authorizedView) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const parent = 'abc123' + /** + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + */ + // const authorizedViewId = 'abc123' + /** + * Required. The AuthorizedView to create. + */ + // const authorizedView = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callCreateAuthorizedView() { + // Construct request + const request = { + parent, + authorizedViewId, + authorizedView, + }; + + // Run request + const [operation] = await adminClient.createAuthorizedView(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAuthorizedView(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_backup.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_backup.js new file mode 100644 index 000000000000..b9d9b011010b --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_backup.js @@ -0,0 +1,79 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, backupId, backup) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. This must be one of the clusters in the instance in which this + * table is located. The backup will be stored in this cluster. Values are + * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + */ + // const parent = 'abc123' + /** + * Required. The id of the backup to be created. The `backup_id` along with + * the parent `parent` are combined as {parent}/backups/{backup_id} to create + * the full backup name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex _a-zA-Z0-9 -_.a-zA-Z0-9 *. + */ + // const backupId = 'abc123' + /** + * Required. The backup to create. + */ + // const backup = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callCreateBackup() { + // Construct request + const request = { + parent, + backupId, + backup, + }; + + // Run request + const [operation] = await adminClient.createBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackup(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_schema_bundle.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_schema_bundle.js new file mode 100644 index 000000000000..0e7c0ac3b927 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_schema_bundle.js @@ -0,0 +1,75 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, schemaBundleId, schemaBundle) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this schema bundle will be created. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const parent = 'abc123' + /** + * Required. The unique ID to use for the schema bundle, which will become the + * final component of the schema bundle's resource name. + */ + // const schemaBundleId = 'abc123' + /** + * Required. The schema bundle to create. + */ + // const schemaBundle = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callCreateSchemaBundle() { + // Construct request + const request = { + parent, + schemaBundleId, + schemaBundle, + }; + + // Run request + const [operation] = await adminClient.createSchemaBundle(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateSchemaBundle(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_table.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_table.js new file mode 100644 index 000000000000..79d6b09b8a4b --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_table.js @@ -0,0 +1,91 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, tableId, table) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * Maximum 50 characters. + */ + // const tableId = 'abc123' + /** + * Required. The Table to create. + */ + // const table = {} + /** + * The optional list of row keys that will be used to initially split the + * table into several tablets (tablets are similar to HBase regions). + * Given two split keys, `s1` and `s2`, three tablets will be created, + * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. + * Example: + * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` + * `"other", "zz"` + * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` + * * Key assignment: + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` + */ + // const initialSplits = [1,2,3,4] + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callCreateTable() { + // Construct request + const request = { + parent, + tableId, + table, + }; + + // Run request + const response = await adminClient.createTable(request); + console.log(response); + } + + callCreateTable(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js new file mode 100644 index 000000000000..5d2ba1830cb6 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, tableId, sourceSnapshot) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + */ + // const tableId = 'abc123' + /** + * Required. The unique name of the snapshot from which to restore the table. + * The snapshot and the table must be in the same instance. Values are of the + * form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + */ + // const sourceSnapshot = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callCreateTableFromSnapshot() { + // Construct request + const request = { + parent, + tableId, + sourceSnapshot, + }; + + // Run request + const [operation] = await adminClient.createTableFromSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateTableFromSnapshot(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js new file mode 100644 index 000000000000..bb112f82c252 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js @@ -0,0 +1,70 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + */ + // const name = 'abc123' + /** + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + */ + // const etag = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callDeleteAuthorizedView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteAuthorizedView(request); + console.log(response); + } + + callDeleteAuthorizedView(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_backup.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_backup.js new file mode 100644 index 000000000000..c2828c7d7e33 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_backup.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the backup to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callDeleteBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteBackup(request); + console.log(response); + } + + callDeleteBackup(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_schema_bundle.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_schema_bundle.js new file mode 100644 index 000000000000..441d12dd85e9 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_schema_bundle.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the schema bundle to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + */ + // const name = 'abc123' + /** + * Optional. The etag of the schema bundle. + * If this is provided, it must match the server's etag. The server + * returns an ABORTED error on a mismatched etag. + */ + // const etag = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callDeleteSchemaBundle() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteSchemaBundle(request); + console.log(response); + } + + callDeleteSchemaBundle(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_snapshot.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_snapshot.js new file mode 100644 index 000000000000..adc4bc653386 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_snapshot.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the snapshot to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callDeleteSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteSnapshot(request); + console.log(response); + } + + callDeleteSnapshot(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_table.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_table.js new file mode 100644 index 000000000000..8d6fd94de04a --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.delete_table.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callDeleteTable() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteTable(request); + console.log(response); + } + + callDeleteTable(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.drop_row_range.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.drop_row_range.js new file mode 100644 index 000000000000..4a278767b8b5 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.drop_row_range.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table on which to drop a range of rows. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const name = 'abc123' + /** + * Delete all rows that start with this row key prefix. Prefix cannot be + * zero length. + */ + // const rowKeyPrefix = Buffer.from('string') + /** + * Delete all rows in the table. Setting this to false is a no-op. + */ + // const deleteAllDataFromTable = true + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callDropRowRange() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.dropRowRange(request); + console.log(response); + } + + callDropRowRange(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js new file mode 100644 index 000000000000..83e487c3a871 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the Table for which to create a consistency + * token. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callGenerateConsistencyToken() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.generateConsistencyToken(request); + console.log(response); + } + + callGenerateConsistencyToken(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_authorized_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_authorized_view.js new file mode 100644 index 000000000000..f00eaaf08813 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_authorized_view.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + */ + // const name = 'abc123' + /** + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + */ + // const view = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callGetAuthorizedView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAuthorizedView(request); + console.log(response); + } + + callGetAuthorizedView(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_backup.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_backup.js new file mode 100644 index 000000000000..e9a605990bff --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_backup.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the backup. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callGetBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getBackup(request); + console.log(response); + } + + callGetBackup(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_iam_policy.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_iam_policy.js new file mode 100644 index 000000000000..470a49d725ed --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + */ + // const options = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await adminClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_schema_bundle.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_schema_bundle.js new file mode 100644 index 000000000000..7cad4a36f800 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_schema_bundle.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the schema bundle to retrieve. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callGetSchemaBundle() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getSchemaBundle(request); + console.log(response); + } + + callGetSchemaBundle(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_snapshot.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_snapshot.js new file mode 100644 index 000000000000..e0def27d38a6 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_snapshot.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callGetSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getSnapshot(request); + console.log(response); + } + + callGetSnapshot(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_table.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_table.js new file mode 100644 index 000000000000..a32784eaf6e0 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.get_table.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested table. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const name = 'abc123' + /** + * The view to be applied to the returned table's fields. + * Defaults to `SCHEMA_VIEW` if unspecified. + */ + // const view = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callGetTable() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getTable(request); + console.log(response); + } + + callGetTable(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_authorized_views.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_authorized_views.js new file mode 100644 index 000000000000..bb33ef1d9952 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_authorized_views.js @@ -0,0 +1,84 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + */ + // const pageSize = 1234 + /** + * Optional. The value of `next_page_token` returned by a previous call. + */ + // const pageToken = 'abc123' + /** + * Optional. The resource_view to be applied to the returned AuthorizedViews' + * fields. Default to NAME_ONLY. + */ + // const view = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callListAuthorizedViews() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listAuthorizedViewsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAuthorizedViews(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_backups.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_backups.js new file mode 100644 index 000000000000..ba11052ef0e7 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_backups.js @@ -0,0 +1,131 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + */ + // const parent = 'abc123' + /** + * A filter expression that filters backups listed in the response. + * The expression must specify the field name, a comparison operator, + * and the value that you want to use for filtering. The value must be a + * string, a number, or a boolean. The comparison operator must be + * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + * roughly synonymous with equality. Filter rules are case insensitive. + * The fields eligible for filtering are: + * * `name` + * * `source_table` + * * `state` + * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * To filter on multiple expressions, provide each separate expression within + * parentheses. By default, each expression is an AND expression. However, + * you can include AND, OR, and NOT expressions explicitly. + * Some examples of using filters are: + * * `name:"exact"` --> The backup's name is the string "exact". + * * `name:howl` --> The backup's name contains the string "howl". + * * `source_table:prod` + * --> The source_table's name contains the string "prod". + * * `state:CREATING` --> The backup is pending creation. + * * `state:READY` --> The backup is fully created and ready for use. + * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + */ + // const filter = 'abc123' + /** + * An expression for specifying the sort order of the results of the request. + * The string value should specify one or more fields in + * Backup google.bigtable.admin.v2.Backup. The full syntax is described at + * https://aip.dev/132#ordering. + * Fields supported are: + * * name + * * source_table + * * expire_time + * * start_time + * * end_time + * * size_bytes + * * state + * For example, "start_time". The default sorting order is ascending. + * To specify descending order for the field, a suffix " desc" should + * be appended to the field name. For example, "start_time desc". + * Redundant space characters in the syntax are insigificant. + * If order_by is empty, results will be sorted by `start_time` in descending + * order starting from the most recently created backup. + */ + // const orderBy = 'abc123' + /** + * Number of backups to be returned in the response. If 0 or + * less, defaults to the server's maximum allowed page size. + */ + // const pageSize = 1234 + /** + * If non-empty, `page_token` should contain a + * next_page_token google.bigtable.admin.v2.ListBackupsResponse.next_page_token + * from a previous + * ListBackupsResponse google.bigtable.admin.v2.ListBackupsResponse to the + * same `parent` and with the same `filter`. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callListBackups() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listBackupsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackups(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_schema_bundles.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_schema_bundles.js new file mode 100644 index 000000000000..909827b5543c --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_schema_bundles.js @@ -0,0 +1,78 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of schema bundles. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const parent = 'abc123' + /** + * The maximum number of schema bundles to return. If the value is positive, + * the server may return at most this value. If unspecified, the server will + * return the maximum allowed page size. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListSchemaBundles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSchemaBundles` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callListSchemaBundles() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listSchemaBundlesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSchemaBundles(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_snapshots.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_snapshots.js new file mode 100644 index 000000000000..fb719b42904b --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_snapshots.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + */ + // const parent = 'abc123' + /** + * The maximum number of snapshots to return per page. + * CURRENTLY UNIMPLEMENTED AND IGNORED. + */ + // const pageSize = 1234 + /** + * The value of `next_page_token` returned by a previous call. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callListSnapshots() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listSnapshotsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSnapshots(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_tables.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_tables.js new file mode 100644 index 000000000000..0f700adf3e53 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.list_tables.js @@ -0,0 +1,83 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. + */ + // const parent = 'abc123' + /** + * The view to be applied to the returned tables' fields. + * NAME_ONLY view (default) and REPLICATION_VIEW are supported. + */ + // const view = {} + /** + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + */ + // const pageSize = 1234 + /** + * The value of `next_page_token` returned by a previous call. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callListTables() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listTablesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTables(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.modify_column_families.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.modify_column_families.js new file mode 100644 index 000000000000..0bf1f696008c --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.modify_column_families.js @@ -0,0 +1,75 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, modifications) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table whose families should be modified. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const name = 'abc123' + /** + * Required. Modifications to be atomically applied to the specified table's + * families. Entries are applied in order, meaning that earlier modifications + * can be masked by later ones (in the case of repeated updates to the same + * family, for example). + */ + // const modifications = [1,2,3,4] + /** + * Optional. If true, ignore safety checks when modifying the column families. + */ + // const ignoreWarnings = true + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callModifyColumnFamilies() { + // Construct request + const request = { + name, + modifications, + }; + + // Run request + const response = await adminClient.modifyColumnFamilies(request); + console.log(response); + } + + callModifyColumnFamilies(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.restore_table.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.restore_table.js new file mode 100644 index 000000000000..4fb547fd4bc3 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.restore_table.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, tableId) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the instance in which to create the restored + * table. Values are of the form `projects//instances/`. + */ + // const parent = 'abc123' + /** + * Required. The id of the table to create and restore to. This + * table must not already exist. The `table_id` appended to + * `parent` forms the full table name of the form + * `projects//instances//tables/`. + */ + // const tableId = 'abc123' + /** + * Name of the backup from which to restore. Values are of the form + * `projects//instances//clusters//backups/`. + */ + // const backup = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callRestoreTable() { + // Construct request + const request = { + parent, + tableId, + }; + + // Run request + const [operation] = await adminClient.restoreTable(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRestoreTable(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.set_iam_policy.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.set_iam_policy.js new file mode 100644 index 000000000000..ee6549c968d7 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await adminClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.snapshot_table.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.snapshot_table.js new file mode 100644 index 000000000000..c3508988d0ae --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.snapshot_table.js @@ -0,0 +1,90 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, cluster, snapshotId) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table to have the snapshot taken. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const name = 'abc123' + /** + * Required. The name of the cluster where the snapshot will be created in. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + */ + // const cluster = 'abc123' + /** + * Required. The ID by which the new snapshot should be referred to within the + * parent cluster, e.g., `mysnapshot` of the form: + * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + */ + // const snapshotId = 'abc123' + /** + * The amount of time that the new snapshot can stay active after it is + * created. Once 'ttl' expires, the snapshot will get deleted. The maximum + * amount of time a snapshot can stay active is 7 days. If 'ttl' is not + * specified, the default value of 24 hours will be used. + */ + // const ttl = {} + /** + * Description of the snapshot. + */ + // const description = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callSnapshotTable() { + // Construct request + const request = { + name, + cluster, + snapshotId, + }; + + // Run request + const [operation] = await adminClient.snapshotTable(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSnapshotTable(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js new file mode 100644 index 000000000000..51a1ff298375 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, permissions) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = ['abc','def'] + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await adminClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.undelete_table.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.undelete_table.js new file mode 100644 index 000000000000..a5ab8c48e265 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.undelete_table.js @@ -0,0 +1,64 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table to be restored. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const name = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callUndeleteTable() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await adminClient.undeleteTable(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUndeleteTable(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_authorized_view.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_authorized_view.js new file mode 100644 index 000000000000..3dcc7b9ee603 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_authorized_view.js @@ -0,0 +1,80 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(authorizedView) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format: + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + */ + // const authorizedView = {} + /** + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + */ + // const updateMask = {} + /** + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + */ + // const ignoreWarnings = true + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callUpdateAuthorizedView() { + // Construct request + const request = { + authorizedView, + }; + + // Run request + const [operation] = await adminClient.updateAuthorizedView(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAuthorizedView(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_backup.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_backup.js new file mode 100644 index 000000000000..4bfcf0f0c1fa --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_backup.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(backup, updateMask) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The backup to update. `backup.name`, and the fields to be updated + * as specified by `update_mask` are required. Other fields are ignored. + * Update is only supported for the following fields: + * * `backup.expire_time`. + */ + // const backup = {} + /** + * Required. A mask specifying which fields (e.g. `expire_time`) in the + * Backup resource should be updated. This mask is relative to the Backup + * resource, not to the request message. The field mask must always be + * specified; this prevents any future fields from being erased accidentally + * by clients that do not know about them. + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callUpdateBackup() { + // Construct request + const request = { + backup, + updateMask, + }; + + // Run request + const response = await adminClient.updateBackup(request); + console.log(response); + } + + callUpdateBackup(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_schema_bundle.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_schema_bundle.js new file mode 100644 index 000000000000..f0b2b501c769 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_schema_bundle.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(schemaBundle) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The schema bundle to update. + * The schema bundle's `name` field is used to identify the schema bundle to + * update. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + */ + // const schemaBundle = {} + /** + * Optional. The list of fields to update. + */ + // const updateMask = {} + /** + * Optional. If set, ignore the safety checks when updating the Schema Bundle. + * The safety checks are: + * - The new Schema Bundle is backwards compatible with the existing Schema + * Bundle. + */ + // const ignoreWarnings = true + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callUpdateSchemaBundle() { + // Construct request + const request = { + schemaBundle, + }; + + // Run request + const [operation] = await adminClient.updateSchemaBundle(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateSchemaBundle(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_table.js b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_table.js new file mode 100644 index 000000000000..4099694287a7 --- /dev/null +++ b/packages/google-cloud-bigtable-api/samples/generated/v2/bigtable_table_admin.update_table.js @@ -0,0 +1,82 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(table, updateMask) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The table to update. + * The table's `name` field is used to identify the table to update. + */ + // const table = {} + /** + * Required. The list of fields to update. + * 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 fields: + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` + * * `row_key_schema` + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + */ + // const updateMask = {} + /** + * Optional. If true, ignore safety checks when updating the table. + */ + // const ignoreWarnings = true + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable-api').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callUpdateTable() { + // Construct request + const request = { + table, + updateMask, + }; + + // Run request + const [operation] = await adminClient.updateTable(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateTable(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigtable-api/src/index.ts b/packages/google-cloud-bigtable-api/src/index.ts new file mode 100644 index 000000000000..00d19161bef7 --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/index.ts @@ -0,0 +1,29 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v2 from './v2'; + +const BigtableInstanceAdminClient = v2.BigtableInstanceAdminClient; +type BigtableInstanceAdminClient = v2.BigtableInstanceAdminClient; +const BigtableTableAdminClient = v2.BigtableTableAdminClient; +type BigtableTableAdminClient = v2.BigtableTableAdminClient; + +export {v2, BigtableInstanceAdminClient, BigtableTableAdminClient}; +export default {v2, BigtableInstanceAdminClient, BigtableTableAdminClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_client.ts b/packages/google-cloud-bigtable-api/src/v2/bigtable_client.ts new file mode 100644 index 000000000000..b4d9701e46a1 --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_client.ts @@ -0,0 +1,2190 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; +import { PassThrough } from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v2/bigtable_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './bigtable_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for reading from and writing to existing Bigtable tables. + * @class + * @memberof v2 + */ +export class BigtableClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: { [method: string]: gax.CallSettings }; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('bigtable-api'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: { [name: string]: Function }; + pathTemplates: { [name: string]: gax.PathTemplate }; + bigtableStub?: Promise<{ [name: string]: Function }>; + + /** + * Construct an instance of BigtableClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BigtableClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof BigtableClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'bigtable.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + authorizedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', + ), + instancePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}', + ), + materializedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/materializedViews/{materialized_view}', + ), + tablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}', + ), + }; + + // Some of the methods on this service provide streaming responses. + // Provide descriptors for these. + this.descriptors.stream = { + readRows: new this._gaxModule.StreamDescriptor( + this._gaxModule.StreamType.SERVER_STREAMING, + !!opts.fallback, + !!opts.gaxServerStreamingRetries, + ), + sampleRowKeys: new this._gaxModule.StreamDescriptor( + this._gaxModule.StreamType.SERVER_STREAMING, + !!opts.fallback, + !!opts.gaxServerStreamingRetries, + ), + mutateRows: new this._gaxModule.StreamDescriptor( + this._gaxModule.StreamType.SERVER_STREAMING, + !!opts.fallback, + !!opts.gaxServerStreamingRetries, + ), + generateInitialChangeStreamPartitions: + new this._gaxModule.StreamDescriptor( + this._gaxModule.StreamType.SERVER_STREAMING, + !!opts.fallback, + !!opts.gaxServerStreamingRetries, + ), + readChangeStream: new this._gaxModule.StreamDescriptor( + this._gaxModule.StreamType.SERVER_STREAMING, + !!opts.fallback, + !!opts.gaxServerStreamingRetries, + ), + executeQuery: new this._gaxModule.StreamDescriptor( + this._gaxModule.StreamType.SERVER_STREAMING, + !!opts.fallback, + !!opts.gaxServerStreamingRetries, + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.bigtable.v2.Bigtable', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + { 'x-goog-api-client': clientHeader.join(' ') }, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.bigtableStub) { + return this.bigtableStub; + } + + // Put together the "service stub" for + // google.bigtable.v2.Bigtable. + this.bigtableStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.bigtable.v2.Bigtable', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.bigtable.v2.Bigtable, + this._opts, + this._providedCustomServicePath, + ) as Promise<{ [method: string]: Function }>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const bigtableStubMethods = [ + 'readRows', + 'sampleRowKeys', + 'mutateRow', + 'mutateRows', + 'checkAndMutateRow', + 'pingAndWarm', + 'readModifyWriteRow', + 'generateInitialChangeStreamPartitions', + 'readChangeStream', + 'prepareQuery', + 'executeQuery', + ]; + for (const methodName of bigtableStubMethods) { + const callPromise = this.bigtableStub.then( + (stub) => + (...args: Array<{}>) => { + if (this._terminated) { + if (methodName in this.descriptors.stream) { + const stream = new PassThrough({ objectMode: true }); + setImmediate(() => { + stream.emit( + 'error', + new this._gaxModule.GoogleError( + 'The client has already been closed.', + ), + ); + }); + return stream; + } + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = this.descriptors.stream[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.bigtableStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigtable.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigtable.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/bigtable.data', + 'https://www.googleapis.com/auth/bigtable.data.readonly', + 'https://www.googleapis.com/auth/cloud-bigtable.data', + 'https://www.googleapis.com/auth/cloud-bigtable.data.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Mutates a row atomically. Cells already present in the row are left + * unchanged unless explicitly changed by `mutation`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.tableName] + * Optional. The unique name of the table to which the mutation should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @param {Buffer} request.rowKey + * Required. The key of the row to which the mutation should be applied. + * @param {number[]} request.mutations + * Required. Changes to be atomically applied to the specified row. Entries + * are applied in order, meaning that earlier mutations can be masked by later + * ones. Must contain at least one entry and at most 100000. + * @param {google.bigtable.v2.Idempotency} request.idempotency + * If set consistently across retries, prevents this mutation from being + * double applied to aggregate column families within a 15m window. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.v2.MutateRowResponse|MutateRowResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_MutateRow_async + */ + mutateRow( + request?: protos.google.bigtable.v2.IMutateRowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.v2.IMutateRowResponse, + protos.google.bigtable.v2.IMutateRowRequest | undefined, + {} | undefined, + ] + >; + mutateRow( + request: protos.google.bigtable.v2.IMutateRowRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.v2.IMutateRowResponse, + protos.google.bigtable.v2.IMutateRowRequest | null | undefined, + {} | null | undefined + >, + ): void; + mutateRow( + request: protos.google.bigtable.v2.IMutateRowRequest, + callback: Callback< + protos.google.bigtable.v2.IMutateRowResponse, + protos.google.bigtable.v2.IMutateRowRequest | null | undefined, + {} | null | undefined + >, + ): void; + mutateRow( + request?: protos.google.bigtable.v2.IMutateRowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.v2.IMutateRowResponse, + protos.google.bigtable.v2.IMutateRowRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.v2.IMutateRowResponse, + protos.google.bigtable.v2.IMutateRowRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.v2.IMutateRowResponse, + protos.google.bigtable.v2.IMutateRowRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.tableName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('mutateRow request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.v2.IMutateRowResponse, + protos.google.bigtable.v2.IMutateRowRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('mutateRow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .mutateRow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.v2.IMutateRowResponse, + protos.google.bigtable.v2.IMutateRowRequest | undefined, + {} | undefined, + ]) => { + this._log.info('mutateRow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Mutates a row atomically based on the output of a predicate Reader filter. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.tableName] + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
include:samples/generated/v2/bigtable.mutate_row.js
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @param {Buffer} request.rowKey + * Required. The key of the row to which the conditional mutation should be + * applied. + * @param {google.bigtable.v2.RowFilter} request.predicateFilter + * The filter to be applied to the contents of the specified row. Depending + * on whether or not any results are yielded, either `true_mutations` or + * `false_mutations` will be executed. If unset, checks that the row contains + * any values at all. + * @param {number[]} request.trueMutations + * Changes to be atomically applied to the specified row if `predicate_filter` + * yields at least one cell when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `false_mutations` is empty, and at most + * 100000. + * @param {number[]} request.falseMutations + * Changes to be atomically applied to the specified row if `predicate_filter` + * does not yield any cells when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `true_mutations` is empty, and at most + * 100000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.v2.CheckAndMutateRowResponse|CheckAndMutateRowResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_CheckAndMutateRow_async + */ + checkAndMutateRow( + request?: protos.google.bigtable.v2.ICheckAndMutateRowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.v2.ICheckAndMutateRowResponse, + protos.google.bigtable.v2.ICheckAndMutateRowRequest | undefined, + {} | undefined, + ] + >; + checkAndMutateRow( + request: protos.google.bigtable.v2.ICheckAndMutateRowRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.v2.ICheckAndMutateRowResponse, + protos.google.bigtable.v2.ICheckAndMutateRowRequest | null | undefined, + {} | null | undefined + >, + ): void; + checkAndMutateRow( + request: protos.google.bigtable.v2.ICheckAndMutateRowRequest, + callback: Callback< + protos.google.bigtable.v2.ICheckAndMutateRowResponse, + protos.google.bigtable.v2.ICheckAndMutateRowRequest | null | undefined, + {} | null | undefined + >, + ): void; + checkAndMutateRow( + request?: protos.google.bigtable.v2.ICheckAndMutateRowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.v2.ICheckAndMutateRowResponse, + | protos.google.bigtable.v2.ICheckAndMutateRowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.v2.ICheckAndMutateRowResponse, + protos.google.bigtable.v2.ICheckAndMutateRowRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.v2.ICheckAndMutateRowResponse, + protos.google.bigtable.v2.ICheckAndMutateRowRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.tableName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('checkAndMutateRow request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.v2.ICheckAndMutateRowResponse, + | protos.google.bigtable.v2.ICheckAndMutateRowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('checkAndMutateRow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .checkAndMutateRow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.v2.ICheckAndMutateRowResponse, + protos.google.bigtable.v2.ICheckAndMutateRowRequest | undefined, + {} | undefined, + ]) => { + this._log.info('checkAndMutateRow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Warm up associated instance metadata for this connection. + * This call is not required but may be useful for connection keep-alive. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the instance to check permissions for as well + * as respond. Values are of the form + * `projects//instances/`. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.v2.PingAndWarmResponse|PingAndWarmResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_PingAndWarm_async + */ + pingAndWarm( + request?: protos.google.bigtable.v2.IPingAndWarmRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | undefined, + {} | undefined, + ] + >; + pingAndWarm( + request: protos.google.bigtable.v2.IPingAndWarmRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + >, + ): void; + pingAndWarm( + request: protos.google.bigtable.v2.IPingAndWarmRequest, + callback: Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + >, + ): void; + pingAndWarm( + request?: protos.google.bigtable.v2.IPingAndWarmRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.name; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?projects/[^/]+/instances/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['name'] ?? fieldValue; + Object.assign(routingParameter, { name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('pingAndWarm request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('pingAndWarm response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .pingAndWarm(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | undefined, + {} | undefined, + ]) => { + this._log.info('pingAndWarm response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Modifies a row atomically on the server. The method reads the latest + * existing timestamp and value from the specified columns and writes a new + * entry based on pre-defined read/modify/write rules. The new value for the + * timestamp is the greater of the existing timestamp or the current server + * time. The method returns the new contents of all modified cells. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.tableName] + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
include:samples/generated/v2/bigtable.check_and_mutate_row.jsinclude:samples/generated/v2/bigtable.ping_and_warm.js
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @param {Buffer} request.rowKey + * Required. The key of the row to which the read/modify/write rules should be + * applied. + * @param {number[]} request.rules + * Required. Rules specifying how the specified row's contents are to be + * transformed into writes. Entries are applied in order, meaning that earlier + * rules will affect the results of later ones. At least one entry must be + * specified, and there can be at most 100000 rules. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.v2.ReadModifyWriteRowResponse|ReadModifyWriteRowResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async + */ + readModifyWriteRow( + request?: protos.google.bigtable.v2.IReadModifyWriteRowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.v2.IReadModifyWriteRowResponse, + protos.google.bigtable.v2.IReadModifyWriteRowRequest | undefined, + {} | undefined, + ] + >; + readModifyWriteRow( + request: protos.google.bigtable.v2.IReadModifyWriteRowRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.v2.IReadModifyWriteRowResponse, + protos.google.bigtable.v2.IReadModifyWriteRowRequest | null | undefined, + {} | null | undefined + >, + ): void; + readModifyWriteRow( + request: protos.google.bigtable.v2.IReadModifyWriteRowRequest, + callback: Callback< + protos.google.bigtable.v2.IReadModifyWriteRowResponse, + protos.google.bigtable.v2.IReadModifyWriteRowRequest | null | undefined, + {} | null | undefined + >, + ): void; + readModifyWriteRow( + request?: protos.google.bigtable.v2.IReadModifyWriteRowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.v2.IReadModifyWriteRowResponse, + | protos.google.bigtable.v2.IReadModifyWriteRowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.v2.IReadModifyWriteRowResponse, + protos.google.bigtable.v2.IReadModifyWriteRowRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.v2.IReadModifyWriteRowResponse, + protos.google.bigtable.v2.IReadModifyWriteRowRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.tableName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('readModifyWriteRow request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.v2.IReadModifyWriteRowResponse, + | protos.google.bigtable.v2.IReadModifyWriteRowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('readModifyWriteRow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .readModifyWriteRow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.v2.IReadModifyWriteRowResponse, + protos.google.bigtable.v2.IReadModifyWriteRowRequest | undefined, + {} | undefined, + ]) => { + this._log.info('readModifyWriteRow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Prepares a GoogleSQL query for execution on a particular Bigtable instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.instanceName + * Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + * @param {string} [request.appProfileId] + * Optional. This value specifies routing for preparing the query. Note that + * this `app_profile_id` is only used for preparing the query. The actual + * query execution will use the app profile specified in the + * `ExecuteQueryRequest`. If not specified, the `default` application profile + * will be used. + * @param {string} request.query + * Required. The query string. + * @param {google.bigtable.v2.ProtoFormat} request.protoFormat + * Protocol buffer format as described by ProtoSchema and ProtoRows + * messages. + * @param {number[]} request.paramTypes + * Required. `param_types` is a map of parameter identifier strings to their + * `Type`s. + * + * In query string, a parameter placeholder consists of the + * `@` character followed by the parameter name (for example, `@firstName`) in + * the query string. + * + * For example, if param_types["firstName"] = Bytes then @firstName will be a + * query parameter of type Bytes. The specific `Value` to be used for the + * query execution must be sent in `ExecuteQueryRequest` in the `params` map. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.v2.PrepareQueryResponse|PrepareQueryResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_PrepareQuery_async + */ + prepareQuery( + request?: protos.google.bigtable.v2.IPrepareQueryRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.v2.IPrepareQueryResponse, + protos.google.bigtable.v2.IPrepareQueryRequest | undefined, + {} | undefined, + ] + >; + prepareQuery( + request: protos.google.bigtable.v2.IPrepareQueryRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.v2.IPrepareQueryResponse, + protos.google.bigtable.v2.IPrepareQueryRequest | null | undefined, + {} | null | undefined + >, + ): void; + prepareQuery( + request: protos.google.bigtable.v2.IPrepareQueryRequest, + callback: Callback< + protos.google.bigtable.v2.IPrepareQueryResponse, + protos.google.bigtable.v2.IPrepareQueryRequest | null | undefined, + {} | null | undefined + >, + ): void; + prepareQuery( + request?: protos.google.bigtable.v2.IPrepareQueryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.v2.IPrepareQueryResponse, + protos.google.bigtable.v2.IPrepareQueryRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.v2.IPrepareQueryResponse, + protos.google.bigtable.v2.IPrepareQueryRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.v2.IPrepareQueryResponse, + protos.google.bigtable.v2.IPrepareQueryRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.instanceName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?projects/[^/]+/instances/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['name'] ?? fieldValue; + Object.assign(routingParameter, { name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('prepareQuery request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.v2.IPrepareQueryResponse, + protos.google.bigtable.v2.IPrepareQueryRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('prepareQuery response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .prepareQuery(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.v2.IPrepareQueryResponse, + protos.google.bigtable.v2.IPrepareQueryRequest | undefined, + {} | undefined, + ]) => { + this._log.info('prepareQuery response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + + /** + * Streams back the contents of all requested rows in key order, optionally + * applying the same Reader filter to each. Depending on their size, + * rows and cells may be broken up across multiple responses, but + * atomicity of each row will still be preserved. See the + * ReadRowsResponse documentation for details. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.tableName] + * Optional. The unique name of the table from which to read. + * + * Values are of the form + * `projects//instances//tables/
include:samples/generated/v2/bigtable.read_modify_write_row.jsinclude:samples/generated/v2/bigtable.prepare_query.js
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView from which to read. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @param {string} [request.materializedViewName] + * Optional. The unique name of the MaterializedView from which to read. + * + * Values are of the form + * `projects//instances//materializedViews/`. + * @param {string} request.appProfileId + * 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. + * @param {google.bigtable.v2.RowFilter} request.filter + * The filter to apply to the contents of the specified row(s). If unset, + * reads the entirety of each row. + * @param {number} request.rowsLimit + * The read will stop after committing to N rows' worth of results. The + * default (zero) is to return all results. + * @param {google.bigtable.v2.ReadRowsRequest.RequestStatsView} request.requestStatsView + * The view into RequestStats, as described above. + * @param {boolean} request.reversed + * Experimental API - Please note that this API is currently experimental + * and can change in the future. + * + * Return rows in lexiographical descending order of the row keys. The row + * contents will not be affected by this flag. + * + * Example result set: + * + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.bigtable.v2.ReadRowsResponse|ReadRowsResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_ReadRows_async + */ + readRows( + request?: protos.google.bigtable.v2.IReadRowsRequest, + options?: CallOptions, + ): gax.CancellableStream { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.tableName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + { + const fieldValue = request.materializedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?projects/[^/]+/instances/[^/]+)(?:/.*)?')); + if (match) { + const parameterValue = match.groups?.['name'] ?? fieldValue; + Object.assign(routingParameter, { name: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('readRows stream %j', options); + return this.innerApiCalls.readRows(request, options); + } + + /** + * Returns a sample of row keys in the table. The returned row keys will + * delimit contiguous sections of the table of approximately equal size, + * which can be used to break up the data for distributed tasks like + * mapreduces. + * + * If a `row_range` is provided in the request, the returned samples will be + * restricted to the specified range. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.tableName] + * Optional. The unique name of the table from which to sample row keys. + * + * Values are of the form + * `projects//instances//tables/
include:samples/generated/v2/bigtable.read_rows.js
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @param {string} [request.materializedViewName] + * Optional. The unique name of the MaterializedView from which to read. + * + * Values are of the form + * `projects//instances//materializedViews/`. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @param {google.bigtable.v2.RowRange} [request.rowRange] + * Optional. The row range to sample. If not specified, samples + * from all rows. + * The output will always return the end key in the range as the last sample + * returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.bigtable.v2.SampleRowKeysResponse|SampleRowKeysResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_SampleRowKeys_async + */ + sampleRowKeys( + request?: protos.google.bigtable.v2.ISampleRowKeysRequest, + options?: CallOptions, + ): gax.CancellableStream { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.tableName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + { + const fieldValue = request.materializedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?projects/[^/]+/instances/[^/]+)(?:/.*)?')); + if (match) { + const parameterValue = match.groups?.['name'] ?? fieldValue; + Object.assign(routingParameter, { name: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('sampleRowKeys stream %j', options); + return this.innerApiCalls.sampleRowKeys(request, options); + } + + /** + * Mutates multiple rows in a batch. Each individual row is mutated + * atomically as in MutateRow, but the entire batch is not executed + * atomically. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.tableName] + * Optional. The unique name of the table to which the mutations should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
include:samples/generated/v2/bigtable.sample_row_keys.js
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @param {number[]} request.entries + * Required. The row keys and corresponding mutations to be applied in bulk. + * Each entry is applied as an atomic mutation, but the entries may be + * applied in arbitrary order (even between entries for the same row). + * At least one entry must be specified, and in total the entries can + * contain at most 100000 mutations. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.bigtable.v2.MutateRowsResponse|MutateRowsResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_MutateRows_async + */ + mutateRows( + request?: protos.google.bigtable.v2.IMutateRowsRequest, + options?: CallOptions, + ): gax.CancellableStream { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.tableName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?', + ), + ); + if (match) { + const parameterValue = match.groups?.['table_name'] ?? fieldValue; + Object.assign(routingParameter, { table_name: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('mutateRows stream %j', options); + return this.innerApiCalls.mutateRows(request, options); + } + + /** + * Returns the current list of partitions that make up the table's + * change stream. The union of partitions will cover the entire keyspace. + * Partitions can be read with `ReadChangeStream`. + * NOTE: This API is only intended to be used by Apache Beam BigtableIO. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.tableName + * Required. The unique name of the table from which to get change stream + * partitions. Values are of the form + * `projects//instances//tables/
include:samples/generated/v2/bigtable.mutate_rows.js
`. + * Change streaming must be enabled on the table. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse|GenerateInitialChangeStreamPartitionsResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async + */ + generateInitialChangeStreamPartitions( + request?: protos.google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest, + options?: CallOptions, + ): gax.CancellableStream { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + table_name: request.tableName ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('generateInitialChangeStreamPartitions stream %j', options); + return this.innerApiCalls.generateInitialChangeStreamPartitions( + request, + options, + ); + } + + /** + * Reads changes from a table's change stream. Changes will + * reflect both user-initiated mutations and mutations that are caused by + * garbage collection. + * NOTE: This API is only intended to be used by Apache Beam BigtableIO. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.tableName + * Required. The unique name of the table from which to read a change stream. + * Values are of the form + * `projects//instances//tables/
include:samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js
`. + * Change streaming must be enabled on the table. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * @param {google.bigtable.v2.StreamPartition} request.partition + * The partition to read changes from. + * @param {google.protobuf.Timestamp} request.startTime + * Start reading the stream at the specified timestamp. This timestamp must + * be within the change stream retention period, less than or equal to the + * current time, and after change stream creation, whichever is greater. + * This value is inclusive and will be truncated to microsecond granularity. + * @param {google.bigtable.v2.StreamContinuationTokens} request.continuationTokens + * Tokens that describe how to resume reading a stream where reading + * previously left off. If specified, changes will be read starting at the + * the position. Tokens are delivered on the stream as part of `Heartbeat` + * and `CloseStream` messages. + * + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case + * of a partition merge, the union of the token partitions must exactly + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be + * returned. + * @param {google.protobuf.Timestamp} request.endTime + * If specified, OK will be returned when the stream advances beyond + * this time. Otherwise, changes will be continuously delivered on the stream. + * This value is inclusive and will be truncated to microsecond granularity. + * @param {google.protobuf.Duration} request.heartbeatDuration + * If specified, the duration between `Heartbeat` messages on the stream. + * Otherwise, defaults to 5 seconds. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.bigtable.v2.ReadChangeStreamResponse|ReadChangeStreamResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_ReadChangeStream_async + */ + readChangeStream( + request?: protos.google.bigtable.v2.IReadChangeStreamRequest, + options?: CallOptions, + ): gax.CancellableStream { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + table_name: request.tableName ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('readChangeStream stream %j', options); + return this.innerApiCalls.readChangeStream(request, options); + } + + /** + * Executes a SQL query against a particular Bigtable instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.instanceName + * Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + * @param {string} [request.appProfileId] + * Optional. This value specifies routing for replication. If not specified, + * the `default` application profile will be used. + * @param {string} request.query + * Required. The query string. + * + * Exactly one of `query` and `prepared_query` is required. Setting both + * or neither is an `INVALID_ARGUMENT`. + * @param {Buffer} request.preparedQuery + * A prepared query that was returned from `PrepareQueryResponse`. + * + * Exactly one of `query` and `prepared_query` is required. Setting both + * or neither is an `INVALID_ARGUMENT`. + * + * Setting this field also places restrictions on several other fields: + * - `data_format` must be empty. + * - `validate_only` must be false. + * - `params` must match the `param_types` set in the `PrepareQueryRequest`. + * @param {google.bigtable.v2.ProtoFormat} request.protoFormat + * Protocol buffer format as described by ProtoSchema and ProtoRows + * messages. + * @param {Buffer} [request.resumeToken] + * Optional. If this request is resuming a previously interrupted query + * execution, `resume_token` should be copied from the last + * PartialResultSet yielded before the interruption. Doing this + * enables the query execution to resume where the last one left + * off. + * The rest of the request parameters must exactly match the + * request that yielded this token. Otherwise the request will fail. + * @param {number[]} request.params + * Required. params contains string type keys and Bigtable type values that + * bind to placeholders in the query string. In query string, a parameter + * placeholder consists of the + * `@` character followed by the parameter name (for example, `@firstName`) in + * the query string. + * + * For example, if + * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. + * + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. + * @param {number[]} [request.viewParameters] + * Optional. This map provides the runtime values returned by the + * VIEW_PARAMETERS() function calls, typically used for user-level scoping of + * data based on identity. + * + * The key is the name of the view parameter e.g. `user_id`, and + * the value is the parameter value e.g. `alice@example.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.bigtable.v2.ExecuteQueryResponse|ExecuteQueryResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example + * region_tag:bigtable_v2_generated_Bigtable_ExecuteQuery_async + */ + executeQuery( + request?: protos.google.bigtable.v2.IExecuteQueryRequest, + options?: CallOptions, + ): gax.CancellableStream { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + let routingParameter = {}; + { + const fieldValue = request.instanceName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?projects/[^/]+/instances/[^/]+)')); + if (match) { + const parameterValue = match.groups?.['name'] ?? fieldValue; + Object.assign(routingParameter, { name: parameterValue }); + } + } + } + { + const fieldValue = request.appProfileId; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match(RegExp('(?.*)')); + if (match) { + const parameterValue = match.groups?.['app_profile_id'] ?? fieldValue; + Object.assign(routingParameter, { app_profile_id: parameterValue }); + } + } + } + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams(routingParameter); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('executeQuery stream %j', options); + return this.innerApiCalls.executeQuery(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified authorizedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @param {string} authorized_view + * @returns {string} Resource name string. + */ + authorizedViewPath( + project: string, + instance: string, + table: string, + authorizedView: string, + ) { + return this.pathTemplates.authorizedViewPathTemplate.render({ + project: project, + instance: instance, + table: table, + authorized_view: authorizedView, + }); + } + + /** + * Parse the project from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).project; + } + + /** + * Parse the instance from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).instance; + } + + /** + * Parse the table from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the table. + */ + matchTableFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).table; + } + + /** + * Parse the authorized_view from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the authorized_view. + */ + matchAuthorizedViewFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).authorized_view; + } + + /** + * Return a fully-qualified instance resource name string. + * + * @param {string} project + * @param {string} instance + * @returns {string} Resource name string. + */ + instancePath(project: string, instance: string) { + return this.pathTemplates.instancePathTemplate.render({ + project: project, + instance: instance, + }); + } + + /** + * Parse the project from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).project; + } + + /** + * Parse the instance from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).instance; + } + + /** + * Return a fully-qualified materializedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} materialized_view + * @returns {string} Resource name string. + */ + materializedViewPath( + project: string, + instance: string, + materializedView: string, + ) { + return this.pathTemplates.materializedViewPathTemplate.render({ + project: project, + instance: instance, + materialized_view: materializedView, + }); + } + + /** + * Parse the project from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).project; + } + + /** + * Parse the instance from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).instance; + } + + /** + * Parse the materialized_view from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the materialized_view. + */ + matchMaterializedViewFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).materialized_view; + } + + /** + * Return a fully-qualified table resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @returns {string} Resource name string. + */ + tablePath(project: string, instance: string, table: string) { + return this.pathTemplates.tablePathTemplate.render({ + project: project, + instance: instance, + table: table, + }); + } + + /** + * Parse the project from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).project; + } + + /** + * Parse the instance from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).instance; + } + + /** + * Parse the table from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the table. + */ + matchTableFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).table; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.bigtableStub && !this._terminated) { + return this.bigtableStub.then((stub) => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_client_config.json b/packages/google-cloud-bigtable-api/src/v2/bigtable_client_config.json new file mode 100644 index 000000000000..381964239e3e --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_client_config.json @@ -0,0 +1,88 @@ +{ + "interfaces": { + "google.bigtable.v2.Bigtable": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "5af39a0f6db447f61c4f695240caeccb74f78362": { + "initial_retry_delay_millis": 10, + "retry_delay_multiplier": 2, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ReadRows": { + "timeout_millis": 43200000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SampleRowKeys": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MutateRow": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" + }, + "MutateRows": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckAndMutateRow": { + "timeout_millis": 20000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PingAndWarm": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadModifyWriteRow": { + "timeout_millis": 20000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GenerateInitialChangeStreamPartitions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadChangeStream": { + "timeout_millis": 43200000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PrepareQuery": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteQuery": { + "timeout_millis": 43200000, + "retry_codes_name": "idempotent", + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" + } + } + } + } +} diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_client.ts b/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_client.ts new file mode 100644 index 000000000000..a27a585f427c --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_client.ts @@ -0,0 +1,6454 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import { Transform } from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v2/bigtable_instance_admin_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './bigtable_instance_admin_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for creating, configuring, and deleting Cloud Bigtable Instances and + * Clusters. Provides access to the Instance and Cluster schemas only, not the + * tables' metadata or data stored in those tables. + * @class + * @memberof v2 + */ +export class BigtableInstanceAdminClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: { [method: string]: gax.CallSettings }; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('bigtable-api'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: { [name: string]: Function }; + pathTemplates: { [name: string]: gax.PathTemplate }; + operationsClient: gax.OperationsClient; + bigtableInstanceAdminStub?: Promise<{ [name: string]: Function }>; + + /** + * Construct an instance of BigtableInstanceAdminClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BigtableInstanceAdminClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof BigtableInstanceAdminClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'bigtableadmin.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + appProfilePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/appProfiles/{app_profile}', + ), + authorizedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', + ), + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}', + ), + clusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/clusters/{cluster}', + ), + hotTabletPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/{hot_tablet}', + ), + instancePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}', + ), + logicalViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/logicalViews/{logical_view}', + ), + materializedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/materializedViews/{materialized_view}', + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}', + ), + schemaBundlePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}', + ), + snapshotPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}', + ), + tablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}', + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAppProfiles: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'appProfiles', + ), + listHotTablets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'hotTablets', + ), + listLogicalViews: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'logicalViews', + ), + listMaterializedViews: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'materializedViews', + ), + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v2/{name=operations/**}:cancel', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v2/{name=operations/**}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v2/{name=operations/**}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v2/{name=operations/projects/**}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createInstanceResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Instance', + ) as gax.protobuf.Type; + const createInstanceMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateInstanceMetadata', + ) as gax.protobuf.Type; + const partialUpdateInstanceResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Instance', + ) as gax.protobuf.Type; + const partialUpdateInstanceMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateInstanceMetadata', + ) as gax.protobuf.Type; + const createClusterResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Cluster', + ) as gax.protobuf.Type; + const createClusterMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateClusterMetadata', + ) as gax.protobuf.Type; + const updateClusterResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Cluster', + ) as gax.protobuf.Type; + const updateClusterMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateClusterMetadata', + ) as gax.protobuf.Type; + const partialUpdateClusterResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Cluster', + ) as gax.protobuf.Type; + const partialUpdateClusterMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.PartialUpdateClusterMetadata', + ) as gax.protobuf.Type; + const updateAppProfileResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.AppProfile', + ) as gax.protobuf.Type; + const updateAppProfileMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateAppProfileMetadata', + ) as gax.protobuf.Type; + const createLogicalViewResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.LogicalView', + ) as gax.protobuf.Type; + const createLogicalViewMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateLogicalViewMetadata', + ) as gax.protobuf.Type; + const updateLogicalViewResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.LogicalView', + ) as gax.protobuf.Type; + const updateLogicalViewMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateLogicalViewMetadata', + ) as gax.protobuf.Type; + const createMaterializedViewResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.MaterializedView', + ) as gax.protobuf.Type; + const createMaterializedViewMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateMaterializedViewMetadata', + ) as gax.protobuf.Type; + const updateMaterializedViewResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.MaterializedView', + ) as gax.protobuf.Type; + const updateMaterializedViewMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateMaterializedViewMetadata', + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createInstance: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createInstanceResponse.decode.bind(createInstanceResponse), + createInstanceMetadata.decode.bind(createInstanceMetadata), + ), + partialUpdateInstance: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + partialUpdateInstanceResponse.decode.bind( + partialUpdateInstanceResponse, + ), + partialUpdateInstanceMetadata.decode.bind( + partialUpdateInstanceMetadata, + ), + ), + createCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createClusterResponse.decode.bind(createClusterResponse), + createClusterMetadata.decode.bind(createClusterMetadata), + ), + updateCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateClusterResponse.decode.bind(updateClusterResponse), + updateClusterMetadata.decode.bind(updateClusterMetadata), + ), + partialUpdateCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + partialUpdateClusterResponse.decode.bind(partialUpdateClusterResponse), + partialUpdateClusterMetadata.decode.bind(partialUpdateClusterMetadata), + ), + updateAppProfile: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAppProfileResponse.decode.bind(updateAppProfileResponse), + updateAppProfileMetadata.decode.bind(updateAppProfileMetadata), + ), + createLogicalView: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createLogicalViewResponse.decode.bind(createLogicalViewResponse), + createLogicalViewMetadata.decode.bind(createLogicalViewMetadata), + ), + updateLogicalView: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateLogicalViewResponse.decode.bind(updateLogicalViewResponse), + updateLogicalViewMetadata.decode.bind(updateLogicalViewMetadata), + ), + createMaterializedView: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createMaterializedViewResponse.decode.bind( + createMaterializedViewResponse, + ), + createMaterializedViewMetadata.decode.bind( + createMaterializedViewMetadata, + ), + ), + updateMaterializedView: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateMaterializedViewResponse.decode.bind( + updateMaterializedViewResponse, + ), + updateMaterializedViewMetadata.decode.bind( + updateMaterializedViewMetadata, + ), + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.bigtable.admin.v2.BigtableInstanceAdmin', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + { 'x-goog-api-client': clientHeader.join(' ') }, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.bigtableInstanceAdminStub) { + return this.bigtableInstanceAdminStub; + } + + // Put together the "service stub" for + // google.bigtable.admin.v2.BigtableInstanceAdmin. + this.bigtableInstanceAdminStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.bigtable.admin.v2.BigtableInstanceAdmin', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.bigtable.admin.v2.BigtableInstanceAdmin, + this._opts, + this._providedCustomServicePath, + ) as Promise<{ [method: string]: Function }>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const bigtableInstanceAdminStubMethods = [ + 'createInstance', + 'getInstance', + 'listInstances', + 'updateInstance', + 'partialUpdateInstance', + 'deleteInstance', + 'createCluster', + 'getCluster', + 'listClusters', + 'updateCluster', + 'partialUpdateCluster', + 'deleteCluster', + 'createAppProfile', + 'getAppProfile', + 'listAppProfiles', + 'updateAppProfile', + 'deleteAppProfile', + 'getIamPolicy', + 'setIamPolicy', + 'testIamPermissions', + 'listHotTablets', + 'createLogicalView', + 'getLogicalView', + 'listLogicalViews', + 'updateLogicalView', + 'deleteLogicalView', + 'createMaterializedView', + 'getMaterializedView', + 'listMaterializedViews', + 'updateMaterializedView', + 'deleteMaterializedView', + ]; + for (const methodName of bigtableInstanceAdminStubMethods) { + const callPromise = this.bigtableInstanceAdminStub.then( + (stub) => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.bigtableInstanceAdminStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigtableadmin.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigtableadmin.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/bigtable.admin', + 'https://www.googleapis.com/auth/bigtable.admin.cluster', + 'https://www.googleapis.com/auth/bigtable.admin.instance', + 'https://www.googleapis.com/auth/cloud-bigtable.admin', + 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets information about an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested instance. Values are of the form + * `projects/{project}/instances/{instance}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Instance|Instance}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async + */ + getInstance( + request?: protos.google.bigtable.admin.v2.IGetInstanceRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IGetInstanceRequest | undefined, + {} | undefined, + ] + >; + getInstance( + request: protos.google.bigtable.admin.v2.IGetInstanceRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, + {} | null | undefined + >, + ): void; + getInstance( + request: protos.google.bigtable.admin.v2.IGetInstanceRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, + {} | null | undefined + >, + ): void; + getInstance( + request?: protos.google.bigtable.admin.v2.IGetInstanceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IInstance, + | protos.google.bigtable.admin.v2.IGetInstanceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IGetInstanceRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getInstance request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IInstance, + | protos.google.bigtable.admin.v2.IGetInstanceRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getInstance response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getInstance(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IGetInstanceRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getInstance response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Lists information about instances in a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the project for which a list of instances is + * requested. Values are of the form `projects/{project}`. + * @param {string} request.pageToken + * DEPRECATED: This field is unused and ignored. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.ListInstancesResponse|ListInstancesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async + */ + listInstances( + request?: protos.google.bigtable.admin.v2.IListInstancesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IListInstancesResponse, + protos.google.bigtable.admin.v2.IListInstancesRequest | undefined, + {} | undefined, + ] + >; + listInstances( + request: protos.google.bigtable.admin.v2.IListInstancesRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IListInstancesResponse, + protos.google.bigtable.admin.v2.IListInstancesRequest | null | undefined, + {} | null | undefined + >, + ): void; + listInstances( + request: protos.google.bigtable.admin.v2.IListInstancesRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IListInstancesResponse, + protos.google.bigtable.admin.v2.IListInstancesRequest | null | undefined, + {} | null | undefined + >, + ): void; + listInstances( + request?: protos.google.bigtable.admin.v2.IListInstancesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IListInstancesResponse, + | protos.google.bigtable.admin.v2.IListInstancesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IListInstancesResponse, + protos.google.bigtable.admin.v2.IListInstancesRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IListInstancesResponse, + protos.google.bigtable.admin.v2.IListInstancesRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listInstances request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IListInstancesResponse, + | protos.google.bigtable.admin.v2.IListInstancesRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listInstances response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .listInstances(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IListInstancesResponse, + protos.google.bigtable.admin.v2.IListInstancesRequest | undefined, + {} | undefined, + ]) => { + this._log.info('listInstances response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Updates an instance within a project. This method updates only the display + * name and type for an Instance. To update other Instance properties, such as + * labels, use PartialUpdateInstance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The unique name of the instance. Values are of the form + * `projects/{project}/instances/{@link protos.a-z0-9\\-|a-z}+[a-z0-9]`. + * @param {string} request.displayName + * Required. The descriptive name for this instance as it appears in UIs. + * Can be changed at any time, but should be kept globally unique + * to avoid confusion. + * @param {google.bigtable.admin.v2.Instance.State} request.state + * Output only. The current state of the instance. + * @param {google.bigtable.admin.v2.Instance.Type} request.type + * The type of the instance. Defaults to `PRODUCTION`. + * @param {google.bigtable.admin.v2.Instance.Edition} [request.edition] + * Optional. The edition of the instance. See + * {@link protos.google.bigtable.admin.v2.Instance.Edition|Edition} for details. + * @param {number[]} request.labels + * Labels are a flexible and lightweight mechanism for organizing cloud + * resources into groups that reflect a customer's organizational needs and + * deployment strategies. They can be used to filter resources and aggregate + * metrics. + * + * * Label keys must be between 1 and 63 characters long and must conform to + * the regular expression: `{@link protos.\p{Ll}\p{Lo}\p{N}_-|\p{Ll}\p{Lo}}{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. + * * Keys and values must both be under 128 bytes. + * @param {google.protobuf.Timestamp} request.createTime + * Output only. A commit timestamp representing when this Instance was + * created. For instances created before this field was added (August 2021), + * this value is `seconds: 0, nanos: 1`. + * @param {boolean} request.satisfiesPzs + * Output only. Reserved for future use. + * @param {boolean} request.satisfiesPzi + * Output only. Reserved for future use. + * @param {number[]} request.tags + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * - "123/environment": "production", + * - "123/costCenter": "marketing" + * + * Tags and Labels (above) are both used to bind metadata to resources, with + * different use-cases. See + * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an + * in-depth overview on the difference between tags and labels. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Instance|Instance}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async + */ + updateInstance( + request?: protos.google.bigtable.admin.v2.IInstance, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IInstance | undefined, + {} | undefined, + ] + >; + updateInstance( + request: protos.google.bigtable.admin.v2.IInstance, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IInstance | null | undefined, + {} | null | undefined + >, + ): void; + updateInstance( + request: protos.google.bigtable.admin.v2.IInstance, + callback: Callback< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IInstance | null | undefined, + {} | null | undefined + >, + ): void; + updateInstance( + request?: protos.google.bigtable.admin.v2.IInstance, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IInstance | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IInstance | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IInstance | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('updateInstance request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IInstance | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateInstance response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateInstance(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IInstance | undefined, + {} | undefined, + ]) => { + this._log.info('updateInstance response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Delete an instance from a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the instance to be deleted. + * Values are of the form `projects/{project}/instances/{instance}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async + */ + deleteInstance( + request?: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteInstanceRequest | undefined, + {} | undefined, + ] + >; + deleteInstance( + request: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteInstance( + request: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteInstance( + request?: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteInstanceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteInstanceRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteInstance request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteInstanceRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteInstance response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteInstance(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteInstanceRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteInstance response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets information about a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Cluster|Cluster}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async + */ + getCluster( + request?: protos.google.bigtable.admin.v2.IGetClusterRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IGetClusterRequest | undefined, + {} | undefined, + ] + >; + getCluster( + request: protos.google.bigtable.admin.v2.IGetClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, + {} | null | undefined + >, + ): void; + getCluster( + request: protos.google.bigtable.admin.v2.IGetClusterRequest, + callback: Callback< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, + {} | null | undefined + >, + ): void; + getCluster( + request?: protos.google.bigtable.admin.v2.IGetClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IGetClusterRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getCluster request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getCluster response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getCluster(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IGetClusterRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getCluster response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Lists information about clusters in an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which a list of clusters is + * requested. Values are of the form + * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list + * Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * @param {string} request.pageToken + * DEPRECATED: This field is unused and ignored. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.ListClustersResponse|ListClustersResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async + */ + listClusters( + request?: protos.google.bigtable.admin.v2.IListClustersRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IListClustersResponse, + protos.google.bigtable.admin.v2.IListClustersRequest | undefined, + {} | undefined, + ] + >; + listClusters( + request: protos.google.bigtable.admin.v2.IListClustersRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IListClustersResponse, + protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, + {} | null | undefined + >, + ): void; + listClusters( + request: protos.google.bigtable.admin.v2.IListClustersRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IListClustersResponse, + protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, + {} | null | undefined + >, + ): void; + listClusters( + request?: protos.google.bigtable.admin.v2.IListClustersRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IListClustersResponse, + | protos.google.bigtable.admin.v2.IListClustersRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IListClustersResponse, + protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IListClustersResponse, + protos.google.bigtable.admin.v2.IListClustersRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listClusters request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IListClustersResponse, + | protos.google.bigtable.admin.v2.IListClustersRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listClusters response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .listClusters(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IListClustersResponse, + protos.google.bigtable.admin.v2.IListClustersRequest | undefined, + {} | undefined, + ]) => { + this._log.info('listClusters response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a cluster from an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the cluster to be deleted. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async + */ + deleteCluster( + request?: protos.google.bigtable.admin.v2.IDeleteClusterRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteClusterRequest | undefined, + {} | undefined, + ] + >; + deleteCluster( + request: protos.google.bigtable.admin.v2.IDeleteClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteCluster( + request: protos.google.bigtable.admin.v2.IDeleteClusterRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteCluster( + request?: protos.google.bigtable.admin.v2.IDeleteClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteClusterRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteClusterRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteCluster request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteClusterRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteCluster response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteCluster(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteClusterRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteCluster response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Creates an app profile within an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance in which to create the new app + * profile. Values are of the form `projects/{project}/instances/{instance}`. + * @param {string} request.appProfileId + * Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * @param {google.bigtable.admin.v2.AppProfile} request.appProfile + * Required. The app profile to be created. + * Fields marked `OutputOnly` will be ignored. + * @param {boolean} request.ignoreWarnings + * If true, ignore safety checks when creating the app profile. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.AppProfile|AppProfile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async + */ + createAppProfile( + request?: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.ICreateAppProfileRequest | undefined, + {} | undefined, + ] + >; + createAppProfile( + request: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IAppProfile, + | protos.google.bigtable.admin.v2.ICreateAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createAppProfile( + request: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IAppProfile, + | protos.google.bigtable.admin.v2.ICreateAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createAppProfile( + request?: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IAppProfile, + | protos.google.bigtable.admin.v2.ICreateAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IAppProfile, + | protos.google.bigtable.admin.v2.ICreateAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.ICreateAppProfileRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createAppProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IAppProfile, + | protos.google.bigtable.admin.v2.ICreateAppProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createAppProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createAppProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.ICreateAppProfileRequest | undefined, + {} | undefined, + ]) => { + this._log.info('createAppProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets information about an app profile. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested app profile. Values are of the + * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.AppProfile|AppProfile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async + */ + getAppProfile( + request?: protos.google.bigtable.admin.v2.IGetAppProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IGetAppProfileRequest | undefined, + {} | undefined, + ] + >; + getAppProfile( + request: protos.google.bigtable.admin.v2.IGetAppProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, + {} | null | undefined + >, + ): void; + getAppProfile( + request: protos.google.bigtable.admin.v2.IGetAppProfileRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, + {} | null | undefined + >, + ): void; + getAppProfile( + request?: protos.google.bigtable.admin.v2.IGetAppProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IAppProfile, + | protos.google.bigtable.admin.v2.IGetAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IGetAppProfileRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getAppProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IAppProfile, + | protos.google.bigtable.admin.v2.IGetAppProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAppProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getAppProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IGetAppProfileRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getAppProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes an app profile from an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the app profile to be deleted. Values are of + * the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * @param {boolean} request.ignoreWarnings + * Required. If true, ignore safety checks when deleting the app profile. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async + */ + deleteAppProfile( + request?: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | undefined, + {} | undefined, + ] + >; + deleteAppProfile( + request: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteAppProfile( + request: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteAppProfile( + request?: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAppProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteAppProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAppProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteAppProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteAppProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteAppProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets the access control policy for an instance resource. Returns an empty + * policy if an instance exists but does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined, + ] + >; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getIamPolicy request %j', request); + const wrappedCallback: + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getIamPolicy(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getIamPolicy response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Sets the access control policy on an instance resource. Replaces any + * existing policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined, + ] + >; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('setIamPolicy request %j', request); + const wrappedCallback: + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('setIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .setIamPolicy(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined, + ]) => { + this._log.info('setIamPolicy response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Returns permissions that the caller has on the specified instance resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async + */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined, + ] + >; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + ): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + ): void; + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('testIamPermissions request %j', request); + const wrappedCallback: + | Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('testIamPermissions response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .testIamPermissions(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined, + ]) => { + this._log.info('testIamPermissions response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets information about a logical view. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested logical view. Values are of the + * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.LogicalView|LogicalView}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_async + */ + getLogicalView( + request?: protos.google.bigtable.admin.v2.IGetLogicalViewRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IGetLogicalViewRequest | undefined, + {} | undefined, + ] + >; + getLogicalView( + request: protos.google.bigtable.admin.v2.IGetLogicalViewRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IGetLogicalViewRequest | null | undefined, + {} | null | undefined + >, + ): void; + getLogicalView( + request: protos.google.bigtable.admin.v2.IGetLogicalViewRequest, + callback: Callback< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IGetLogicalViewRequest | null | undefined, + {} | null | undefined + >, + ): void; + getLogicalView( + request?: protos.google.bigtable.admin.v2.IGetLogicalViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.ILogicalView, + | protos.google.bigtable.admin.v2.IGetLogicalViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IGetLogicalViewRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IGetLogicalViewRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getLogicalView request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.ILogicalView, + | protos.google.bigtable.admin.v2.IGetLogicalViewRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getLogicalView response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getLogicalView(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IGetLogicalViewRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getLogicalView response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a logical view from an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the logical view to be deleted. + * Format: + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + * @param {string} [request.etag] + * Optional. The current etag of the logical view. + * If an etag is provided and does not match the current etag of the + * logical view, deletion will be blocked and an ABORTED error will be + * returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_async + */ + deleteLogicalView( + request?: protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest | undefined, + {} | undefined, + ] + >; + deleteLogicalView( + request: protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteLogicalView( + request: protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteLogicalView( + request?: protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteLogicalView request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteLogicalView response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteLogicalView(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteLogicalViewRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteLogicalView response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets information about a materialized view. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested materialized view. Values are of + * the form + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.MaterializedView|MaterializedView}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_async + */ + getMaterializedView( + request?: protos.google.bigtable.admin.v2.IGetMaterializedViewRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IGetMaterializedViewRequest | undefined, + {} | undefined, + ] + >; + getMaterializedView( + request: protos.google.bigtable.admin.v2.IGetMaterializedViewRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IMaterializedView, + | protos.google.bigtable.admin.v2.IGetMaterializedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMaterializedView( + request: protos.google.bigtable.admin.v2.IGetMaterializedViewRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IMaterializedView, + | protos.google.bigtable.admin.v2.IGetMaterializedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMaterializedView( + request?: protos.google.bigtable.admin.v2.IGetMaterializedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IMaterializedView, + | protos.google.bigtable.admin.v2.IGetMaterializedViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IMaterializedView, + | protos.google.bigtable.admin.v2.IGetMaterializedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IGetMaterializedViewRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getMaterializedView request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IMaterializedView, + | protos.google.bigtable.admin.v2.IGetMaterializedViewRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMaterializedView response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getMaterializedView(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IMaterializedView, + ( + | protos.google.bigtable.admin.v2.IGetMaterializedViewRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getMaterializedView response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a materialized view from an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the materialized view to be deleted. + * Format: + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + * @param {string} [request.etag] + * Optional. The current etag of the materialized view. + * If an etag is provided and does not match the current etag of the + * materialized view, deletion will be blocked and an ABORTED error will be + * returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_async + */ + deleteMaterializedView( + request?: protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest + | undefined + ), + {} | undefined, + ] + >; + deleteMaterializedView( + request: protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteMaterializedView( + request: protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteMaterializedView( + request?: protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteMaterializedView request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteMaterializedView response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteMaterializedView(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.bigtable.admin.v2.IDeleteMaterializedViewRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteMaterializedView response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + + /** + * Create an instance within a project. + * + * Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If + * serve_nodes is set to non-zero, then the cluster is manually scaled. If + * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + * enabled. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the project in which to create the new + * instance. Values are of the form `projects/{project}`. + * @param {string} request.instanceId + * Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than + * `projects/myproject/instances/myinstance`. + * @param {google.bigtable.admin.v2.Instance} request.instance + * Required. The instance to create. + * Fields marked `OutputOnly` must be left blank. + * @param {number[]} request.clusters + * Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * Fields marked `OutputOnly` must be left blank. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async + */ + createInstance( + request?: protos.google.bigtable.admin.v2.ICreateInstanceRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createInstance( + request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createInstance( + request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createInstance( + request?: protos.google.bigtable.admin.v2.ICreateInstanceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createInstance response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createInstance request %j', request); + return this.innerApiCalls + .createInstance(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createInstance response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createInstance()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async + */ + async checkCreateInstanceProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Instance, + protos.google.bigtable.admin.v2.CreateInstanceMetadata + > + > { + this._log.info('createInstance long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createInstance, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Instance, + protos.google.bigtable.admin.v2.CreateInstanceMetadata + >; + } + /** + * Partially updates an instance within a project. This method can modify all + * fields of an Instance and is the preferred way to update an Instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.Instance} request.instance + * Required. The Instance which will (partially) replace the current value. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The subset of Instance fields which should be replaced. + * Must be explicitly set. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async + */ + partialUpdateInstance( + request?: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + partialUpdateInstance( + request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + partialUpdateInstance( + request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + partialUpdateInstance( + request?: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'instance.name': request.instance!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('partialUpdateInstance response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('partialUpdateInstance request %j', request); + return this.innerApiCalls + .partialUpdateInstance(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('partialUpdateInstance response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `partialUpdateInstance()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async + */ + async checkPartialUpdateInstanceProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Instance, + protos.google.bigtable.admin.v2.UpdateInstanceMetadata + > + > { + this._log.info('partialUpdateInstance long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.partialUpdateInstance, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Instance, + protos.google.bigtable.admin.v2.UpdateInstanceMetadata + >; + } + /** + * Creates a cluster within an instance. + * + * Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If + * serve_nodes is set to non-zero, then the cluster is manually scaled. If + * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + * enabled. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance in which to create the new + * cluster. Values are of the form `projects/{project}/instances/{instance}`. + * @param {string} request.clusterId + * Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * @param {google.bigtable.admin.v2.Cluster} request.cluster + * Required. The cluster to be created. + * Fields marked `OutputOnly` must be left blank. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async + */ + createCluster( + request?: protos.google.bigtable.admin.v2.ICreateClusterRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createCluster( + request: protos.google.bigtable.admin.v2.ICreateClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createCluster( + request: protos.google.bigtable.admin.v2.ICreateClusterRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createCluster( + request?: protos.google.bigtable.admin.v2.ICreateClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createCluster response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createCluster request %j', request); + return this.innerApiCalls + .createCluster(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createCluster response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async + */ + async checkCreateClusterProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Cluster, + protos.google.bigtable.admin.v2.CreateClusterMetadata + > + > { + this._log.info('createCluster long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createCluster, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Cluster, + protos.google.bigtable.admin.v2.CreateClusterMetadata + >; + } + /** + * Updates a cluster within an instance. + * + * Note that UpdateCluster does not support updating + * cluster_config.cluster_autoscaling_config. In order to update it, you + * must use PartialUpdateCluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The unique name of the cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{@link protos.-a-z0-9|a-z}*`. + * @param {string} request.location + * Immutable. The location where this cluster's nodes and storage reside. For + * best performance, clients should be located as close as possible to this + * cluster. Currently only zones are supported, so values should be of the + * form `projects/{project}/locations/{zone}`. + * @param {google.bigtable.admin.v2.Cluster.State} request.state + * Output only. The current state of the cluster. + * @param {number} request.serveNodes + * The number of nodes in the cluster. If no value is set, + * Cloud Bigtable automatically allocates nodes based on your data footprint + * and optimized for 50% storage utilization. + * @param {google.bigtable.admin.v2.Cluster.NodeScalingFactor} request.nodeScalingFactor + * Immutable. The node scaling factor of this cluster. + * @param {google.bigtable.admin.v2.Cluster.ClusterConfig} request.clusterConfig + * Configuration for this cluster. + * @param {google.bigtable.admin.v2.StorageType} request.defaultStorageType + * Immutable. The type of storage used by this cluster to serve its + * parent instance's tables, unless explicitly overridden. + * @param {google.bigtable.admin.v2.Cluster.EncryptionConfig} request.encryptionConfig + * Immutable. The encryption configuration for CMEK-protected clusters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async + */ + updateCluster( + request?: protos.google.bigtable.admin.v2.ICluster, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateCluster( + request: protos.google.bigtable.admin.v2.ICluster, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateCluster( + request: protos.google.bigtable.admin.v2.ICluster, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateCluster( + request?: protos.google.bigtable.admin.v2.ICluster, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateCluster response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateCluster request %j', request); + return this.innerApiCalls + .updateCluster(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateCluster response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async + */ + async checkUpdateClusterProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Cluster, + protos.google.bigtable.admin.v2.UpdateClusterMetadata + > + > { + this._log.info('updateCluster long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateCluster, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Cluster, + protos.google.bigtable.admin.v2.UpdateClusterMetadata + >; + } + /** + * Partially updates a cluster within a project. This method is the preferred + * way to update a Cluster. + * + * To enable and update autoscaling, set + * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, + * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it + * are ignored. Note that an update cannot simultaneously set serve_nodes to + * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and + * also specify both in the update_mask. + * + * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, + * and explicitly set a serve_node count via the update_mask. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.Cluster} request.cluster + * Required. The Cluster which contains the partial updates to be applied, + * subject to the update_mask. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The subset of Cluster fields which should be replaced. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async + */ + partialUpdateCluster( + request?: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + partialUpdateCluster( + request: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + partialUpdateCluster( + request: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + partialUpdateCluster( + request?: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'cluster.name': request.cluster!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('partialUpdateCluster response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('partialUpdateCluster request %j', request); + return this.innerApiCalls + .partialUpdateCluster(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('partialUpdateCluster response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `partialUpdateCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async + */ + async checkPartialUpdateClusterProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Cluster, + protos.google.bigtable.admin.v2.PartialUpdateClusterMetadata + > + > { + this._log.info('partialUpdateCluster long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.partialUpdateCluster, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Cluster, + protos.google.bigtable.admin.v2.PartialUpdateClusterMetadata + >; + } + /** + * Updates an app profile within an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.AppProfile} request.appProfile + * Required. The app profile which will (partially) replace the current value. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The subset of app profile fields which should be replaced. + * If unset, all fields will be replaced. + * @param {boolean} request.ignoreWarnings + * If true, ignore safety checks when updating the app profile. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async + */ + updateAppProfile( + request?: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateAppProfile( + request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateAppProfile( + request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateAppProfile( + request?: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'app_profile.name': request.appProfile!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateAppProfile response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateAppProfile request %j', request); + return this.innerApiCalls + .updateAppProfile(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateAppProfile response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateAppProfile()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async + */ + async checkUpdateAppProfileProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.AppProfile, + protos.google.bigtable.admin.v2.UpdateAppProfileMetadata + > + > { + this._log.info('updateAppProfile long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateAppProfile, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.AppProfile, + protos.google.bigtable.admin.v2.UpdateAppProfileMetadata + >; + } + /** + * Creates a logical view within an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent instance where this logical view will be created. + * Format: `projects/{project}/instances/{instance}`. + * @param {string} request.logicalViewId + * Required. The ID to use for the logical view, which will become the final + * component of the logical view's resource name. + * @param {google.bigtable.admin.v2.LogicalView} request.logicalView + * Required. The logical view to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async + */ + createLogicalView( + request?: protos.google.bigtable.admin.v2.ICreateLogicalViewRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createLogicalView( + request: protos.google.bigtable.admin.v2.ICreateLogicalViewRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createLogicalView( + request: protos.google.bigtable.admin.v2.ICreateLogicalViewRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createLogicalView( + request?: protos.google.bigtable.admin.v2.ICreateLogicalViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createLogicalView response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createLogicalView request %j', request); + return this.innerApiCalls + .createLogicalView(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createLogicalView response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createLogicalView()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async + */ + async checkCreateLogicalViewProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.LogicalView, + protos.google.bigtable.admin.v2.CreateLogicalViewMetadata + > + > { + this._log.info('createLogicalView long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createLogicalView, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.LogicalView, + protos.google.bigtable.admin.v2.CreateLogicalViewMetadata + >; + } + /** + * Updates a logical view within an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.LogicalView} request.logicalView + * Required. The logical view to update. + * + * The logical view's `name` field is used to identify the view to update. + * Format: + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_async + */ + updateLogicalView( + request?: protos.google.bigtable.admin.v2.IUpdateLogicalViewRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateLogicalView( + request: protos.google.bigtable.admin.v2.IUpdateLogicalViewRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateLogicalView( + request: protos.google.bigtable.admin.v2.IUpdateLogicalViewRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateLogicalView( + request?: protos.google.bigtable.admin.v2.IUpdateLogicalViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'logical_view.name': request.logicalView!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateLogicalView response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateLogicalView request %j', request); + return this.innerApiCalls + .updateLogicalView(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateLogicalView response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateLogicalView()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_async + */ + async checkUpdateLogicalViewProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.LogicalView, + protos.google.bigtable.admin.v2.UpdateLogicalViewMetadata + > + > { + this._log.info('updateLogicalView long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateLogicalView, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.LogicalView, + protos.google.bigtable.admin.v2.UpdateLogicalViewMetadata + >; + } + /** + * Creates a materialized view within an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent instance where this materialized view will be created. + * Format: `projects/{project}/instances/{instance}`. + * @param {string} request.materializedViewId + * Required. The ID to use for the materialized view, which will become the + * final component of the materialized view's resource name. + * @param {google.bigtable.admin.v2.MaterializedView} request.materializedView + * Required. The materialized view to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_async + */ + createMaterializedView( + request?: protos.google.bigtable.admin.v2.ICreateMaterializedViewRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createMaterializedView( + request: protos.google.bigtable.admin.v2.ICreateMaterializedViewRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createMaterializedView( + request: protos.google.bigtable.admin.v2.ICreateMaterializedViewRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createMaterializedView( + request?: protos.google.bigtable.admin.v2.ICreateMaterializedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createMaterializedView response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createMaterializedView request %j', request); + return this.innerApiCalls + .createMaterializedView(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createMaterializedView response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createMaterializedView()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_async + */ + async checkCreateMaterializedViewProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.MaterializedView, + protos.google.bigtable.admin.v2.CreateMaterializedViewMetadata + > + > { + this._log.info('createMaterializedView long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createMaterializedView, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.MaterializedView, + protos.google.bigtable.admin.v2.CreateMaterializedViewMetadata + >; + } + /** + * Updates a materialized view within an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.MaterializedView} request.materializedView + * Required. The materialized view to update. + * + * The materialized view's `name` field is used to identify the view to + * update. Format: + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_async + */ + updateMaterializedView( + request?: protos.google.bigtable.admin.v2.IUpdateMaterializedViewRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateMaterializedView( + request: protos.google.bigtable.admin.v2.IUpdateMaterializedViewRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateMaterializedView( + request: protos.google.bigtable.admin.v2.IUpdateMaterializedViewRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateMaterializedView( + request?: protos.google.bigtable.admin.v2.IUpdateMaterializedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'materialized_view.name': request.materializedView!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateMaterializedView response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateMaterializedView request %j', request); + return this.innerApiCalls + .updateMaterializedView(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateMaterializedView response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateMaterializedView()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_async + */ + async checkUpdateMaterializedViewProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.MaterializedView, + protos.google.bigtable.admin.v2.UpdateMaterializedViewMetadata + > + > { + this._log.info('updateMaterializedView long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateMaterializedView, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.MaterializedView, + protos.google.bigtable.admin.v2.UpdateMaterializedViewMetadata + >; + } + /** + * Lists information about app profiles in an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.AppProfile|AppProfile}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAppProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAppProfiles( + request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAppProfile[], + protos.google.bigtable.admin.v2.IListAppProfilesRequest | null, + protos.google.bigtable.admin.v2.IListAppProfilesResponse, + ] + >; + listAppProfiles( + request: protos.google.bigtable.admin.v2.IListAppProfilesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListAppProfilesRequest, + | protos.google.bigtable.admin.v2.IListAppProfilesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAppProfile + >, + ): void; + listAppProfiles( + request: protos.google.bigtable.admin.v2.IListAppProfilesRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListAppProfilesRequest, + | protos.google.bigtable.admin.v2.IListAppProfilesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAppProfile + >, + ): void; + listAppProfiles( + request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListAppProfilesRequest, + | protos.google.bigtable.admin.v2.IListAppProfilesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAppProfile + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListAppProfilesRequest, + | protos.google.bigtable.admin.v2.IListAppProfilesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAppProfile + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAppProfile[], + protos.google.bigtable.admin.v2.IListAppProfilesRequest | null, + protos.google.bigtable.admin.v2.IListAppProfilesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListAppProfilesRequest, + | protos.google.bigtable.admin.v2.IListAppProfilesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAppProfile + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAppProfiles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAppProfiles request %j', request); + return this.innerApiCalls + .listAppProfiles(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.IAppProfile[], + protos.google.bigtable.admin.v2.IListAppProfilesRequest | null, + protos.google.bigtable.admin.v2.IListAppProfilesResponse, + ]) => { + this._log.info('listAppProfiles values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listAppProfiles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.AppProfile|AppProfile} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAppProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAppProfilesStream( + request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAppProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listAppProfiles stream %j', request); + return this.descriptors.page.listAppProfiles.createStream( + this.innerApiCalls.listAppProfiles as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listAppProfiles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.AppProfile|AppProfile}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async + */ + listAppProfilesAsync( + request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAppProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listAppProfiles iterate %j', request); + return this.descriptors.page.listAppProfiles.asyncIterate( + this.innerApiCalls['listAppProfiles'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists hot tablets in a cluster, within the time range provided. Hot + * tablets are ordered based on CPU usage. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {google.protobuf.Timestamp} request.startTime + * The start time to list hot tablets. The hot tablets in the response will + * have start times between the requested start time and end time. Start time + * defaults to Now if it is unset, and end time defaults to Now - 24 hours if + * it is unset. The start time should be less than the end time, and the + * maximum allowed time range between start time and end time is 48 hours. + * Start time and end time should have values between Now and Now - 14 days. + * @param {google.protobuf.Timestamp} request.endTime + * The end time to list hot tablets. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size that is empty or zero lets the server choose the number of + * items to return. A page_size which is strictly positive will return at most + * that many items. A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls do not need a + * page_size field. If a page_size is set in subsequent calls, it must match + * the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.HotTablet|HotTablet}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listHotTabletsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listHotTablets( + request?: protos.google.bigtable.admin.v2.IListHotTabletsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IHotTablet[], + protos.google.bigtable.admin.v2.IListHotTabletsRequest | null, + protos.google.bigtable.admin.v2.IListHotTabletsResponse, + ] + >; + listHotTablets( + request: protos.google.bigtable.admin.v2.IListHotTabletsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListHotTabletsRequest, + | protos.google.bigtable.admin.v2.IListHotTabletsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IHotTablet + >, + ): void; + listHotTablets( + request: protos.google.bigtable.admin.v2.IListHotTabletsRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListHotTabletsRequest, + | protos.google.bigtable.admin.v2.IListHotTabletsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IHotTablet + >, + ): void; + listHotTablets( + request?: protos.google.bigtable.admin.v2.IListHotTabletsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListHotTabletsRequest, + | protos.google.bigtable.admin.v2.IListHotTabletsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IHotTablet + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListHotTabletsRequest, + | protos.google.bigtable.admin.v2.IListHotTabletsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IHotTablet + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IHotTablet[], + protos.google.bigtable.admin.v2.IListHotTabletsRequest | null, + protos.google.bigtable.admin.v2.IListHotTabletsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListHotTabletsRequest, + | protos.google.bigtable.admin.v2.IListHotTabletsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IHotTablet + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listHotTablets values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listHotTablets request %j', request); + return this.innerApiCalls + .listHotTablets(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.IHotTablet[], + protos.google.bigtable.admin.v2.IListHotTabletsRequest | null, + protos.google.bigtable.admin.v2.IListHotTabletsResponse, + ]) => { + this._log.info('listHotTablets values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listHotTablets`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {google.protobuf.Timestamp} request.startTime + * The start time to list hot tablets. The hot tablets in the response will + * have start times between the requested start time and end time. Start time + * defaults to Now if it is unset, and end time defaults to Now - 24 hours if + * it is unset. The start time should be less than the end time, and the + * maximum allowed time range between start time and end time is 48 hours. + * Start time and end time should have values between Now and Now - 14 days. + * @param {google.protobuf.Timestamp} request.endTime + * The end time to list hot tablets. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size that is empty or zero lets the server choose the number of + * items to return. A page_size which is strictly positive will return at most + * that many items. A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls do not need a + * page_size field. If a page_size is set in subsequent calls, it must match + * the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.HotTablet|HotTablet} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listHotTabletsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listHotTabletsStream( + request?: protos.google.bigtable.admin.v2.IListHotTabletsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listHotTablets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listHotTablets stream %j', request); + return this.descriptors.page.listHotTablets.createStream( + this.innerApiCalls.listHotTablets as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listHotTablets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {google.protobuf.Timestamp} request.startTime + * The start time to list hot tablets. The hot tablets in the response will + * have start times between the requested start time and end time. Start time + * defaults to Now if it is unset, and end time defaults to Now - 24 hours if + * it is unset. The start time should be less than the end time, and the + * maximum allowed time range between start time and end time is 48 hours. + * Start time and end time should have values between Now and Now - 14 days. + * @param {google.protobuf.Timestamp} request.endTime + * The end time to list hot tablets. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size that is empty or zero lets the server choose the number of + * items to return. A page_size which is strictly positive will return at most + * that many items. A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls do not need a + * page_size field. If a page_size is set in subsequent calls, it must match + * the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.HotTablet|HotTablet}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async + */ + listHotTabletsAsync( + request?: protos.google.bigtable.admin.v2.IListHotTabletsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listHotTablets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listHotTablets iterate %j', request); + return this.descriptors.page.listHotTablets.asyncIterate( + this.innerApiCalls['listHotTablets'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists information about logical views in an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which the list of logical + * views is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of logical views to return. The service may + * return fewer than this value + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListLogicalViews` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListLogicalViews` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.LogicalView|LogicalView}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listLogicalViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listLogicalViews( + request?: protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ILogicalView[], + protos.google.bigtable.admin.v2.IListLogicalViewsRequest | null, + protos.google.bigtable.admin.v2.IListLogicalViewsResponse, + ] + >; + listLogicalViews( + request: protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + | protos.google.bigtable.admin.v2.IListLogicalViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ILogicalView + >, + ): void; + listLogicalViews( + request: protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + | protos.google.bigtable.admin.v2.IListLogicalViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ILogicalView + >, + ): void; + listLogicalViews( + request?: protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + | protos.google.bigtable.admin.v2.IListLogicalViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ILogicalView + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + | protos.google.bigtable.admin.v2.IListLogicalViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ILogicalView + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ILogicalView[], + protos.google.bigtable.admin.v2.IListLogicalViewsRequest | null, + protos.google.bigtable.admin.v2.IListLogicalViewsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + | protos.google.bigtable.admin.v2.IListLogicalViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ILogicalView + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listLogicalViews values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listLogicalViews request %j', request); + return this.innerApiCalls + .listLogicalViews(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.ILogicalView[], + protos.google.bigtable.admin.v2.IListLogicalViewsRequest | null, + protos.google.bigtable.admin.v2.IListLogicalViewsResponse, + ]) => { + this._log.info('listLogicalViews values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listLogicalViews`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which the list of logical + * views is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of logical views to return. The service may + * return fewer than this value + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListLogicalViews` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListLogicalViews` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.LogicalView|LogicalView} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLogicalViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listLogicalViewsStream( + request?: protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listLogicalViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listLogicalViews stream %j', request); + return this.descriptors.page.listLogicalViews.createStream( + this.innerApiCalls.listLogicalViews as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listLogicalViews`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which the list of logical + * views is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of logical views to return. The service may + * return fewer than this value + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListLogicalViews` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListLogicalViews` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.LogicalView|LogicalView}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_async + */ + listLogicalViewsAsync( + request?: protos.google.bigtable.admin.v2.IListLogicalViewsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listLogicalViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listLogicalViews iterate %j', request); + return this.descriptors.page.listLogicalViews.asyncIterate( + this.innerApiCalls['listLogicalViews'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists information about materialized views in an instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which the list of + * materialized views is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of materialized views to return. The service + * may return fewer than this value + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMaterializedViews` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMaterializedViews` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.MaterializedView|MaterializedView}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMaterializedViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMaterializedViews( + request?: protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IMaterializedView[], + protos.google.bigtable.admin.v2.IListMaterializedViewsRequest | null, + protos.google.bigtable.admin.v2.IListMaterializedViewsResponse, + ] + >; + listMaterializedViews( + request: protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + | protos.google.bigtable.admin.v2.IListMaterializedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IMaterializedView + >, + ): void; + listMaterializedViews( + request: protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + | protos.google.bigtable.admin.v2.IListMaterializedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IMaterializedView + >, + ): void; + listMaterializedViews( + request?: protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + | protos.google.bigtable.admin.v2.IListMaterializedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IMaterializedView + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + | protos.google.bigtable.admin.v2.IListMaterializedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IMaterializedView + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IMaterializedView[], + protos.google.bigtable.admin.v2.IListMaterializedViewsRequest | null, + protos.google.bigtable.admin.v2.IListMaterializedViewsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + | protos.google.bigtable.admin.v2.IListMaterializedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IMaterializedView + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMaterializedViews values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMaterializedViews request %j', request); + return this.innerApiCalls + .listMaterializedViews(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.IMaterializedView[], + protos.google.bigtable.admin.v2.IListMaterializedViewsRequest | null, + protos.google.bigtable.admin.v2.IListMaterializedViewsResponse, + ]) => { + this._log.info('listMaterializedViews values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listMaterializedViews`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which the list of + * materialized views is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of materialized views to return. The service + * may return fewer than this value + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMaterializedViews` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMaterializedViews` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.MaterializedView|MaterializedView} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMaterializedViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMaterializedViewsStream( + request?: protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMaterializedViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMaterializedViews stream %j', request); + return this.descriptors.page.listMaterializedViews.createStream( + this.innerApiCalls.listMaterializedViews as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listMaterializedViews`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which the list of + * materialized views is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of materialized views to return. The service + * may return fewer than this value + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMaterializedViews` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMaterializedViews` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.MaterializedView|MaterializedView}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_async + */ + listMaterializedViewsAsync( + request?: protos.google.bigtable.admin.v2.IListMaterializedViewsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMaterializedViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMaterializedViews iterate %j', request); + return this.descriptors.page.listMaterializedViews.asyncIterate( + this.innerApiCalls['listMaterializedViews'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified appProfile resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} app_profile + * @returns {string} Resource name string. + */ + appProfilePath(project: string, instance: string, appProfile: string) { + return this.pathTemplates.appProfilePathTemplate.render({ + project: project, + instance: instance, + app_profile: appProfile, + }); + } + + /** + * Parse the project from AppProfile resource. + * + * @param {string} appProfileName + * A fully-qualified path representing AppProfile resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAppProfileName(appProfileName: string) { + return this.pathTemplates.appProfilePathTemplate.match(appProfileName) + .project; + } + + /** + * Parse the instance from AppProfile resource. + * + * @param {string} appProfileName + * A fully-qualified path representing AppProfile resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromAppProfileName(appProfileName: string) { + return this.pathTemplates.appProfilePathTemplate.match(appProfileName) + .instance; + } + + /** + * Parse the app_profile from AppProfile resource. + * + * @param {string} appProfileName + * A fully-qualified path representing AppProfile resource. + * @returns {string} A string representing the app_profile. + */ + matchAppProfileFromAppProfileName(appProfileName: string) { + return this.pathTemplates.appProfilePathTemplate.match(appProfileName) + .app_profile; + } + + /** + * Return a fully-qualified authorizedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @param {string} authorized_view + * @returns {string} Resource name string. + */ + authorizedViewPath( + project: string, + instance: string, + table: string, + authorizedView: string, + ) { + return this.pathTemplates.authorizedViewPathTemplate.render({ + project: project, + instance: instance, + table: table, + authorized_view: authorizedView, + }); + } + + /** + * Parse the project from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).project; + } + + /** + * Parse the instance from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).instance; + } + + /** + * Parse the table from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the table. + */ + matchTableFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).table; + } + + /** + * Parse the authorized_view from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the authorized_view. + */ + matchAuthorizedViewFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).authorized_view; + } + + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} cluster + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + instance: string, + cluster: string, + backup: string, + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + instance: instance, + cluster: cluster, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the instance from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).instance; + } + + /** + * Parse the cluster from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).cluster; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified cluster resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} cluster + * @returns {string} Resource name string. + */ + clusterPath(project: string, instance: string, cluster: string) { + return this.pathTemplates.clusterPathTemplate.render({ + project: project, + instance: instance, + cluster: cluster, + }); + } + + /** + * Parse the project from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).project; + } + + /** + * Parse the instance from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).instance; + } + + /** + * Parse the cluster from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).cluster; + } + + /** + * Return a fully-qualified hotTablet resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} cluster + * @param {string} hot_tablet + * @returns {string} Resource name string. + */ + hotTabletPath( + project: string, + instance: string, + cluster: string, + hotTablet: string, + ) { + return this.pathTemplates.hotTabletPathTemplate.render({ + project: project, + instance: instance, + cluster: cluster, + hot_tablet: hotTablet, + }); + } + + /** + * Parse the project from HotTablet resource. + * + * @param {string} hotTabletName + * A fully-qualified path representing HotTablet resource. + * @returns {string} A string representing the project. + */ + matchProjectFromHotTabletName(hotTabletName: string) { + return this.pathTemplates.hotTabletPathTemplate.match(hotTabletName) + .project; + } + + /** + * Parse the instance from HotTablet resource. + * + * @param {string} hotTabletName + * A fully-qualified path representing HotTablet resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromHotTabletName(hotTabletName: string) { + return this.pathTemplates.hotTabletPathTemplate.match(hotTabletName) + .instance; + } + + /** + * Parse the cluster from HotTablet resource. + * + * @param {string} hotTabletName + * A fully-qualified path representing HotTablet resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromHotTabletName(hotTabletName: string) { + return this.pathTemplates.hotTabletPathTemplate.match(hotTabletName) + .cluster; + } + + /** + * Parse the hot_tablet from HotTablet resource. + * + * @param {string} hotTabletName + * A fully-qualified path representing HotTablet resource. + * @returns {string} A string representing the hot_tablet. + */ + matchHotTabletFromHotTabletName(hotTabletName: string) { + return this.pathTemplates.hotTabletPathTemplate.match(hotTabletName) + .hot_tablet; + } + + /** + * Return a fully-qualified instance resource name string. + * + * @param {string} project + * @param {string} instance + * @returns {string} Resource name string. + */ + instancePath(project: string, instance: string) { + return this.pathTemplates.instancePathTemplate.render({ + project: project, + instance: instance, + }); + } + + /** + * Parse the project from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).project; + } + + /** + * Parse the instance from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).instance; + } + + /** + * Return a fully-qualified logicalView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} logical_view + * @returns {string} Resource name string. + */ + logicalViewPath(project: string, instance: string, logicalView: string) { + return this.pathTemplates.logicalViewPathTemplate.render({ + project: project, + instance: instance, + logical_view: logicalView, + }); + } + + /** + * Parse the project from LogicalView resource. + * + * @param {string} logicalViewName + * A fully-qualified path representing LogicalView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLogicalViewName(logicalViewName: string) { + return this.pathTemplates.logicalViewPathTemplate.match(logicalViewName) + .project; + } + + /** + * Parse the instance from LogicalView resource. + * + * @param {string} logicalViewName + * A fully-qualified path representing LogicalView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromLogicalViewName(logicalViewName: string) { + return this.pathTemplates.logicalViewPathTemplate.match(logicalViewName) + .instance; + } + + /** + * Parse the logical_view from LogicalView resource. + * + * @param {string} logicalViewName + * A fully-qualified path representing LogicalView resource. + * @returns {string} A string representing the logical_view. + */ + matchLogicalViewFromLogicalViewName(logicalViewName: string) { + return this.pathTemplates.logicalViewPathTemplate.match(logicalViewName) + .logical_view; + } + + /** + * Return a fully-qualified materializedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} materialized_view + * @returns {string} Resource name string. + */ + materializedViewPath( + project: string, + instance: string, + materializedView: string, + ) { + return this.pathTemplates.materializedViewPathTemplate.render({ + project: project, + instance: instance, + materialized_view: materializedView, + }); + } + + /** + * Parse the project from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).project; + } + + /** + * Parse the instance from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).instance; + } + + /** + * Parse the materialized_view from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the materialized_view. + */ + matchMaterializedViewFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).materialized_view; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified schemaBundle resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @param {string} schema_bundle + * @returns {string} Resource name string. + */ + schemaBundlePath( + project: string, + instance: string, + table: string, + schemaBundle: string, + ) { + return this.pathTemplates.schemaBundlePathTemplate.render({ + project: project, + instance: instance, + table: table, + schema_bundle: schemaBundle, + }); + } + + /** + * Parse the project from SchemaBundle resource. + * + * @param {string} schemaBundleName + * A fully-qualified path representing SchemaBundle resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSchemaBundleName(schemaBundleName: string) { + return this.pathTemplates.schemaBundlePathTemplate.match(schemaBundleName) + .project; + } + + /** + * Parse the instance from SchemaBundle resource. + * + * @param {string} schemaBundleName + * A fully-qualified path representing SchemaBundle resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromSchemaBundleName(schemaBundleName: string) { + return this.pathTemplates.schemaBundlePathTemplate.match(schemaBundleName) + .instance; + } + + /** + * Parse the table from SchemaBundle resource. + * + * @param {string} schemaBundleName + * A fully-qualified path representing SchemaBundle resource. + * @returns {string} A string representing the table. + */ + matchTableFromSchemaBundleName(schemaBundleName: string) { + return this.pathTemplates.schemaBundlePathTemplate.match(schemaBundleName) + .table; + } + + /** + * Parse the schema_bundle from SchemaBundle resource. + * + * @param {string} schemaBundleName + * A fully-qualified path representing SchemaBundle resource. + * @returns {string} A string representing the schema_bundle. + */ + matchSchemaBundleFromSchemaBundleName(schemaBundleName: string) { + return this.pathTemplates.schemaBundlePathTemplate.match(schemaBundleName) + .schema_bundle; + } + + /** + * Return a fully-qualified snapshot resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} cluster + * @param {string} snapshot + * @returns {string} Resource name string. + */ + snapshotPath( + project: string, + instance: string, + cluster: string, + snapshot: string, + ) { + return this.pathTemplates.snapshotPathTemplate.render({ + project: project, + instance: instance, + cluster: cluster, + snapshot: snapshot, + }); + } + + /** + * Parse the project from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).project; + } + + /** + * Parse the instance from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).instance; + } + + /** + * Parse the cluster from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).cluster; + } + + /** + * Parse the snapshot from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the snapshot. + */ + matchSnapshotFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).snapshot; + } + + /** + * Return a fully-qualified table resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @returns {string} Resource name string. + */ + tablePath(project: string, instance: string, table: string) { + return this.pathTemplates.tablePathTemplate.render({ + project: project, + instance: instance, + table: table, + }); + } + + /** + * Parse the project from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).project; + } + + /** + * Parse the instance from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).instance; + } + + /** + * Parse the table from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the table. + */ + matchTableFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).table; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.bigtableInstanceAdminStub && !this._terminated) { + return this.bigtableInstanceAdminStub.then((stub) => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_client_config.json b/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_client_config.json new file mode 100644 index 000000000000..08bab472f918 --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_client_config.json @@ -0,0 +1,179 @@ +{ + "interfaces": { + "google.bigtable.admin.v2.BigtableInstanceAdmin": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "264268458a9e88347dbacbd9398202ff5885a40b": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateInstance": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "UpdateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "PartialUpdateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "DeleteInstance": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetCluster": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "ListClusters": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "UpdateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "PartialUpdateCluster": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAppProfile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAppProfile": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "ListAppProfiles": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "UpdateAppProfile": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "DeleteAppProfile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "ListHotTablets": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "CreateLogicalView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetLogicalView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListLogicalViews": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateLogicalView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteLogicalView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateMaterializedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMaterializedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListMaterializedViews": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateMaterializedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteMaterializedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_proto_list.json b/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_proto_list.json new file mode 100644 index 000000000000..6a7b737f3e07 --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_instance_admin_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/bigtable/admin/v2/bigtable_instance_admin.proto", + "../../protos/google/bigtable/admin/v2/bigtable_table_admin.proto", + "../../protos/google/bigtable/admin/v2/common.proto", + "../../protos/google/bigtable/admin/v2/instance.proto", + "../../protos/google/bigtable/admin/v2/table.proto", + "../../protos/google/bigtable/admin/v2/types.proto" +] diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_proto_list.json b/packages/google-cloud-bigtable-api/src/v2/bigtable_proto_list.json new file mode 100644 index 000000000000..7103af1282a8 --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_proto_list.json @@ -0,0 +1,10 @@ +[ + "../../protos/google/bigtable/v2/bigtable.proto", + "../../protos/google/bigtable/v2/data.proto", + "../../protos/google/bigtable/v2/feature_flags.proto", + "../../protos/google/bigtable/v2/peer_info.proto", + "../../protos/google/bigtable/v2/request_stats.proto", + "../../protos/google/bigtable/v2/response_params.proto", + "../../protos/google/bigtable/v2/session.proto", + "../../protos/google/bigtable/v2/types.proto" +] diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_client.ts b/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_client.ts new file mode 100644 index 000000000000..b033144961ff --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_client.ts @@ -0,0 +1,7380 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import { Transform } from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v2/bigtable_table_admin_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './bigtable_table_admin_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for creating, configuring, and deleting Cloud Bigtable tables. + * + * + * Provides access to the table schemas only, not the data stored within + * the tables. + * @class + * @memberof v2 + */ +export class BigtableTableAdminClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: { [method: string]: gax.CallSettings }; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('bigtable-api'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: { [name: string]: Function }; + pathTemplates: { [name: string]: gax.PathTemplate }; + operationsClient: gax.OperationsClient; + bigtableTableAdminStub?: Promise<{ [name: string]: Function }>; + + /** + * Construct an instance of BigtableTableAdminClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BigtableTableAdminClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof BigtableTableAdminClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'bigtableadmin.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + appProfilePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/appProfiles/{app_profile}', + ), + authorizedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', + ), + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}', + ), + clusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/clusters/{cluster}', + ), + hotTabletPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/{hot_tablet}', + ), + instancePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}', + ), + logicalViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/logicalViews/{logical_view}', + ), + materializedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/materializedViews/{materialized_view}', + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}', + ), + schemaBundlePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}', + ), + snapshotPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}', + ), + tablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}', + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listTables: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'tables', + ), + listAuthorizedViews: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'authorizedViews', + ), + listSnapshots: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'snapshots', + ), + listBackups: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backups', + ), + listSchemaBundles: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'schemaBundles', + ), + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v2/{name=operations/**}:cancel', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v2/{name=operations/**}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v2/{name=operations/**}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v2/{name=operations/projects/**}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createTableFromSnapshotResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Table', + ) as gax.protobuf.Type; + const createTableFromSnapshotMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata', + ) as gax.protobuf.Type; + const updateTableResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Table', + ) as gax.protobuf.Type; + const updateTableMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateTableMetadata', + ) as gax.protobuf.Type; + const undeleteTableResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Table', + ) as gax.protobuf.Type; + const undeleteTableMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UndeleteTableMetadata', + ) as gax.protobuf.Type; + const createAuthorizedViewResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.AuthorizedView', + ) as gax.protobuf.Type; + const createAuthorizedViewMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateAuthorizedViewMetadata', + ) as gax.protobuf.Type; + const updateAuthorizedViewResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.AuthorizedView', + ) as gax.protobuf.Type; + const updateAuthorizedViewMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata', + ) as gax.protobuf.Type; + const snapshotTableResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Snapshot', + ) as gax.protobuf.Type; + const snapshotTableMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.SnapshotTableMetadata', + ) as gax.protobuf.Type; + const createBackupResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Backup', + ) as gax.protobuf.Type; + const createBackupMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateBackupMetadata', + ) as gax.protobuf.Type; + const restoreTableResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Table', + ) as gax.protobuf.Type; + const restoreTableMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.RestoreTableMetadata', + ) as gax.protobuf.Type; + const copyBackupResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Backup', + ) as gax.protobuf.Type; + const copyBackupMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CopyBackupMetadata', + ) as gax.protobuf.Type; + const createSchemaBundleResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.SchemaBundle', + ) as gax.protobuf.Type; + const createSchemaBundleMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateSchemaBundleMetadata', + ) as gax.protobuf.Type; + const updateSchemaBundleResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.SchemaBundle', + ) as gax.protobuf.Type; + const updateSchemaBundleMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateSchemaBundleMetadata', + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createTableFromSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createTableFromSnapshotResponse.decode.bind( + createTableFromSnapshotResponse, + ), + createTableFromSnapshotMetadata.decode.bind( + createTableFromSnapshotMetadata, + ), + ), + updateTable: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateTableResponse.decode.bind(updateTableResponse), + updateTableMetadata.decode.bind(updateTableMetadata), + ), + undeleteTable: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + undeleteTableResponse.decode.bind(undeleteTableResponse), + undeleteTableMetadata.decode.bind(undeleteTableMetadata), + ), + createAuthorizedView: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAuthorizedViewResponse.decode.bind(createAuthorizedViewResponse), + createAuthorizedViewMetadata.decode.bind(createAuthorizedViewMetadata), + ), + updateAuthorizedView: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAuthorizedViewResponse.decode.bind(updateAuthorizedViewResponse), + updateAuthorizedViewMetadata.decode.bind(updateAuthorizedViewMetadata), + ), + snapshotTable: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + snapshotTableResponse.decode.bind(snapshotTableResponse), + snapshotTableMetadata.decode.bind(snapshotTableMetadata), + ), + createBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupResponse.decode.bind(createBackupResponse), + createBackupMetadata.decode.bind(createBackupMetadata), + ), + restoreTable: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restoreTableResponse.decode.bind(restoreTableResponse), + restoreTableMetadata.decode.bind(restoreTableMetadata), + ), + copyBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + copyBackupResponse.decode.bind(copyBackupResponse), + copyBackupMetadata.decode.bind(copyBackupMetadata), + ), + createSchemaBundle: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createSchemaBundleResponse.decode.bind(createSchemaBundleResponse), + createSchemaBundleMetadata.decode.bind(createSchemaBundleMetadata), + ), + updateSchemaBundle: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateSchemaBundleResponse.decode.bind(updateSchemaBundleResponse), + updateSchemaBundleMetadata.decode.bind(updateSchemaBundleMetadata), + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.bigtable.admin.v2.BigtableTableAdmin', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + { 'x-goog-api-client': clientHeader.join(' ') }, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.bigtableTableAdminStub) { + return this.bigtableTableAdminStub; + } + + // Put together the "service stub" for + // google.bigtable.admin.v2.BigtableTableAdmin. + this.bigtableTableAdminStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.bigtable.admin.v2.BigtableTableAdmin', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.bigtable.admin.v2.BigtableTableAdmin, + this._opts, + this._providedCustomServicePath, + ) as Promise<{ [method: string]: Function }>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const bigtableTableAdminStubMethods = [ + 'createTable', + 'createTableFromSnapshot', + 'listTables', + 'getTable', + 'updateTable', + 'deleteTable', + 'undeleteTable', + 'createAuthorizedView', + 'listAuthorizedViews', + 'getAuthorizedView', + 'updateAuthorizedView', + 'deleteAuthorizedView', + 'modifyColumnFamilies', + 'dropRowRange', + 'generateConsistencyToken', + 'checkConsistency', + 'snapshotTable', + 'getSnapshot', + 'listSnapshots', + 'deleteSnapshot', + 'createBackup', + 'getBackup', + 'updateBackup', + 'deleteBackup', + 'listBackups', + 'restoreTable', + 'copyBackup', + 'getIamPolicy', + 'setIamPolicy', + 'testIamPermissions', + 'createSchemaBundle', + 'updateSchemaBundle', + 'getSchemaBundle', + 'listSchemaBundles', + 'deleteSchemaBundle', + ]; + for (const methodName of bigtableTableAdminStubMethods) { + const callPromise = this.bigtableTableAdminStub.then( + (stub) => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.bigtableTableAdminStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigtableadmin.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigtableadmin.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/bigtable.admin', + 'https://www.googleapis.com/auth/bigtable.admin.table', + 'https://www.googleapis.com/auth/cloud-bigtable.admin', + 'https://www.googleapis.com/auth/cloud-bigtable.admin.table', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Creates a new table in the specified instance. + * The table can be created with a full set of initial column families, + * specified in the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * @param {string} request.tableId + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * Maximum 50 characters. + * @param {google.bigtable.admin.v2.Table} request.table + * Required. The Table to create. + * @param {number[]} request.initialSplits + * The optional list of row keys that will be used to initially split the + * table into several tablets (tablets are similar to HBase regions). + * Given two split keys, `s1` and `s2`, three tablets will be created, + * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. + * + * Example: + * + * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` + * `"other", "zz"]` + * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` + * * Key assignment: + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Table|Table}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async + */ + createTable( + request?: protos.google.bigtable.admin.v2.ICreateTableRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableRequest | undefined, + {} | undefined, + ] + >; + createTable( + request: protos.google.bigtable.admin.v2.ICreateTableRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, + {} | null | undefined + >, + ): void; + createTable( + request: protos.google.bigtable.admin.v2.ICreateTableRequest, + callback: Callback< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, + {} | null | undefined + >, + ): void; + createTable( + request?: protos.google.bigtable.admin.v2.ICreateTableRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.ITable, + | protos.google.bigtable.admin.v2.ICreateTableRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createTable request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.ITable, + | protos.google.bigtable.admin.v2.ICreateTableRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createTable response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createTable(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableRequest | undefined, + {} | undefined, + ]) => { + this._log.info('createTable response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets metadata information about the specified table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested table. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {google.bigtable.admin.v2.Table.View} request.view + * The view to be applied to the returned table's fields. + * Defaults to `SCHEMA_VIEW` if unspecified. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Table|Table}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async + */ + getTable( + request?: protos.google.bigtable.admin.v2.IGetTableRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IGetTableRequest | undefined, + {} | undefined, + ] + >; + getTable( + request: protos.google.bigtable.admin.v2.IGetTableRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, + {} | null | undefined + >, + ): void; + getTable( + request: protos.google.bigtable.admin.v2.IGetTableRequest, + callback: Callback< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, + {} | null | undefined + >, + ): void; + getTable( + request?: protos.google.bigtable.admin.v2.IGetTableRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IGetTableRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getTable request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getTable response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getTable(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IGetTableRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getTable response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Permanently deletes a specified table and all of its data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the table to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async + */ + deleteTable( + request?: protos.google.bigtable.admin.v2.IDeleteTableRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteTableRequest | undefined, + {} | undefined, + ] + >; + deleteTable( + request: protos.google.bigtable.admin.v2.IDeleteTableRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteTable( + request: protos.google.bigtable.admin.v2.IDeleteTableRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteTable( + request?: protos.google.bigtable.admin.v2.IDeleteTableRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteTableRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteTableRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteTable request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteTableRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteTable response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteTable(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteTableRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteTable response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets information from a specified AuthorizedView. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @param {google.bigtable.admin.v2.AuthorizedView.ResponseView} [request.view] + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.AuthorizedView|AuthorizedView}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async + */ + getAuthorizedView( + request?: protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest | undefined, + {} | undefined, + ] + >; + getAuthorizedView( + request: protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getAuthorizedView( + request: protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getAuthorizedView( + request?: protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getAuthorizedView request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAuthorizedView response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getAuthorizedView(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getAuthorizedView response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Permanently deletes a specified AuthorizedView. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @param {string} [request.etag] + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async + */ + deleteAuthorizedView( + request?: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | undefined, + {} | undefined, + ] + >; + deleteAuthorizedView( + request: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteAuthorizedView( + request: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteAuthorizedView( + request?: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteAuthorizedView request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteAuthorizedView response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteAuthorizedView(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteAuthorizedView response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Performs a series of column family modifications on the specified table. + * Either all or none of the modifications will occur before this method + * returns, but data requests received prior to that point may see a table + * where only some modifications have taken effect. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the table whose families should be modified. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number[]} request.modifications + * Required. Modifications to be atomically applied to the specified table's + * families. Entries are applied in order, meaning that earlier modifications + * can be masked by later ones (in the case of repeated updates to the same + * family, for example). + * @param {boolean} [request.ignoreWarnings] + * Optional. If true, ignore safety checks when modifying the column families. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Table|Table}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async + */ + modifyColumnFamilies( + request?: protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest | undefined, + {} | undefined, + ] + >; + modifyColumnFamilies( + request: protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.ITable, + | protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + modifyColumnFamilies( + request: protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest, + callback: Callback< + protos.google.bigtable.admin.v2.ITable, + | protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + modifyColumnFamilies( + request?: protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.ITable, + | protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.ITable, + | protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('modifyColumnFamilies request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.ITable, + | protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('modifyColumnFamilies response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .modifyColumnFamilies(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.ITable, + ( + | protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('modifyColumnFamilies response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Permanently drop/delete a row range from a specified table. The request can + * specify whether to delete all rows in a table, or only those that match a + * particular prefix. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the table on which to drop a range of rows. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {Buffer} request.rowKeyPrefix + * Delete all rows that start with this row key prefix. Prefix cannot be + * zero length. + * @param {boolean} request.deleteAllDataFromTable + * Delete all rows in the table. Setting this to false is a no-op. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async + */ + dropRowRange( + request?: protos.google.bigtable.admin.v2.IDropRowRangeRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDropRowRangeRequest | undefined, + {} | undefined, + ] + >; + dropRowRange( + request: protos.google.bigtable.admin.v2.IDropRowRangeRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, + {} | null | undefined + >, + ): void; + dropRowRange( + request: protos.google.bigtable.admin.v2.IDropRowRangeRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, + {} | null | undefined + >, + ): void; + dropRowRange( + request?: protos.google.bigtable.admin.v2.IDropRowRangeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDropRowRangeRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDropRowRangeRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('dropRowRange request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDropRowRangeRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('dropRowRange response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .dropRowRange(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDropRowRangeRequest | undefined, + {} | undefined, + ]) => { + this._log.info('dropRowRange response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Generates a consistency token for a Table, which can be used in + * CheckConsistency to check whether mutations to the table that finished + * before this call started have been replicated. The tokens will be available + * for 90 days. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the Table for which to create a consistency + * token. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.GenerateConsistencyTokenResponse|GenerateConsistencyTokenResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async + */ + generateConsistencyToken( + request?: protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, + ( + | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest + | undefined + ), + {} | undefined, + ] + >; + generateConsistencyToken( + request: protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, + | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + generateConsistencyToken( + request: protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, + | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + generateConsistencyToken( + request?: protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, + | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, + | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, + ( + | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('generateConsistencyToken request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, + | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('generateConsistencyToken response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .generateConsistencyToken(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, + ( + | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('generateConsistencyToken response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Checks replication consistency based on a consistency token, that is, if + * replication has caught up based on the conditions specified in the token + * and the check request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the Table for which to check replication + * consistency. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {string} request.consistencyToken + * Required. The token created using GenerateConsistencyToken for the Table. + * @param {google.bigtable.admin.v2.StandardReadRemoteWrites} request.standardReadRemoteWrites + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * @param {google.bigtable.admin.v2.DataBoostReadLocalWrites} request.dataBoostReadLocalWrites + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.CheckConsistencyResponse|CheckConsistencyResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async + */ + checkConsistency( + request?: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ICheckConsistencyResponse, + protos.google.bigtable.admin.v2.ICheckConsistencyRequest | undefined, + {} | undefined, + ] + >; + checkConsistency( + request: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.ICheckConsistencyResponse, + | protos.google.bigtable.admin.v2.ICheckConsistencyRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + checkConsistency( + request: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, + callback: Callback< + protos.google.bigtable.admin.v2.ICheckConsistencyResponse, + | protos.google.bigtable.admin.v2.ICheckConsistencyRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + checkConsistency( + request?: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.ICheckConsistencyResponse, + | protos.google.bigtable.admin.v2.ICheckConsistencyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.ICheckConsistencyResponse, + | protos.google.bigtable.admin.v2.ICheckConsistencyRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ICheckConsistencyResponse, + protos.google.bigtable.admin.v2.ICheckConsistencyRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('checkConsistency request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.ICheckConsistencyResponse, + | protos.google.bigtable.admin.v2.ICheckConsistencyRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('checkConsistency response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .checkConsistency(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.ICheckConsistencyResponse, + protos.google.bigtable.admin.v2.ICheckConsistencyRequest | undefined, + {} | undefined, + ]) => { + this._log.info('checkConsistency response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets metadata information about the specified snapshot. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Snapshot|Snapshot}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async + */ + getSnapshot( + request?: protos.google.bigtable.admin.v2.IGetSnapshotRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.IGetSnapshotRequest | undefined, + {} | undefined, + ] + >; + getSnapshot( + request: protos.google.bigtable.admin.v2.IGetSnapshotRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.IGetSnapshotRequest | null | undefined, + {} | null | undefined + >, + ): void; + getSnapshot( + request: protos.google.bigtable.admin.v2.IGetSnapshotRequest, + callback: Callback< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.IGetSnapshotRequest | null | undefined, + {} | null | undefined + >, + ): void; + getSnapshot( + request?: protos.google.bigtable.admin.v2.IGetSnapshotRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.ISnapshot, + | protos.google.bigtable.admin.v2.IGetSnapshotRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.IGetSnapshotRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.IGetSnapshotRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getSnapshot request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.ISnapshot, + | protos.google.bigtable.admin.v2.IGetSnapshotRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getSnapshot response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getSnapshot(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.IGetSnapshotRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getSnapshot response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Permanently deletes the specified snapshot. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the snapshot to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async + */ + deleteSnapshot( + request?: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | undefined, + {} | undefined, + ] + >; + deleteSnapshot( + request: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteSnapshot( + request: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteSnapshot( + request?: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteSnapshotRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteSnapshot request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteSnapshotRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteSnapshot response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteSnapshot(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteSnapshot response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets metadata on a pending or completed Cloud Bigtable Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Backup|Backup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async + */ + getBackup( + request?: protos.google.bigtable.admin.v2.IGetBackupRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IGetBackupRequest | undefined, + {} | undefined, + ] + >; + getBackup( + request: protos.google.bigtable.admin.v2.IGetBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + ): void; + getBackup( + request: protos.google.bigtable.admin.v2.IGetBackupRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + ): void; + getBackup( + request?: protos.google.bigtable.admin.v2.IGetBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IGetBackupRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getBackup request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBackup response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getBackup(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IGetBackupRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getBackup response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Updates a pending or completed Cloud Bigtable Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.Backup} request.backup + * Required. The backup to update. `backup.name`, and the fields to be updated + * as specified by `update_mask` are required. Other fields are ignored. + * Update is only supported for the following fields: + * + * * `backup.expire_time`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A mask specifying which fields (e.g. `expire_time`) in the + * Backup resource should be updated. This mask is relative to the Backup + * resource, not to the request message. The field mask must always be + * specified; this prevents any future fields from being erased accidentally + * by clients that do not know about them. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.Backup|Backup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async + */ + updateBackup( + request?: protos.google.bigtable.admin.v2.IUpdateBackupRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IUpdateBackupRequest | undefined, + {} | undefined, + ] + >; + updateBackup( + request: protos.google.bigtable.admin.v2.IUpdateBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IUpdateBackupRequest | null | undefined, + {} | null | undefined + >, + ): void; + updateBackup( + request: protos.google.bigtable.admin.v2.IUpdateBackupRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IUpdateBackupRequest | null | undefined, + {} | null | undefined + >, + ): void; + updateBackup( + request?: protos.google.bigtable.admin.v2.IUpdateBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IBackup, + | protos.google.bigtable.admin.v2.IUpdateBackupRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IUpdateBackupRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IUpdateBackupRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'backup.name': request.backup!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('updateBackup request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.IBackup, + | protos.google.bigtable.admin.v2.IUpdateBackupRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateBackup response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateBackup(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.IUpdateBackupRequest | undefined, + {} | undefined, + ]) => { + this._log.info('updateBackup response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a pending or completed Cloud Bigtable backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async + */ + deleteBackup( + request?: protos.google.bigtable.admin.v2.IDeleteBackupRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteBackupRequest | undefined, + {} | undefined, + ] + >; + deleteBackup( + request: protos.google.bigtable.admin.v2.IDeleteBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackup( + request: protos.google.bigtable.admin.v2.IDeleteBackupRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackup( + request?: protos.google.bigtable.admin.v2.IDeleteBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteBackupRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteBackupRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteBackup request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteBackupRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteBackup response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteBackup(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteBackupRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteBackup response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets the access control policy for a Bigtable resource. + * Returns an empty policy if the resource exists but does not have a policy + * set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined, + ] + >; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getIamPolicy request %j', request); + const wrappedCallback: + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getIamPolicy(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getIamPolicy response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Sets the access control policy on a Bigtable resource. + * Replaces any existing policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined, + ] + >; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('setIamPolicy request %j', request); + const wrappedCallback: + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('setIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .setIamPolicy(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined, + ]) => { + this._log.info('setIamPolicy response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Returns permissions that the caller has on the specified Bigtable + * resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async + */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined, + ] + >; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + ): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + ): void; + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('testIamPermissions request %j', request); + const wrappedCallback: + | Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('testIamPermissions response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .testIamPermissions(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined, + ]) => { + this._log.info('testIamPermissions response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets metadata information about the specified schema bundle. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the schema bundle to retrieve. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.SchemaBundle|SchemaBundle}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_async + */ + getSchemaBundle( + request?: protos.google.bigtable.admin.v2.IGetSchemaBundleRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IGetSchemaBundleRequest | undefined, + {} | undefined, + ] + >; + getSchemaBundle( + request: protos.google.bigtable.admin.v2.IGetSchemaBundleRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.ISchemaBundle, + | protos.google.bigtable.admin.v2.IGetSchemaBundleRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getSchemaBundle( + request: protos.google.bigtable.admin.v2.IGetSchemaBundleRequest, + callback: Callback< + protos.google.bigtable.admin.v2.ISchemaBundle, + | protos.google.bigtable.admin.v2.IGetSchemaBundleRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getSchemaBundle( + request?: protos.google.bigtable.admin.v2.IGetSchemaBundleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.ISchemaBundle, + | protos.google.bigtable.admin.v2.IGetSchemaBundleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.ISchemaBundle, + | protos.google.bigtable.admin.v2.IGetSchemaBundleRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IGetSchemaBundleRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getSchemaBundle request %j', request); + const wrappedCallback: + | Callback< + protos.google.bigtable.admin.v2.ISchemaBundle, + | protos.google.bigtable.admin.v2.IGetSchemaBundleRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getSchemaBundle response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getSchemaBundle(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IGetSchemaBundleRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getSchemaBundle response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a schema bundle in the specified table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the schema bundle to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + * @param {string} [request.etag] + * Optional. The etag of the schema bundle. + * If this is provided, it must match the server's etag. The server + * returns an ABORTED error on a mismatched etag. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_async + */ + deleteSchemaBundle( + request?: protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest | undefined, + {} | undefined, + ] + >; + deleteSchemaBundle( + request: protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteSchemaBundle( + request: protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteSchemaBundle( + request?: protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteSchemaBundle request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteSchemaBundle response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteSchemaBundle(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.bigtable.admin.v2.IDeleteSchemaBundleRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteSchemaBundle response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + + /** + * Creates a new table from the specified snapshot. The target table must + * not exist. The snapshot and the table must be in the same instance. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * @param {string} request.tableId + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * @param {string} request.sourceSnapshot + * Required. The unique name of the snapshot from which to restore the table. + * The snapshot and the table must be in the same instance. Values are of the + * form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async + */ + createTableFromSnapshot( + request?: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createTableFromSnapshot( + request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createTableFromSnapshot( + request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createTableFromSnapshot( + request?: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createTableFromSnapshot response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createTableFromSnapshot request %j', request); + return this.innerApiCalls + .createTableFromSnapshot(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createTableFromSnapshot response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createTableFromSnapshot()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async + */ + async checkCreateTableFromSnapshotProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Table, + protos.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + > + > { + this._log.info('createTableFromSnapshot long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createTableFromSnapshot, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Table, + protos.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + >; + } + /** + * Updates a specified table. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.Table} request.table + * Required. The table to update. + * 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. `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 fields: + * + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` + * * `row_key_schema` + * + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + * @param {boolean} [request.ignoreWarnings] + * Optional. If true, ignore safety checks when updating the table. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async + */ + updateTable( + request?: protos.google.bigtable.admin.v2.IUpdateTableRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateTable( + request: protos.google.bigtable.admin.v2.IUpdateTableRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateTable( + request: protos.google.bigtable.admin.v2.IUpdateTableRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateTable( + request?: protos.google.bigtable.admin.v2.IUpdateTableRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'table.name': request.table!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateTable response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateTable request %j', request); + return this.innerApiCalls + .updateTable(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateTable response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateTable()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async + */ + async checkUpdateTableProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Table, + protos.google.bigtable.admin.v2.UpdateTableMetadata + > + > { + this._log.info('updateTable long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateTable, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Table, + protos.google.bigtable.admin.v2.UpdateTableMetadata + >; + } + /** + * Restores a specified table which was accidentally deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the table to be restored. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async + */ + undeleteTable( + request?: protos.google.bigtable.admin.v2.IUndeleteTableRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + undeleteTable( + request: protos.google.bigtable.admin.v2.IUndeleteTableRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + undeleteTable( + request: protos.google.bigtable.admin.v2.IUndeleteTableRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + undeleteTable( + request?: protos.google.bigtable.admin.v2.IUndeleteTableRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('undeleteTable response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('undeleteTable request %j', request); + return this.innerApiCalls + .undeleteTable(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('undeleteTable response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `undeleteTable()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async + */ + async checkUndeleteTableProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Table, + protos.google.bigtable.admin.v2.UndeleteTableMetadata + > + > { + this._log.info('undeleteTable long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.undeleteTable, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Table, + protos.google.bigtable.admin.v2.UndeleteTableMetadata + >; + } + /** + * Creates a new AuthorizedView in a table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {string} request.authorizedViewId + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * @param {google.bigtable.admin.v2.AuthorizedView} request.authorizedView + * Required. The AuthorizedView to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async + */ + createAuthorizedView( + request?: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createAuthorizedView( + request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createAuthorizedView( + request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createAuthorizedView( + request?: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAuthorizedView response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAuthorizedView request %j', request); + return this.innerApiCalls + .createAuthorizedView(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createAuthorizedView response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createAuthorizedView()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async + */ + async checkCreateAuthorizedViewProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.AuthorizedView, + protos.google.bigtable.admin.v2.CreateAuthorizedViewMetadata + > + > { + this._log.info('createAuthorizedView long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createAuthorizedView, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.AuthorizedView, + protos.google.bigtable.admin.v2.CreateAuthorizedViewMetadata + >; + } + /** + * Updates an AuthorizedView in a table. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.AuthorizedView} request.authorizedView + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format: + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * @param {boolean} [request.ignoreWarnings] + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async + */ + updateAuthorizedView( + request?: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateAuthorizedView( + request: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateAuthorizedView( + request: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateAuthorizedView( + request?: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'authorized_view.name': request.authorizedView!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateAuthorizedView response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateAuthorizedView request %j', request); + return this.innerApiCalls + .updateAuthorizedView(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateAuthorizedView response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateAuthorizedView()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async + */ + async checkUpdateAuthorizedViewProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.AuthorizedView, + protos.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + > + > { + this._log.info('updateAuthorizedView long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateAuthorizedView, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.AuthorizedView, + protos.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + >; + } + /** + * Creates a new snapshot in the specified cluster from the specified + * source table. The cluster and the table must be in the same instance. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the table to have the snapshot taken. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {string} request.cluster + * Required. The name of the cluster where the snapshot will be created in. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {string} request.snapshotId + * Required. The ID by which the new snapshot should be referred to within the + * parent cluster, e.g., `mysnapshot` of the form: + * `{@link protos.-_.a-zA-Z0-9|_a-zA-Z0-9}*` rather than + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + * @param {google.protobuf.Duration} request.ttl + * The amount of time that the new snapshot can stay active after it is + * created. Once 'ttl' expires, the snapshot will get deleted. The maximum + * amount of time a snapshot can stay active is 7 days. If 'ttl' is not + * specified, the default value of 24 hours will be used. + * @param {string} request.description + * Description of the snapshot. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async + */ + snapshotTable( + request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + snapshotTable( + request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + snapshotTable( + request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + snapshotTable( + request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('snapshotTable response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('snapshotTable request %j', request); + return this.innerApiCalls + .snapshotTable(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('snapshotTable response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `snapshotTable()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async + */ + async checkSnapshotTableProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Snapshot, + protos.google.bigtable.admin.v2.SnapshotTableMetadata + > + > { + this._log.info('snapshotTable long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.snapshotTable, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Snapshot, + protos.google.bigtable.admin.v2.SnapshotTableMetadata + >; + } + /** + * Starts creating a new Cloud Bigtable Backup. The returned backup + * {@link protos.google.longrunning.Operation|long-running operation} can be used to + * track creation of the backup. The + * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * {@link protos.google.bigtable.admin.v2.CreateBackupMetadata|CreateBackupMetadata}. The + * {@link protos.google.longrunning.Operation.response|response} field type is + * {@link protos.google.bigtable.admin.v2.Backup|Backup}, if successful. Cancelling the + * returned operation will stop the creation and delete the backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. This must be one of the clusters in the instance in which this + * table is located. The backup will be stored in this cluster. Values are + * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {string} request.backupId + * Required. The id of the backup to be created. The `backup_id` along with + * the parent `parent` are combined as {parent}/backups/{backup_id} to create + * the full backup name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex {@link protos.-_.a-zA-Z0-9|_a-zA-Z0-9}*. + * @param {google.bigtable.admin.v2.Backup} request.backup + * Required. The backup to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async + */ + createBackup( + request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackup( + request: protos.google.bigtable.admin.v2.ICreateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createBackup( + request: protos.google.bigtable.admin.v2.ICreateBackupRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createBackup( + request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createBackup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createBackup request %j', request); + return this.innerApiCalls + .createBackup(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createBackup response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createBackup()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async + */ + async checkCreateBackupProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Backup, + protos.google.bigtable.admin.v2.CreateBackupMetadata + > + > { + this._log.info('createBackup long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createBackup, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Backup, + protos.google.bigtable.admin.v2.CreateBackupMetadata + >; + } + /** + * Create a new table by restoring from a completed backup. The + * returned table {@link protos.google.longrunning.Operation|long-running operation} can + * be used to track the progress of the operation, and to cancel it. The + * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * {@link protos.google.bigtable.admin.v2.RestoreTableMetadata|RestoreTableMetadata}. The + * {@link protos.google.longrunning.Operation.response|response} type is + * {@link protos.google.bigtable.admin.v2.Table|Table}, if successful. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the instance in which to create the restored + * table. Values are of the form `projects//instances/`. + * @param {string} request.tableId + * Required. The id of the table to create and restore to. This + * table must not already exist. The `table_id` appended to + * `parent` forms the full table name of the form + * `projects//instances//tables/`. + * @param {string} request.backup + * Name of the backup from which to restore. Values are of the form + * `projects//instances//clusters//backups/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async + */ + restoreTable( + request?: protos.google.bigtable.admin.v2.IRestoreTableRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + restoreTable( + request: protos.google.bigtable.admin.v2.IRestoreTableRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + restoreTable( + request: protos.google.bigtable.admin.v2.IRestoreTableRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + restoreTable( + request?: protos.google.bigtable.admin.v2.IRestoreTableRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('restoreTable response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('restoreTable request %j', request); + return this.innerApiCalls + .restoreTable(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('restoreTable response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `restoreTable()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async + */ + async checkRestoreTableProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Table, + protos.google.bigtable.admin.v2.RestoreTableMetadata + > + > { + this._log.info('restoreTable long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.restoreTable, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Table, + protos.google.bigtable.admin.v2.RestoreTableMetadata + >; + } + /** + * Copy a Cloud Bigtable backup to a new backup in the destination cluster + * located in the destination instance and project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the destination cluster that will contain the backup + * copy. The cluster must already exist. Values are of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {string} request.backupId + * Required. The id of the new backup. The `backup_id` along with `parent` + * are combined as {parent}/backups/{backup_id} to create the full backup + * name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex {@link protos.-_.a-zA-Z0-9|_a-zA-Z0-9}*. + * @param {string} request.sourceBackup + * Required. The source backup to be copied from. + * The source backup needs to be in READY state for it to be copied. + * Copying a copied backup is not allowed. + * Once CopyBackup is in progress, the source backup cannot be deleted or + * cleaned up on expiration until CopyBackup is finished. + * Values are of the form: + * `projects//instances//clusters//backups/`. + * @param {google.protobuf.Timestamp} request.expireTime + * Required. Required. The expiration time of the copied backup with + * microsecond granularity that must be at least 6 hours and at most 30 days + * from the time the request is received. Once the `expire_time` has + * passed, Cloud Bigtable will delete the backup and free the resources used + * by the backup. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async + */ + copyBackup( + request?: protos.google.bigtable.admin.v2.ICopyBackupRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + copyBackup( + request: protos.google.bigtable.admin.v2.ICopyBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + copyBackup( + request: protos.google.bigtable.admin.v2.ICopyBackupRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + copyBackup( + request?: protos.google.bigtable.admin.v2.ICopyBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('copyBackup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('copyBackup request %j', request); + return this.innerApiCalls + .copyBackup(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('copyBackup response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `copyBackup()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async + */ + async checkCopyBackupProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Backup, + protos.google.bigtable.admin.v2.CopyBackupMetadata + > + > { + this._log.info('copyBackup long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.copyBackup, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Backup, + protos.google.bigtable.admin.v2.CopyBackupMetadata + >; + } + /** + * Creates a new schema bundle in the specified table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this schema bundle will be created. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {string} request.schemaBundleId + * Required. The unique ID to use for the schema bundle, which will become the + * final component of the schema bundle's resource name. + * @param {google.bigtable.admin.v2.SchemaBundle} request.schemaBundle + * Required. The schema bundle to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_async + */ + createSchemaBundle( + request?: protos.google.bigtable.admin.v2.ICreateSchemaBundleRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createSchemaBundle( + request: protos.google.bigtable.admin.v2.ICreateSchemaBundleRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createSchemaBundle( + request: protos.google.bigtable.admin.v2.ICreateSchemaBundleRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createSchemaBundle( + request?: protos.google.bigtable.admin.v2.ICreateSchemaBundleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createSchemaBundle response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createSchemaBundle request %j', request); + return this.innerApiCalls + .createSchemaBundle(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createSchemaBundle response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createSchemaBundle()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_async + */ + async checkCreateSchemaBundleProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.SchemaBundle, + protos.google.bigtable.admin.v2.CreateSchemaBundleMetadata + > + > { + this._log.info('createSchemaBundle long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createSchemaBundle, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.SchemaBundle, + protos.google.bigtable.admin.v2.CreateSchemaBundleMetadata + >; + } + /** + * Updates a schema bundle in the specified table. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.SchemaBundle} request.schemaBundle + * Required. The schema bundle to update. + * + * The schema bundle's `name` field is used to identify the schema bundle to + * update. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. + * @param {boolean} [request.ignoreWarnings] + * Optional. If set, ignore the safety checks when updating the Schema Bundle. + * The safety checks are: + * - The new Schema Bundle is backwards compatible with the existing Schema + * Bundle. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_async + */ + updateSchemaBundle( + request?: protos.google.bigtable.admin.v2.IUpdateSchemaBundleRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateSchemaBundle( + request: protos.google.bigtable.admin.v2.IUpdateSchemaBundleRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateSchemaBundle( + request: protos.google.bigtable.admin.v2.IUpdateSchemaBundleRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateSchemaBundle( + request?: protos.google.bigtable.admin.v2.IUpdateSchemaBundleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'schema_bundle.name': request.schemaBundle!.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateSchemaBundle response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateSchemaBundle request %j', request); + return this.innerApiCalls + .updateSchemaBundle(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateSchemaBundle response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateSchemaBundle()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_async + */ + async checkUpdateSchemaBundleProgress( + name: string, + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.SchemaBundle, + protos.google.bigtable.admin.v2.UpdateSchemaBundleMetadata + > + > { + this._log.info('updateSchemaBundle long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + { name }, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateSchemaBundle, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.SchemaBundle, + protos.google.bigtable.admin.v2.UpdateSchemaBundleMetadata + >; + } + /** + * Lists all tables served from a specified instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. + * @param {google.bigtable.admin.v2.Table.View} request.view + * The view to be applied to the returned tables' fields. + * NAME_ONLY view (default) and REPLICATION_VIEW are supported. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.Table|Table}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listTablesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTables( + request?: protos.google.bigtable.admin.v2.IListTablesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ITable[], + protos.google.bigtable.admin.v2.IListTablesRequest | null, + protos.google.bigtable.admin.v2.IListTablesResponse, + ] + >; + listTables( + request: protos.google.bigtable.admin.v2.IListTablesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListTablesRequest, + protos.google.bigtable.admin.v2.IListTablesResponse | null | undefined, + protos.google.bigtable.admin.v2.ITable + >, + ): void; + listTables( + request: protos.google.bigtable.admin.v2.IListTablesRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListTablesRequest, + protos.google.bigtable.admin.v2.IListTablesResponse | null | undefined, + protos.google.bigtable.admin.v2.ITable + >, + ): void; + listTables( + request?: protos.google.bigtable.admin.v2.IListTablesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListTablesRequest, + | protos.google.bigtable.admin.v2.IListTablesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ITable + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListTablesRequest, + protos.google.bigtable.admin.v2.IListTablesResponse | null | undefined, + protos.google.bigtable.admin.v2.ITable + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ITable[], + protos.google.bigtable.admin.v2.IListTablesRequest | null, + protos.google.bigtable.admin.v2.IListTablesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListTablesRequest, + | protos.google.bigtable.admin.v2.IListTablesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ITable + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listTables values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listTables request %j', request); + return this.innerApiCalls + .listTables(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.ITable[], + protos.google.bigtable.admin.v2.IListTablesRequest | null, + protos.google.bigtable.admin.v2.IListTablesResponse, + ]) => { + this._log.info('listTables values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listTables`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. + * @param {google.bigtable.admin.v2.Table.View} request.view + * The view to be applied to the returned tables' fields. + * NAME_ONLY view (default) and REPLICATION_VIEW are supported. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.Table|Table} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listTablesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTablesStream( + request?: protos.google.bigtable.admin.v2.IListTablesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTables']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listTables stream %j', request); + return this.descriptors.page.listTables.createStream( + this.innerApiCalls.listTables as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listTables`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. + * @param {google.bigtable.admin.v2.Table.View} request.view + * The view to be applied to the returned tables' fields. + * NAME_ONLY view (default) and REPLICATION_VIEW are supported. + * @param {number} request.pageSize + * Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.Table|Table}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async + */ + listTablesAsync( + request?: protos.google.bigtable.admin.v2.IListTablesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTables']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listTables iterate %j', request); + return this.descriptors.page.listTables.asyncIterate( + this.innerApiCalls['listTables'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists all AuthorizedViews from a specific table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} [request.pageToken] + * Optional. The value of `next_page_token` returned by a previous call. + * @param {google.bigtable.admin.v2.AuthorizedView.ResponseView} [request.view] + * Optional. The resource_view to be applied to the returned AuthorizedViews' + * fields. Default to NAME_ONLY. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.AuthorizedView|AuthorizedView}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAuthorizedViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAuthorizedViews( + request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAuthorizedView[], + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest | null, + protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse, + ] + >; + listAuthorizedViews( + request: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + >, + ): void; + listAuthorizedViews( + request: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + >, + ): void; + listAuthorizedViews( + request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IAuthorizedView[], + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest | null, + protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAuthorizedViews values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAuthorizedViews request %j', request); + return this.innerApiCalls + .listAuthorizedViews(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.IAuthorizedView[], + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest | null, + protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse, + ]) => { + this._log.info('listAuthorizedViews values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listAuthorizedViews`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} [request.pageToken] + * Optional. The value of `next_page_token` returned by a previous call. + * @param {google.bigtable.admin.v2.AuthorizedView.ResponseView} [request.view] + * Optional. The resource_view to be applied to the returned AuthorizedViews' + * fields. Default to NAME_ONLY. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.AuthorizedView|AuthorizedView} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAuthorizedViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAuthorizedViewsStream( + request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAuthorizedViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listAuthorizedViews stream %j', request); + return this.descriptors.page.listAuthorizedViews.createStream( + this.innerApiCalls.listAuthorizedViews as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listAuthorizedViews`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} [request.pageToken] + * Optional. The value of `next_page_token` returned by a previous call. + * @param {google.bigtable.admin.v2.AuthorizedView.ResponseView} [request.view] + * Optional. The resource_view to be applied to the returned AuthorizedViews' + * fields. Default to NAME_ONLY. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.AuthorizedView|AuthorizedView}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async + */ + listAuthorizedViewsAsync( + request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAuthorizedViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listAuthorizedViews iterate %j', request); + return this.descriptors.page.listAuthorizedViews.asyncIterate( + this.innerApiCalls['listAuthorizedViews'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists all snapshots associated with the specified cluster. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * @param {number} request.pageSize + * The maximum number of snapshots to return per page. + * CURRENTLY UNIMPLEMENTED AND IGNORED. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.Snapshot|Snapshot}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listSnapshotsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listSnapshots( + request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ISnapshot[], + protos.google.bigtable.admin.v2.IListSnapshotsRequest | null, + protos.google.bigtable.admin.v2.IListSnapshotsResponse, + ] + >; + listSnapshots( + request: protos.google.bigtable.admin.v2.IListSnapshotsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListSnapshotsRequest, + protos.google.bigtable.admin.v2.IListSnapshotsResponse | null | undefined, + protos.google.bigtable.admin.v2.ISnapshot + >, + ): void; + listSnapshots( + request: protos.google.bigtable.admin.v2.IListSnapshotsRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListSnapshotsRequest, + protos.google.bigtable.admin.v2.IListSnapshotsResponse | null | undefined, + protos.google.bigtable.admin.v2.ISnapshot + >, + ): void; + listSnapshots( + request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListSnapshotsRequest, + | protos.google.bigtable.admin.v2.IListSnapshotsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ISnapshot + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListSnapshotsRequest, + protos.google.bigtable.admin.v2.IListSnapshotsResponse | null | undefined, + protos.google.bigtable.admin.v2.ISnapshot + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ISnapshot[], + protos.google.bigtable.admin.v2.IListSnapshotsRequest | null, + protos.google.bigtable.admin.v2.IListSnapshotsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListSnapshotsRequest, + | protos.google.bigtable.admin.v2.IListSnapshotsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ISnapshot + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listSnapshots values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listSnapshots request %j', request); + return this.innerApiCalls + .listSnapshots(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.ISnapshot[], + protos.google.bigtable.admin.v2.IListSnapshotsRequest | null, + protos.google.bigtable.admin.v2.IListSnapshotsResponse, + ]) => { + this._log.info('listSnapshots values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listSnapshots`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * @param {number} request.pageSize + * The maximum number of snapshots to return per page. + * CURRENTLY UNIMPLEMENTED AND IGNORED. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.Snapshot|Snapshot} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listSnapshotsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listSnapshotsStream( + request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSnapshots']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listSnapshots stream %j', request); + return this.descriptors.page.listSnapshots.createStream( + this.innerApiCalls.listSnapshots as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listSnapshots`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * @param {number} request.pageSize + * The maximum number of snapshots to return per page. + * CURRENTLY UNIMPLEMENTED AND IGNORED. + * @param {string} request.pageToken + * The value of `next_page_token` returned by a previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.Snapshot|Snapshot}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async + */ + listSnapshotsAsync( + request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSnapshots']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listSnapshots iterate %j', request); + return this.descriptors.page.listSnapshots.asyncIterate( + this.innerApiCalls['listSnapshots'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists Cloud Bigtable backups. Returns both completed and pending + * backups. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * @param {string} request.filter + * A filter expression that filters backups listed in the response. + * The expression must specify the field name, a comparison operator, + * and the value that you want to use for filtering. The value must be a + * string, a number, or a boolean. The comparison operator must be + * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + * roughly synonymous with equality. Filter rules are case insensitive. + * + * The fields eligible for filtering are: + * + * * `name` + * * `source_table` + * * `state` + * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * + * To filter on multiple expressions, provide each separate expression within + * parentheses. By default, each expression is an AND expression. However, + * you can include AND, OR, and NOT expressions explicitly. + * + * Some examples of using filters are: + * + * * `name:"exact"` --> The backup's name is the string "exact". + * * `name:howl` --> The backup's name contains the string "howl". + * * `source_table:prod` + * --> The source_table's name contains the string "prod". + * * `state:CREATING` --> The backup is pending creation. + * * `state:READY` --> The backup is fully created and ready for use. + * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + * @param {string} request.orderBy + * An expression for specifying the sort order of the results of the request. + * The string value should specify one or more fields in + * {@link protos.google.bigtable.admin.v2.Backup|Backup}. The full syntax is described at + * https://aip.dev/132#ordering. + * + * Fields supported are: + * + * * name + * * source_table + * * expire_time + * * start_time + * * end_time + * * size_bytes + * * state + * + * For example, "start_time". The default sorting order is ascending. + * To specify descending order for the field, a suffix " desc" should + * be appended to the field name. For example, "start_time desc". + * Redundant space characters in the syntax are insigificant. + * + * If order_by is empty, results will be sorted by `start_time` in descending + * order starting from the most recently created backup. + * @param {number} request.pageSize + * Number of backups to be returned in the response. If 0 or + * less, defaults to the server's maximum allowed page size. + * @param {string} request.pageToken + * If non-empty, `page_token` should contain a + * {@link protos.google.bigtable.admin.v2.ListBackupsResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.bigtable.admin.v2.ListBackupsResponse|ListBackupsResponse} to the + * same `parent` and with the same `filter`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.Backup|Backup}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBackupsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackups( + request?: protos.google.bigtable.admin.v2.IListBackupsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.IBackup[], + protos.google.bigtable.admin.v2.IListBackupsRequest | null, + protos.google.bigtable.admin.v2.IListBackupsResponse, + ] + >; + listBackups( + request: protos.google.bigtable.admin.v2.IListBackupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListBackupsRequest, + protos.google.bigtable.admin.v2.IListBackupsResponse | null | undefined, + protos.google.bigtable.admin.v2.IBackup + >, + ): void; + listBackups( + request: protos.google.bigtable.admin.v2.IListBackupsRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListBackupsRequest, + protos.google.bigtable.admin.v2.IListBackupsResponse | null | undefined, + protos.google.bigtable.admin.v2.IBackup + >, + ): void; + listBackups( + request?: protos.google.bigtable.admin.v2.IListBackupsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListBackupsRequest, + | protos.google.bigtable.admin.v2.IListBackupsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IBackup + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListBackupsRequest, + protos.google.bigtable.admin.v2.IListBackupsResponse | null | undefined, + protos.google.bigtable.admin.v2.IBackup + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.IBackup[], + protos.google.bigtable.admin.v2.IListBackupsRequest | null, + protos.google.bigtable.admin.v2.IListBackupsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListBackupsRequest, + | protos.google.bigtable.admin.v2.IListBackupsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IBackup + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBackups values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBackups request %j', request); + return this.innerApiCalls + .listBackups(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.IBackup[], + protos.google.bigtable.admin.v2.IListBackupsRequest | null, + protos.google.bigtable.admin.v2.IListBackupsResponse, + ]) => { + this._log.info('listBackups values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listBackups`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * @param {string} request.filter + * A filter expression that filters backups listed in the response. + * The expression must specify the field name, a comparison operator, + * and the value that you want to use for filtering. The value must be a + * string, a number, or a boolean. The comparison operator must be + * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + * roughly synonymous with equality. Filter rules are case insensitive. + * + * The fields eligible for filtering are: + * + * * `name` + * * `source_table` + * * `state` + * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * + * To filter on multiple expressions, provide each separate expression within + * parentheses. By default, each expression is an AND expression. However, + * you can include AND, OR, and NOT expressions explicitly. + * + * Some examples of using filters are: + * + * * `name:"exact"` --> The backup's name is the string "exact". + * * `name:howl` --> The backup's name contains the string "howl". + * * `source_table:prod` + * --> The source_table's name contains the string "prod". + * * `state:CREATING` --> The backup is pending creation. + * * `state:READY` --> The backup is fully created and ready for use. + * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + * @param {string} request.orderBy + * An expression for specifying the sort order of the results of the request. + * The string value should specify one or more fields in + * {@link protos.google.bigtable.admin.v2.Backup|Backup}. The full syntax is described at + * https://aip.dev/132#ordering. + * + * Fields supported are: + * + * * name + * * source_table + * * expire_time + * * start_time + * * end_time + * * size_bytes + * * state + * + * For example, "start_time". The default sorting order is ascending. + * To specify descending order for the field, a suffix " desc" should + * be appended to the field name. For example, "start_time desc". + * Redundant space characters in the syntax are insigificant. + * + * If order_by is empty, results will be sorted by `start_time` in descending + * order starting from the most recently created backup. + * @param {number} request.pageSize + * Number of backups to be returned in the response. If 0 or + * less, defaults to the server's maximum allowed page size. + * @param {string} request.pageToken + * If non-empty, `page_token` should contain a + * {@link protos.google.bigtable.admin.v2.ListBackupsResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.bigtable.admin.v2.ListBackupsResponse|ListBackupsResponse} to the + * same `parent` and with the same `filter`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.Backup|Backup} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBackupsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupsStream( + request?: protos.google.bigtable.admin.v2.IListBackupsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listBackups stream %j', request); + return this.descriptors.page.listBackups.createStream( + this.innerApiCalls.listBackups as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listBackups`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * @param {string} request.filter + * A filter expression that filters backups listed in the response. + * The expression must specify the field name, a comparison operator, + * and the value that you want to use for filtering. The value must be a + * string, a number, or a boolean. The comparison operator must be + * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + * roughly synonymous with equality. Filter rules are case insensitive. + * + * The fields eligible for filtering are: + * + * * `name` + * * `source_table` + * * `state` + * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * + * To filter on multiple expressions, provide each separate expression within + * parentheses. By default, each expression is an AND expression. However, + * you can include AND, OR, and NOT expressions explicitly. + * + * Some examples of using filters are: + * + * * `name:"exact"` --> The backup's name is the string "exact". + * * `name:howl` --> The backup's name contains the string "howl". + * * `source_table:prod` + * --> The source_table's name contains the string "prod". + * * `state:CREATING` --> The backup is pending creation. + * * `state:READY` --> The backup is fully created and ready for use. + * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + * @param {string} request.orderBy + * An expression for specifying the sort order of the results of the request. + * The string value should specify one or more fields in + * {@link protos.google.bigtable.admin.v2.Backup|Backup}. The full syntax is described at + * https://aip.dev/132#ordering. + * + * Fields supported are: + * + * * name + * * source_table + * * expire_time + * * start_time + * * end_time + * * size_bytes + * * state + * + * For example, "start_time". The default sorting order is ascending. + * To specify descending order for the field, a suffix " desc" should + * be appended to the field name. For example, "start_time desc". + * Redundant space characters in the syntax are insigificant. + * + * If order_by is empty, results will be sorted by `start_time` in descending + * order starting from the most recently created backup. + * @param {number} request.pageSize + * Number of backups to be returned in the response. If 0 or + * less, defaults to the server's maximum allowed page size. + * @param {string} request.pageToken + * If non-empty, `page_token` should contain a + * {@link protos.google.bigtable.admin.v2.ListBackupsResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.bigtable.admin.v2.ListBackupsResponse|ListBackupsResponse} to the + * same `parent` and with the same `filter`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.Backup|Backup}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async + */ + listBackupsAsync( + request?: protos.google.bigtable.admin.v2.IListBackupsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listBackups iterate %j', request); + return this.descriptors.page.listBackups.asyncIterate( + this.innerApiCalls['listBackups'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists all schema bundles associated with the specified table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of schema bundles. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} request.pageSize + * The maximum number of schema bundles to return. If the value is positive, + * the server may return at most this value. If unspecified, the server will + * return the maximum allowed page size. + * @param {string} request.pageToken + * A page token, received from a previous `ListSchemaBundles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListSchemaBundles` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.SchemaBundle|SchemaBundle}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listSchemaBundlesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listSchemaBundles( + request?: protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.bigtable.admin.v2.ISchemaBundle[], + protos.google.bigtable.admin.v2.IListSchemaBundlesRequest | null, + protos.google.bigtable.admin.v2.IListSchemaBundlesResponse, + ] + >; + listSchemaBundles( + request: protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + | protos.google.bigtable.admin.v2.IListSchemaBundlesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ISchemaBundle + >, + ): void; + listSchemaBundles( + request: protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + | protos.google.bigtable.admin.v2.IListSchemaBundlesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ISchemaBundle + >, + ): void; + listSchemaBundles( + request?: protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + | protos.google.bigtable.admin.v2.IListSchemaBundlesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ISchemaBundle + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + | protos.google.bigtable.admin.v2.IListSchemaBundlesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ISchemaBundle + >, + ): Promise< + [ + protos.google.bigtable.admin.v2.ISchemaBundle[], + protos.google.bigtable.admin.v2.IListSchemaBundlesRequest | null, + protos.google.bigtable.admin.v2.IListSchemaBundlesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + | protos.google.bigtable.admin.v2.IListSchemaBundlesResponse + | null + | undefined, + protos.google.bigtable.admin.v2.ISchemaBundle + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listSchemaBundles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listSchemaBundles request %j', request); + return this.innerApiCalls + .listSchemaBundles(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.bigtable.admin.v2.ISchemaBundle[], + protos.google.bigtable.admin.v2.IListSchemaBundlesRequest | null, + protos.google.bigtable.admin.v2.IListSchemaBundlesResponse, + ]) => { + this._log.info('listSchemaBundles values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listSchemaBundles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of schema bundles. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} request.pageSize + * The maximum number of schema bundles to return. If the value is positive, + * the server may return at most this value. If unspecified, the server will + * return the maximum allowed page size. + * @param {string} request.pageToken + * A page token, received from a previous `ListSchemaBundles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListSchemaBundles` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.SchemaBundle|SchemaBundle} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listSchemaBundlesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listSchemaBundlesStream( + request?: protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSchemaBundles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listSchemaBundles stream %j', request); + return this.descriptors.page.listSchemaBundles.createStream( + this.innerApiCalls.listSchemaBundles as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listSchemaBundles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of schema bundles. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} request.pageSize + * The maximum number of schema bundles to return. If the value is positive, + * the server may return at most this value. If unspecified, the server will + * return the maximum allowed page size. + * @param {string} request.pageToken + * A page token, received from a previous `ListSchemaBundles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListSchemaBundles` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.SchemaBundle|SchemaBundle}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_async + */ + listSchemaBundlesAsync( + request?: protos.google.bigtable.admin.v2.IListSchemaBundlesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSchemaBundles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listSchemaBundles iterate %j', request); + return this.descriptors.page.listSchemaBundles.asyncIterate( + this.innerApiCalls['listSchemaBundles'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified appProfile resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} app_profile + * @returns {string} Resource name string. + */ + appProfilePath(project: string, instance: string, appProfile: string) { + return this.pathTemplates.appProfilePathTemplate.render({ + project: project, + instance: instance, + app_profile: appProfile, + }); + } + + /** + * Parse the project from AppProfile resource. + * + * @param {string} appProfileName + * A fully-qualified path representing AppProfile resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAppProfileName(appProfileName: string) { + return this.pathTemplates.appProfilePathTemplate.match(appProfileName) + .project; + } + + /** + * Parse the instance from AppProfile resource. + * + * @param {string} appProfileName + * A fully-qualified path representing AppProfile resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromAppProfileName(appProfileName: string) { + return this.pathTemplates.appProfilePathTemplate.match(appProfileName) + .instance; + } + + /** + * Parse the app_profile from AppProfile resource. + * + * @param {string} appProfileName + * A fully-qualified path representing AppProfile resource. + * @returns {string} A string representing the app_profile. + */ + matchAppProfileFromAppProfileName(appProfileName: string) { + return this.pathTemplates.appProfilePathTemplate.match(appProfileName) + .app_profile; + } + + /** + * Return a fully-qualified authorizedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @param {string} authorized_view + * @returns {string} Resource name string. + */ + authorizedViewPath( + project: string, + instance: string, + table: string, + authorizedView: string, + ) { + return this.pathTemplates.authorizedViewPathTemplate.render({ + project: project, + instance: instance, + table: table, + authorized_view: authorizedView, + }); + } + + /** + * Parse the project from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).project; + } + + /** + * Parse the instance from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).instance; + } + + /** + * Parse the table from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the table. + */ + matchTableFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).table; + } + + /** + * Parse the authorized_view from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the authorized_view. + */ + matchAuthorizedViewFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName, + ).authorized_view; + } + + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} cluster + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + instance: string, + cluster: string, + backup: string, + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + instance: instance, + cluster: cluster, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the instance from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).instance; + } + + /** + * Parse the cluster from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).cluster; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified cluster resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} cluster + * @returns {string} Resource name string. + */ + clusterPath(project: string, instance: string, cluster: string) { + return this.pathTemplates.clusterPathTemplate.render({ + project: project, + instance: instance, + cluster: cluster, + }); + } + + /** + * Parse the project from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).project; + } + + /** + * Parse the instance from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).instance; + } + + /** + * Parse the cluster from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).cluster; + } + + /** + * Return a fully-qualified hotTablet resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} cluster + * @param {string} hot_tablet + * @returns {string} Resource name string. + */ + hotTabletPath( + project: string, + instance: string, + cluster: string, + hotTablet: string, + ) { + return this.pathTemplates.hotTabletPathTemplate.render({ + project: project, + instance: instance, + cluster: cluster, + hot_tablet: hotTablet, + }); + } + + /** + * Parse the project from HotTablet resource. + * + * @param {string} hotTabletName + * A fully-qualified path representing HotTablet resource. + * @returns {string} A string representing the project. + */ + matchProjectFromHotTabletName(hotTabletName: string) { + return this.pathTemplates.hotTabletPathTemplate.match(hotTabletName) + .project; + } + + /** + * Parse the instance from HotTablet resource. + * + * @param {string} hotTabletName + * A fully-qualified path representing HotTablet resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromHotTabletName(hotTabletName: string) { + return this.pathTemplates.hotTabletPathTemplate.match(hotTabletName) + .instance; + } + + /** + * Parse the cluster from HotTablet resource. + * + * @param {string} hotTabletName + * A fully-qualified path representing HotTablet resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromHotTabletName(hotTabletName: string) { + return this.pathTemplates.hotTabletPathTemplate.match(hotTabletName) + .cluster; + } + + /** + * Parse the hot_tablet from HotTablet resource. + * + * @param {string} hotTabletName + * A fully-qualified path representing HotTablet resource. + * @returns {string} A string representing the hot_tablet. + */ + matchHotTabletFromHotTabletName(hotTabletName: string) { + return this.pathTemplates.hotTabletPathTemplate.match(hotTabletName) + .hot_tablet; + } + + /** + * Return a fully-qualified instance resource name string. + * + * @param {string} project + * @param {string} instance + * @returns {string} Resource name string. + */ + instancePath(project: string, instance: string) { + return this.pathTemplates.instancePathTemplate.render({ + project: project, + instance: instance, + }); + } + + /** + * Parse the project from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).project; + } + + /** + * Parse the instance from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).instance; + } + + /** + * Return a fully-qualified logicalView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} logical_view + * @returns {string} Resource name string. + */ + logicalViewPath(project: string, instance: string, logicalView: string) { + return this.pathTemplates.logicalViewPathTemplate.render({ + project: project, + instance: instance, + logical_view: logicalView, + }); + } + + /** + * Parse the project from LogicalView resource. + * + * @param {string} logicalViewName + * A fully-qualified path representing LogicalView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLogicalViewName(logicalViewName: string) { + return this.pathTemplates.logicalViewPathTemplate.match(logicalViewName) + .project; + } + + /** + * Parse the instance from LogicalView resource. + * + * @param {string} logicalViewName + * A fully-qualified path representing LogicalView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromLogicalViewName(logicalViewName: string) { + return this.pathTemplates.logicalViewPathTemplate.match(logicalViewName) + .instance; + } + + /** + * Parse the logical_view from LogicalView resource. + * + * @param {string} logicalViewName + * A fully-qualified path representing LogicalView resource. + * @returns {string} A string representing the logical_view. + */ + matchLogicalViewFromLogicalViewName(logicalViewName: string) { + return this.pathTemplates.logicalViewPathTemplate.match(logicalViewName) + .logical_view; + } + + /** + * Return a fully-qualified materializedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} materialized_view + * @returns {string} Resource name string. + */ + materializedViewPath( + project: string, + instance: string, + materializedView: string, + ) { + return this.pathTemplates.materializedViewPathTemplate.render({ + project: project, + instance: instance, + materialized_view: materializedView, + }); + } + + /** + * Parse the project from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).project; + } + + /** + * Parse the instance from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).instance; + } + + /** + * Parse the materialized_view from MaterializedView resource. + * + * @param {string} materializedViewName + * A fully-qualified path representing MaterializedView resource. + * @returns {string} A string representing the materialized_view. + */ + matchMaterializedViewFromMaterializedViewName(materializedViewName: string) { + return this.pathTemplates.materializedViewPathTemplate.match( + materializedViewName, + ).materialized_view; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified schemaBundle resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @param {string} schema_bundle + * @returns {string} Resource name string. + */ + schemaBundlePath( + project: string, + instance: string, + table: string, + schemaBundle: string, + ) { + return this.pathTemplates.schemaBundlePathTemplate.render({ + project: project, + instance: instance, + table: table, + schema_bundle: schemaBundle, + }); + } + + /** + * Parse the project from SchemaBundle resource. + * + * @param {string} schemaBundleName + * A fully-qualified path representing SchemaBundle resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSchemaBundleName(schemaBundleName: string) { + return this.pathTemplates.schemaBundlePathTemplate.match(schemaBundleName) + .project; + } + + /** + * Parse the instance from SchemaBundle resource. + * + * @param {string} schemaBundleName + * A fully-qualified path representing SchemaBundle resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromSchemaBundleName(schemaBundleName: string) { + return this.pathTemplates.schemaBundlePathTemplate.match(schemaBundleName) + .instance; + } + + /** + * Parse the table from SchemaBundle resource. + * + * @param {string} schemaBundleName + * A fully-qualified path representing SchemaBundle resource. + * @returns {string} A string representing the table. + */ + matchTableFromSchemaBundleName(schemaBundleName: string) { + return this.pathTemplates.schemaBundlePathTemplate.match(schemaBundleName) + .table; + } + + /** + * Parse the schema_bundle from SchemaBundle resource. + * + * @param {string} schemaBundleName + * A fully-qualified path representing SchemaBundle resource. + * @returns {string} A string representing the schema_bundle. + */ + matchSchemaBundleFromSchemaBundleName(schemaBundleName: string) { + return this.pathTemplates.schemaBundlePathTemplate.match(schemaBundleName) + .schema_bundle; + } + + /** + * Return a fully-qualified snapshot resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} cluster + * @param {string} snapshot + * @returns {string} Resource name string. + */ + snapshotPath( + project: string, + instance: string, + cluster: string, + snapshot: string, + ) { + return this.pathTemplates.snapshotPathTemplate.render({ + project: project, + instance: instance, + cluster: cluster, + snapshot: snapshot, + }); + } + + /** + * Parse the project from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).project; + } + + /** + * Parse the instance from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).instance; + } + + /** + * Parse the cluster from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).cluster; + } + + /** + * Parse the snapshot from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the snapshot. + */ + matchSnapshotFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).snapshot; + } + + /** + * Return a fully-qualified table resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @returns {string} Resource name string. + */ + tablePath(project: string, instance: string, table: string) { + return this.pathTemplates.tablePathTemplate.render({ + project: project, + instance: instance, + table: table, + }); + } + + /** + * Parse the project from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).project; + } + + /** + * Parse the instance from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).instance; + } + + /** + * Parse the table from Table resource. + * + * @param {string} tableName + * A fully-qualified path representing Table resource. + * @returns {string} A string representing the table. + */ + matchTableFromTableName(tableName: string) { + return this.pathTemplates.tablePathTemplate.match(tableName).table; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.bigtableTableAdminStub && !this._terminated) { + return this.bigtableTableAdminStub.then((stub) => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_client_config.json b/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_client_config.json new file mode 100644 index 000000000000..57ad564bfe33 --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_client_config.json @@ -0,0 +1,195 @@ +{ + "interfaces": { + "google.bigtable.admin.v2.BigtableTableAdmin": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "264268458a9e88347dbacbd9398202ff5885a40b": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateTable": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateTableFromSnapshot": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTables": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "GetTable": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "UpdateTable": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTable": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UndeleteTable": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAuthorizedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAuthorizedViews": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAuthorizedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAuthorizedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAuthorizedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ModifyColumnFamilies": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DropRowRange": { + "timeout_millis": 3600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GenerateConsistencyToken": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "CheckConsistency": { + "timeout_millis": 3600000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "SnapshotTable": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "ListSnapshots": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "DeleteSnapshot": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackup": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "RestoreTable": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CopyBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, + "CreateSchemaBundle": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSchemaBundle": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetSchemaBundle": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSchemaBundles": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSchemaBundle": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_proto_list.json b/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_proto_list.json new file mode 100644 index 000000000000..6a7b737f3e07 --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/bigtable_table_admin_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/bigtable/admin/v2/bigtable_instance_admin.proto", + "../../protos/google/bigtable/admin/v2/bigtable_table_admin.proto", + "../../protos/google/bigtable/admin/v2/common.proto", + "../../protos/google/bigtable/admin/v2/instance.proto", + "../../protos/google/bigtable/admin/v2/table.proto", + "../../protos/google/bigtable/admin/v2/types.proto" +] diff --git a/packages/google-cloud-bigtable-api/src/v2/gapic_metadata.json b/packages/google-cloud-bigtable-api/src/v2/gapic_metadata.json new file mode 100644 index 000000000000..3ce4e618c419 --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/gapic_metadata.json @@ -0,0 +1,733 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.bigtable.admin.v2", + "libraryPackage": "@google-cloud/bigtable-api", + "services": { + "BigtableInstanceAdmin": { + "clients": { + "grpc": { + "libraryClient": "BigtableInstanceAdminClient", + "rpcs": { + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "CreateAppProfile": { + "methods": [ + "createAppProfile" + ] + }, + "GetAppProfile": { + "methods": [ + "getAppProfile" + ] + }, + "DeleteAppProfile": { + "methods": [ + "deleteAppProfile" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetLogicalView": { + "methods": [ + "getLogicalView" + ] + }, + "DeleteLogicalView": { + "methods": [ + "deleteLogicalView" + ] + }, + "GetMaterializedView": { + "methods": [ + "getMaterializedView" + ] + }, + "DeleteMaterializedView": { + "methods": [ + "deleteMaterializedView" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "CreateLogicalView": { + "methods": [ + "createLogicalView" + ] + }, + "UpdateLogicalView": { + "methods": [ + "updateLogicalView" + ] + }, + "CreateMaterializedView": { + "methods": [ + "createMaterializedView" + ] + }, + "UpdateMaterializedView": { + "methods": [ + "updateMaterializedView" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles", + "listAppProfilesStream", + "listAppProfilesAsync" + ] + }, + "ListHotTablets": { + "methods": [ + "listHotTablets", + "listHotTabletsStream", + "listHotTabletsAsync" + ] + }, + "ListLogicalViews": { + "methods": [ + "listLogicalViews", + "listLogicalViewsStream", + "listLogicalViewsAsync" + ] + }, + "ListMaterializedViews": { + "methods": [ + "listMaterializedViews", + "listMaterializedViewsStream", + "listMaterializedViewsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BigtableInstanceAdminClient", + "rpcs": { + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "CreateAppProfile": { + "methods": [ + "createAppProfile" + ] + }, + "GetAppProfile": { + "methods": [ + "getAppProfile" + ] + }, + "DeleteAppProfile": { + "methods": [ + "deleteAppProfile" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetLogicalView": { + "methods": [ + "getLogicalView" + ] + }, + "DeleteLogicalView": { + "methods": [ + "deleteLogicalView" + ] + }, + "GetMaterializedView": { + "methods": [ + "getMaterializedView" + ] + }, + "DeleteMaterializedView": { + "methods": [ + "deleteMaterializedView" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "CreateLogicalView": { + "methods": [ + "createLogicalView" + ] + }, + "UpdateLogicalView": { + "methods": [ + "updateLogicalView" + ] + }, + "CreateMaterializedView": { + "methods": [ + "createMaterializedView" + ] + }, + "UpdateMaterializedView": { + "methods": [ + "updateMaterializedView" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles", + "listAppProfilesStream", + "listAppProfilesAsync" + ] + }, + "ListHotTablets": { + "methods": [ + "listHotTablets", + "listHotTabletsStream", + "listHotTabletsAsync" + ] + }, + "ListLogicalViews": { + "methods": [ + "listLogicalViews", + "listLogicalViewsStream", + "listLogicalViewsAsync" + ] + }, + "ListMaterializedViews": { + "methods": [ + "listMaterializedViews", + "listMaterializedViewsStream", + "listMaterializedViewsAsync" + ] + } + } + } + } + }, + "BigtableTableAdmin": { + "clients": { + "grpc": { + "libraryClient": "BigtableTableAdminClient", + "rpcs": { + "CreateTable": { + "methods": [ + "createTable" + ] + }, + "GetTable": { + "methods": [ + "getTable" + ] + }, + "DeleteTable": { + "methods": [ + "deleteTable" + ] + }, + "GetAuthorizedView": { + "methods": [ + "getAuthorizedView" + ] + }, + "DeleteAuthorizedView": { + "methods": [ + "deleteAuthorizedView" + ] + }, + "ModifyColumnFamilies": { + "methods": [ + "modifyColumnFamilies" + ] + }, + "DropRowRange": { + "methods": [ + "dropRowRange" + ] + }, + "GenerateConsistencyToken": { + "methods": [ + "generateConsistencyToken" + ] + }, + "CheckConsistency": { + "methods": [ + "checkConsistency" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetSchemaBundle": { + "methods": [ + "getSchemaBundle" + ] + }, + "DeleteSchemaBundle": { + "methods": [ + "deleteSchemaBundle" + ] + }, + "CreateTableFromSnapshot": { + "methods": [ + "createTableFromSnapshot" + ] + }, + "UpdateTable": { + "methods": [ + "updateTable" + ] + }, + "UndeleteTable": { + "methods": [ + "undeleteTable" + ] + }, + "CreateAuthorizedView": { + "methods": [ + "createAuthorizedView" + ] + }, + "UpdateAuthorizedView": { + "methods": [ + "updateAuthorizedView" + ] + }, + "SnapshotTable": { + "methods": [ + "snapshotTable" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "RestoreTable": { + "methods": [ + "restoreTable" + ] + }, + "CopyBackup": { + "methods": [ + "copyBackup" + ] + }, + "CreateSchemaBundle": { + "methods": [ + "createSchemaBundle" + ] + }, + "UpdateSchemaBundle": { + "methods": [ + "updateSchemaBundle" + ] + }, + "ListTables": { + "methods": [ + "listTables", + "listTablesStream", + "listTablesAsync" + ] + }, + "ListAuthorizedViews": { + "methods": [ + "listAuthorizedViews", + "listAuthorizedViewsStream", + "listAuthorizedViewsAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListSchemaBundles": { + "methods": [ + "listSchemaBundles", + "listSchemaBundlesStream", + "listSchemaBundlesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BigtableTableAdminClient", + "rpcs": { + "CreateTable": { + "methods": [ + "createTable" + ] + }, + "GetTable": { + "methods": [ + "getTable" + ] + }, + "DeleteTable": { + "methods": [ + "deleteTable" + ] + }, + "GetAuthorizedView": { + "methods": [ + "getAuthorizedView" + ] + }, + "DeleteAuthorizedView": { + "methods": [ + "deleteAuthorizedView" + ] + }, + "ModifyColumnFamilies": { + "methods": [ + "modifyColumnFamilies" + ] + }, + "DropRowRange": { + "methods": [ + "dropRowRange" + ] + }, + "GenerateConsistencyToken": { + "methods": [ + "generateConsistencyToken" + ] + }, + "CheckConsistency": { + "methods": [ + "checkConsistency" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetSchemaBundle": { + "methods": [ + "getSchemaBundle" + ] + }, + "DeleteSchemaBundle": { + "methods": [ + "deleteSchemaBundle" + ] + }, + "CreateTableFromSnapshot": { + "methods": [ + "createTableFromSnapshot" + ] + }, + "UpdateTable": { + "methods": [ + "updateTable" + ] + }, + "UndeleteTable": { + "methods": [ + "undeleteTable" + ] + }, + "CreateAuthorizedView": { + "methods": [ + "createAuthorizedView" + ] + }, + "UpdateAuthorizedView": { + "methods": [ + "updateAuthorizedView" + ] + }, + "SnapshotTable": { + "methods": [ + "snapshotTable" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "RestoreTable": { + "methods": [ + "restoreTable" + ] + }, + "CopyBackup": { + "methods": [ + "copyBackup" + ] + }, + "CreateSchemaBundle": { + "methods": [ + "createSchemaBundle" + ] + }, + "UpdateSchemaBundle": { + "methods": [ + "updateSchemaBundle" + ] + }, + "ListTables": { + "methods": [ + "listTables", + "listTablesStream", + "listTablesAsync" + ] + }, + "ListAuthorizedViews": { + "methods": [ + "listAuthorizedViews", + "listAuthorizedViewsStream", + "listAuthorizedViewsAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListSchemaBundles": { + "methods": [ + "listSchemaBundles", + "listSchemaBundlesStream", + "listSchemaBundlesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-bigtable-api/src/v2/index.ts b/packages/google-cloud-bigtable-api/src/v2/index.ts new file mode 100644 index 000000000000..633ffef9673d --- /dev/null +++ b/packages/google-cloud-bigtable-api/src/v2/index.ts @@ -0,0 +1,20 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export { BigtableInstanceAdminClient } from './bigtable_instance_admin_client'; +export { BigtableTableAdminClient } from './bigtable_table_admin_client'; diff --git a/packages/google-cloud-bigtable-api/system-test/fixtures/sample/src/index.js b/packages/google-cloud-bigtable-api/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..4b8a09cd6263 --- /dev/null +++ b/packages/google-cloud-bigtable-api/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const admin = require('@google-cloud/bigtable-api'); + +function main() { + const bigtableInstanceAdminClient = new admin.BigtableInstanceAdminClient(); + const bigtableTableAdminClient = new admin.BigtableTableAdminClient(); +} + +main(); diff --git a/packages/google-cloud-bigtable-api/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-bigtable-api/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..94ea60a02845 --- /dev/null +++ b/packages/google-cloud-bigtable-api/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,43 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { + BigtableInstanceAdminClient, + BigtableTableAdminClient, +} from '@google-cloud/bigtable-api'; + +// check that the client class type name can be used +function doStuffWithBigtableInstanceAdminClient( + client: BigtableInstanceAdminClient, +) { + client.close(); +} +function doStuffWithBigtableTableAdminClient(client: BigtableTableAdminClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); + doStuffWithBigtableInstanceAdminClient(bigtableInstanceAdminClient); + // check that the client instance can be created + const bigtableTableAdminClient = new BigtableTableAdminClient(); + doStuffWithBigtableTableAdminClient(bigtableTableAdminClient); +} + +main(); diff --git a/packages/google-cloud-bigtable-api/system-test/install.ts b/packages/google-cloud-bigtable-api/system-test/install.ts new file mode 100644 index 000000000000..ccf167042d2e --- /dev/null +++ b/packages/google-cloud-bigtable-api/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { packNTest } from 'pack-n-play'; +import { readFileSync } from 'fs'; +import { describe, it } from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts', + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + cjs: readFileSync( + './system-test/fixtures/sample/src/index.js', + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-bigtable-api/test/gapic_bigtable_instance_admin_v2.ts b/packages/google-cloud-bigtable-api/test/gapic_bigtable_instance_admin_v2.ts new file mode 100644 index 000000000000..8b380e9e2bc2 --- /dev/null +++ b/packages/google-cloud-bigtable-api/test/gapic_bigtable_instance_admin_v2.ts @@ -0,0 +1,6833 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import { SinonStub } from 'sinon'; +import { describe, it } from 'mocha'; +import * as bigtableinstanceadminModule from '../src'; + +import { PassThrough } from 'stream'; + +import { protobuf, LROperation, operationsProtos } from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, { defaults: true }); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error, +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error, +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error, +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error, +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({ done: true, value: undefined }); + } + return Promise.resolve({ done: false, value: responses![counter++] }); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2.BigtableInstanceAdminClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + bigtableinstanceadminModule.v2.BigtableInstanceAdminClient + .servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + bigtableinstanceadminModule.v2.BigtableInstanceAdminClient + .apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'bigtableadmin.configured.example.com', + ); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = + bigtableinstanceadminModule.v2.BigtableInstanceAdminClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.bigtableInstanceAdminStub, undefined); + await client.initialize(); + assert(client.bigtableInstanceAdminStub); + }); + + it('has close method for the initialized client', (done) => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.initialize().catch((err) => { + throw err; + }); + assert(client.bigtableInstanceAdminStub); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has close method for the non-initialized client', (done) => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.bigtableInstanceAdminStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getInstance', () => { + it('invokes getInstance without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetInstanceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance(), + ); + client.innerApiCalls.getInstance = stubSimpleCall(expectedResponse); + const [response] = await client.getInstance(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInstance without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetInstanceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance(), + ); + client.innerApiCalls.getInstance = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getInstance( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IInstance | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInstance with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetInstanceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getInstance = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getInstance(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInstance with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetInstanceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getInstance(request), expectedError); + }); + }); + + describe('listInstances', () => { + it('invokes listInstances without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListInstancesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListInstancesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListInstancesResponse(), + ); + client.innerApiCalls.listInstances = stubSimpleCall(expectedResponse); + const [response] = await client.listInstances(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listInstances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInstances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstances without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListInstancesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListInstancesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListInstancesResponse(), + ); + client.innerApiCalls.listInstances = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInstances( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IListInstancesResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listInstances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInstances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstances with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListInstancesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListInstancesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listInstances = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listInstances(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listInstances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInstances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstances with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListInstancesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListInstancesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.listInstances(request), expectedError); + }); + }); + + describe('updateInstance', () => { + it('invokes updateInstance without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.Instance', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance(), + ); + client.innerApiCalls.updateInstance = stubSimpleCall(expectedResponse); + const [response] = await client.updateInstance(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateInstance without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.Instance', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance(), + ); + client.innerApiCalls.updateInstance = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateInstance( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IInstance | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateInstance with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.Instance', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateInstance = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateInstance(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateInstance with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.Instance', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.updateInstance(request), expectedError); + }); + }); + + describe('deleteInstance', () => { + it('invokes deleteInstance without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteInstanceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteInstance = stubSimpleCall(expectedResponse); + const [response] = await client.deleteInstance(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteInstance without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteInstanceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteInstance = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteInstance( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteInstance with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteInstanceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteInstance = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteInstance(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteInstance with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteInstanceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteInstance(request), expectedError); + }); + }); + + describe('getCluster', () => { + it('invokes getCluster without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetClusterRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Cluster(), + ); + client.innerApiCalls.getCluster = stubSimpleCall(expectedResponse); + const [response] = await client.getCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetClusterRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Cluster(), + ); + client.innerApiCalls.getCluster = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCluster( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ICluster | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetClusterRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCluster = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetClusterRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getCluster(request), expectedError); + }); + }); + + describe('listClusters', () => { + it('invokes listClusters without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListClustersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListClustersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListClustersResponse(), + ); + client.innerApiCalls.listClusters = stubSimpleCall(expectedResponse); + const [response] = await client.listClusters(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListClustersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListClustersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListClustersResponse(), + ); + client.innerApiCalls.listClusters = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listClusters( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IListClustersResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListClustersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListClustersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listClusters = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listClusters(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListClustersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListClustersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.listClusters(request), expectedError); + }); + }); + + describe('deleteCluster', () => { + it('invokes deleteCluster without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteClusterRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteCluster = stubSimpleCall(expectedResponse); + const [response] = await client.deleteCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteClusterRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteCluster = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteCluster( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteClusterRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCluster = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteClusterRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteCluster(request), expectedError); + }); + }); + + describe('createAppProfile', () => { + it('invokes createAppProfile without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateAppProfileRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.AppProfile(), + ); + client.innerApiCalls.createAppProfile = stubSimpleCall(expectedResponse); + const [response] = await client.createAppProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAppProfile without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateAppProfileRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.AppProfile(), + ); + client.innerApiCalls.createAppProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAppProfile( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IAppProfile | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAppProfile with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateAppProfileRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAppProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.createAppProfile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAppProfile with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateAppProfileRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.createAppProfile(request), expectedError); + }); + }); + + describe('getAppProfile', () => { + it('invokes getAppProfile without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAppProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.AppProfile(), + ); + client.innerApiCalls.getAppProfile = stubSimpleCall(expectedResponse); + const [response] = await client.getAppProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAppProfile without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAppProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.AppProfile(), + ); + client.innerApiCalls.getAppProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAppProfile( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IAppProfile | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAppProfile with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAppProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAppProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getAppProfile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAppProfile with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAppProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getAppProfile(request), expectedError); + }); + }); + + describe('deleteAppProfile', () => { + it('invokes deleteAppProfile without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAppProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteAppProfile = stubSimpleCall(expectedResponse); + const [response] = await client.deleteAppProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAppProfile without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAppProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteAppProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAppProfile( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAppProfile with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAppProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAppProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteAppProfile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAppProfile with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAppProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAppProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteAppProfile(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy(), + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy(), + ); + client.innerApiCalls.getIamPolicy = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getIamPolicy(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy(), + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy(), + ); + client.innerApiCalls.setIamPolicy = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.setIamPolicy(request), expectedError); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse(), + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse(), + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.ITestIamPermissionsResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); + }); + + describe('getLogicalView', () => { + it('invokes getLogicalView without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetLogicalViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ); + client.innerApiCalls.getLogicalView = stubSimpleCall(expectedResponse); + const [response] = await client.getLogicalView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLogicalView without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetLogicalViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ); + client.innerApiCalls.getLogicalView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLogicalView( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ILogicalView | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLogicalView with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetLogicalViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getLogicalView = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getLogicalView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLogicalView with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetLogicalViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getLogicalView(request), expectedError); + }); + }); + + describe('deleteLogicalView', () => { + it('invokes deleteLogicalView without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteLogicalViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteLogicalView = stubSimpleCall(expectedResponse); + const [response] = await client.deleteLogicalView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLogicalView without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteLogicalViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteLogicalView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteLogicalView( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLogicalView with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteLogicalViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLogicalView = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteLogicalView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLogicalView with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteLogicalViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteLogicalView(request), expectedError); + }); + }); + + describe('getMaterializedView', () => { + it('invokes getMaterializedView without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetMaterializedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ); + client.innerApiCalls.getMaterializedView = + stubSimpleCall(expectedResponse); + const [response] = await client.getMaterializedView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMaterializedView without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetMaterializedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ); + client.innerApiCalls.getMaterializedView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMaterializedView( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IMaterializedView | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMaterializedView with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetMaterializedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMaterializedView = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getMaterializedView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMaterializedView with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetMaterializedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getMaterializedView(request), expectedError); + }); + }); + + describe('deleteMaterializedView', () => { + it('invokes deleteMaterializedView without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteMaterializedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteMaterializedView = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteMaterializedView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMaterializedView without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteMaterializedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteMaterializedView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMaterializedView( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMaterializedView with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteMaterializedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMaterializedView = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteMaterializedView(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMaterializedView with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteMaterializedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.deleteMaterializedView(request), + expectedError, + ); + }); + }); + + describe('createInstance', () => { + it('invokes createInstance without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateInstanceRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createInstance = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createInstance(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createInstance without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateInstanceRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createInstance = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createInstance( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.ICreateInstanceMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createInstance with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateInstanceRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createInstance = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.createInstance(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createInstance with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateInstanceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateInstanceRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createInstance = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createInstance(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateInstanceProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateInstanceProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateInstanceProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateInstanceProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('partialUpdateInstance', () => { + it('invokes partialUpdateInstance without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateInstanceRequest(), + ); + request.instance ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.PartialUpdateInstanceRequest', + ['instance', 'name'], + ); + request.instance.name = defaultValue1; + const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.partialUpdateInstance = + stubLongRunningCall(expectedResponse); + const [operation] = await client.partialUpdateInstance(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.partialUpdateInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.partialUpdateInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes partialUpdateInstance without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateInstanceRequest(), + ); + request.instance ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.PartialUpdateInstanceRequest', + ['instance', 'name'], + ); + request.instance.name = defaultValue1; + const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.partialUpdateInstance = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.partialUpdateInstance( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IInstance, + protos.google.bigtable.admin.v2.IUpdateInstanceMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.partialUpdateInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.partialUpdateInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes partialUpdateInstance with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateInstanceRequest(), + ); + request.instance ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.PartialUpdateInstanceRequest', + ['instance', 'name'], + ); + request.instance.name = defaultValue1; + const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.partialUpdateInstance = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.partialUpdateInstance(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.partialUpdateInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.partialUpdateInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes partialUpdateInstance with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateInstanceRequest(), + ); + request.instance ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.PartialUpdateInstanceRequest', + ['instance', 'name'], + ); + request.instance.name = defaultValue1; + const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.partialUpdateInstance = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.partialUpdateInstance(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.partialUpdateInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.partialUpdateInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkPartialUpdateInstanceProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkPartialUpdateInstanceProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkPartialUpdateInstanceProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkPartialUpdateInstanceProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createCluster', () => { + it('invokes createCluster without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateClusterRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateClusterRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.ICreateClusterMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateClusterRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCluster = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.createCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateClusterRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateClusterRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCluster = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateClusterProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateClusterProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateClusterProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateClusterProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateCluster', () => { + it('invokes updateCluster without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Cluster(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.Cluster', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Cluster(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.Cluster', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IUpdateClusterMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Cluster(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.Cluster', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCluster = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Cluster(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.Cluster', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCluster = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateClusterProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateClusterProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateClusterProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateClusterProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('partialUpdateCluster', () => { + it('invokes partialUpdateCluster without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest(), + ); + request.cluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.PartialUpdateClusterRequest', + ['cluster', 'name'], + ); + request.cluster.name = defaultValue1; + const expectedHeaderRequestParams = `cluster.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.partialUpdateCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.partialUpdateCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.partialUpdateCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.partialUpdateCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes partialUpdateCluster without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest(), + ); + request.cluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.PartialUpdateClusterRequest', + ['cluster', 'name'], + ); + request.cluster.name = defaultValue1; + const expectedHeaderRequestParams = `cluster.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.partialUpdateCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.partialUpdateCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.partialUpdateCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.partialUpdateCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes partialUpdateCluster with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest(), + ); + request.cluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.PartialUpdateClusterRequest', + ['cluster', 'name'], + ); + request.cluster.name = defaultValue1; + const expectedHeaderRequestParams = `cluster.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.partialUpdateCluster = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.partialUpdateCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.partialUpdateCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.partialUpdateCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes partialUpdateCluster with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest(), + ); + request.cluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.PartialUpdateClusterRequest', + ['cluster', 'name'], + ); + request.cluster.name = defaultValue1; + const expectedHeaderRequestParams = `cluster.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.partialUpdateCluster = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.partialUpdateCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.partialUpdateCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.partialUpdateCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkPartialUpdateClusterProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkPartialUpdateClusterProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkPartialUpdateClusterProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkPartialUpdateClusterProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateAppProfile', () => { + it('invokes updateAppProfile without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateAppProfileRequest(), + ); + request.appProfile ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateAppProfileRequest', + ['appProfile', 'name'], + ); + request.appProfile.name = defaultValue1; + const expectedHeaderRequestParams = `app_profile.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateAppProfile = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAppProfile(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAppProfile without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateAppProfileRequest(), + ); + request.appProfile ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateAppProfileRequest', + ['appProfile', 'name'], + ); + request.appProfile.name = defaultValue1; + const expectedHeaderRequestParams = `app_profile.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateAppProfile = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAppProfile( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IAppProfile, + protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAppProfile with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateAppProfileRequest(), + ); + request.appProfile ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateAppProfileRequest', + ['appProfile', 'name'], + ); + request.appProfile.name = defaultValue1; + const expectedHeaderRequestParams = `app_profile.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAppProfile = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateAppProfile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAppProfile with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateAppProfileRequest(), + ); + request.appProfile ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateAppProfileRequest', + ['appProfile', 'name'], + ); + request.appProfile.name = defaultValue1; + const expectedHeaderRequestParams = `app_profile.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAppProfile = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateAppProfile(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAppProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAppProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAppProfileProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateAppProfileProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAppProfileProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateAppProfileProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createLogicalView', () => { + it('invokes createLogicalView without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateLogicalViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createLogicalView = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createLogicalView(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLogicalView without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateLogicalViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createLogicalView = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createLogicalView( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.ICreateLogicalViewMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLogicalView with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateLogicalViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLogicalView = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.createLogicalView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLogicalView with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateLogicalViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateLogicalViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLogicalView = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createLogicalView(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateLogicalViewProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateLogicalViewProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateLogicalViewProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateLogicalViewProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateLogicalView', () => { + it('invokes updateLogicalView without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateLogicalViewRequest(), + ); + request.logicalView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateLogicalViewRequest', + ['logicalView', 'name'], + ); + request.logicalView.name = defaultValue1; + const expectedHeaderRequestParams = `logical_view.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateLogicalView = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateLogicalView(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLogicalView without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateLogicalViewRequest(), + ); + request.logicalView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateLogicalViewRequest', + ['logicalView', 'name'], + ); + request.logicalView.name = defaultValue1; + const expectedHeaderRequestParams = `logical_view.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateLogicalView = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateLogicalView( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ILogicalView, + protos.google.bigtable.admin.v2.IUpdateLogicalViewMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLogicalView with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateLogicalViewRequest(), + ); + request.logicalView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateLogicalViewRequest', + ['logicalView', 'name'], + ); + request.logicalView.name = defaultValue1; + const expectedHeaderRequestParams = `logical_view.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLogicalView = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateLogicalView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLogicalView with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateLogicalViewRequest(), + ); + request.logicalView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateLogicalViewRequest', + ['logicalView', 'name'], + ); + request.logicalView.name = defaultValue1; + const expectedHeaderRequestParams = `logical_view.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLogicalView = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateLogicalView(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateLogicalView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLogicalView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateLogicalViewProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateLogicalViewProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateLogicalViewProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateLogicalViewProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createMaterializedView', () => { + it('invokes createMaterializedView without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateMaterializedViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createMaterializedView = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createMaterializedView(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMaterializedView without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateMaterializedViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createMaterializedView = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMaterializedView( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.ICreateMaterializedViewMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMaterializedView with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateMaterializedViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMaterializedView = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createMaterializedView(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMaterializedView with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateMaterializedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateMaterializedViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMaterializedView = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createMaterializedView(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateMaterializedViewProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateMaterializedViewProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateMaterializedViewProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateMaterializedViewProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateMaterializedView', () => { + it('invokes updateMaterializedView without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateMaterializedViewRequest(), + ); + request.materializedView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateMaterializedViewRequest', + ['materializedView', 'name'], + ); + request.materializedView.name = defaultValue1; + const expectedHeaderRequestParams = `materialized_view.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateMaterializedView = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateMaterializedView(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaterializedView without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateMaterializedViewRequest(), + ); + request.materializedView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateMaterializedViewRequest', + ['materializedView', 'name'], + ); + request.materializedView.name = defaultValue1; + const expectedHeaderRequestParams = `materialized_view.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateMaterializedView = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMaterializedView( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IMaterializedView, + protos.google.bigtable.admin.v2.IUpdateMaterializedViewMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaterializedView with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateMaterializedViewRequest(), + ); + request.materializedView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateMaterializedViewRequest', + ['materializedView', 'name'], + ); + request.materializedView.name = defaultValue1; + const expectedHeaderRequestParams = `materialized_view.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMaterializedView = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.updateMaterializedView(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.updateMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaterializedView with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateMaterializedViewRequest(), + ); + request.materializedView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateMaterializedViewRequest', + ['materializedView', 'name'], + ); + request.materializedView.name = defaultValue1; + const expectedHeaderRequestParams = `materialized_view.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMaterializedView = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateMaterializedView(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateMaterializedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMaterializedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateMaterializedViewProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateMaterializedViewProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateMaterializedViewProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateMaterializedViewProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listAppProfiles', () => { + it('invokes listAppProfiles without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAppProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + ]; + client.innerApiCalls.listAppProfiles = stubSimpleCall(expectedResponse); + const [response] = await client.listAppProfiles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAppProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAppProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAppProfiles without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAppProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + ]; + client.innerApiCalls.listAppProfiles = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAppProfiles( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IAppProfile[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAppProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAppProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAppProfiles with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAppProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAppProfiles = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listAppProfiles(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listAppProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAppProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAppProfilesStream without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAppProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + ]; + client.descriptors.page.listAppProfiles.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAppProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.AppProfile[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.AppProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listAppProfiles.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAppProfiles, request), + ); + assert( + (client.descriptors.page.listAppProfiles.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listAppProfilesStream with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAppProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAppProfiles.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAppProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.AppProfile[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.AppProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAppProfiles.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAppProfiles, request), + ); + assert( + (client.descriptors.page.listAppProfiles.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listAppProfiles without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAppProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + generateSampleMessage(new protos.google.bigtable.admin.v2.AppProfile()), + ]; + client.descriptors.page.listAppProfiles.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.IAppProfile[] = []; + const iterable = client.listAppProfilesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAppProfiles.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listAppProfiles.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listAppProfiles with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAppProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAppProfiles.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAppProfilesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.IAppProfile[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAppProfiles.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listAppProfiles.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listHotTablets', () => { + it('invokes listHotTablets without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListHotTabletsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + ]; + client.innerApiCalls.listHotTablets = stubSimpleCall(expectedResponse); + const [response] = await client.listHotTablets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listHotTablets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listHotTablets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listHotTablets without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListHotTabletsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + ]; + client.innerApiCalls.listHotTablets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listHotTablets( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IHotTablet[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listHotTablets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listHotTablets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listHotTablets with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListHotTabletsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listHotTablets = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listHotTablets(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listHotTablets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listHotTablets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listHotTabletsStream without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListHotTabletsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + ]; + client.descriptors.page.listHotTablets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listHotTabletsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.HotTablet[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.HotTablet) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listHotTablets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listHotTablets, request), + ); + assert( + (client.descriptors.page.listHotTablets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listHotTabletsStream with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListHotTabletsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listHotTablets.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listHotTabletsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.HotTablet[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.HotTablet) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listHotTablets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listHotTablets, request), + ); + assert( + (client.descriptors.page.listHotTablets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listHotTablets without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListHotTabletsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + generateSampleMessage(new protos.google.bigtable.admin.v2.HotTablet()), + ]; + client.descriptors.page.listHotTablets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.IHotTablet[] = []; + const iterable = client.listHotTabletsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listHotTablets.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listHotTablets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listHotTablets with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListHotTabletsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listHotTablets.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listHotTabletsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.IHotTablet[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listHotTablets.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listHotTablets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listLogicalViews', () => { + it('invokes listLogicalViews without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListLogicalViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + ]; + client.innerApiCalls.listLogicalViews = stubSimpleCall(expectedResponse); + const [response] = await client.listLogicalViews(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listLogicalViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogicalViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLogicalViews without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListLogicalViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + ]; + client.innerApiCalls.listLogicalViews = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLogicalViews( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ILogicalView[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listLogicalViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogicalViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLogicalViews with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListLogicalViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listLogicalViews = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listLogicalViews(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listLogicalViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogicalViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLogicalViewsStream without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListLogicalViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + ]; + client.descriptors.page.listLogicalViews.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listLogicalViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.LogicalView[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.LogicalView) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLogicalViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLogicalViews, request), + ); + assert( + (client.descriptors.page.listLogicalViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listLogicalViewsStream with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListLogicalViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listLogicalViews.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listLogicalViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.LogicalView[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.LogicalView) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listLogicalViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLogicalViews, request), + ); + assert( + (client.descriptors.page.listLogicalViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listLogicalViews without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListLogicalViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.LogicalView(), + ), + ]; + client.descriptors.page.listLogicalViews.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.ILogicalView[] = []; + const iterable = client.listLogicalViewsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listLogicalViews.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listLogicalViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listLogicalViews with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListLogicalViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listLogicalViews.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLogicalViewsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.ILogicalView[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listLogicalViews.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listLogicalViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listMaterializedViews', () => { + it('invokes listMaterializedViews without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListMaterializedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + ]; + client.innerApiCalls.listMaterializedViews = + stubSimpleCall(expectedResponse); + const [response] = await client.listMaterializedViews(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMaterializedViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMaterializedViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMaterializedViews without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListMaterializedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + ]; + client.innerApiCalls.listMaterializedViews = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMaterializedViews( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IMaterializedView[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMaterializedViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMaterializedViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMaterializedViews with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListMaterializedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMaterializedViews = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listMaterializedViews(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listMaterializedViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMaterializedViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMaterializedViewsStream without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListMaterializedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + ]; + client.descriptors.page.listMaterializedViews.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMaterializedViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.MaterializedView[] = + []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.MaterializedView) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listMaterializedViews + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMaterializedViews, request), + ); + assert( + ( + client.descriptors.page.listMaterializedViews + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listMaterializedViewsStream with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListMaterializedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMaterializedViews.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMaterializedViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.MaterializedView[] = + []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.MaterializedView) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listMaterializedViews + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMaterializedViews, request), + ); + assert( + ( + client.descriptors.page.listMaterializedViews + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMaterializedViews without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListMaterializedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.MaterializedView(), + ), + ]; + client.descriptors.page.listMaterializedViews.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.IMaterializedView[] = []; + const iterable = client.listMaterializedViewsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMaterializedViews + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMaterializedViews + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMaterializedViews with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListMaterializedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMaterializedViews.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMaterializedViewsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.IMaterializedView[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMaterializedViews + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMaterializedViews + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('Path templates', () => { + describe('appProfile', async () => { + const fakePath = '/rendered/path/appProfile'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + app_profile: 'appProfileValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.appProfilePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.appProfilePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('appProfilePath', () => { + const result = client.appProfilePath( + 'projectValue', + 'instanceValue', + 'appProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.appProfilePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAppProfileName', () => { + const result = client.matchProjectFromAppProfileName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.appProfilePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromAppProfileName', () => { + const result = client.matchInstanceFromAppProfileName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.appProfilePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAppProfileFromAppProfileName', () => { + const result = client.matchAppProfileFromAppProfileName(fakePath); + assert.strictEqual(result, 'appProfileValue'); + assert( + (client.pathTemplates.appProfilePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('authorizedView', async () => { + const fakePath = '/rendered/path/authorizedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + authorized_view: 'authorizedViewValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.authorizedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.authorizedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('authorizedViewPath', () => { + const result = client.authorizedViewPath( + 'projectValue', + 'instanceValue', + 'tableValue', + 'authorizedViewValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.authorizedViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAuthorizedViewName', () => { + const result = client.matchProjectFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromAuthorizedViewName', () => { + const result = client.matchInstanceFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableFromAuthorizedViewName', () => { + const result = client.matchTableFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAuthorizedViewFromAuthorizedViewName', () => { + const result = + client.matchAuthorizedViewFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'authorizedViewValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backup', async () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + cluster: 'clusterValue', + backup: 'backupValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'instanceValue', + 'clusterValue', + 'backupValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromBackupName', () => { + const result = client.matchInstanceFromBackupName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchClusterFromBackupName', () => { + const result = client.matchClusterFromBackupName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('cluster', async () => { + const fakePath = '/rendered/path/cluster'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + cluster: 'clusterValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.clusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.clusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('clusterPath', () => { + const result = client.clusterPath( + 'projectValue', + 'instanceValue', + 'clusterValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.clusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromClusterName', () => { + const result = client.matchProjectFromClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromClusterName', () => { + const result = client.matchInstanceFromClusterName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchClusterFromClusterName', () => { + const result = client.matchClusterFromClusterName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('hotTablet', async () => { + const fakePath = '/rendered/path/hotTablet'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + cluster: 'clusterValue', + hot_tablet: 'hotTabletValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.hotTabletPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.hotTabletPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('hotTabletPath', () => { + const result = client.hotTabletPath( + 'projectValue', + 'instanceValue', + 'clusterValue', + 'hotTabletValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.hotTabletPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromHotTabletName', () => { + const result = client.matchProjectFromHotTabletName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.hotTabletPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromHotTabletName', () => { + const result = client.matchInstanceFromHotTabletName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.hotTabletPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchClusterFromHotTabletName', () => { + const result = client.matchClusterFromHotTabletName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.hotTabletPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchHotTabletFromHotTabletName', () => { + const result = client.matchHotTabletFromHotTabletName(fakePath); + assert.strictEqual(result, 'hotTabletValue'); + assert( + (client.pathTemplates.hotTabletPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('instance', async () => { + const fakePath = '/rendered/path/instance'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.instancePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.instancePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath('projectValue', 'instanceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('logicalView', async () => { + const fakePath = '/rendered/path/logicalView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + logical_view: 'logicalViewValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.logicalViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.logicalViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('logicalViewPath', () => { + const result = client.logicalViewPath( + 'projectValue', + 'instanceValue', + 'logicalViewValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.logicalViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromLogicalViewName', () => { + const result = client.matchProjectFromLogicalViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.logicalViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromLogicalViewName', () => { + const result = client.matchInstanceFromLogicalViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.logicalViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLogicalViewFromLogicalViewName', () => { + const result = client.matchLogicalViewFromLogicalViewName(fakePath); + assert.strictEqual(result, 'logicalViewValue'); + assert( + (client.pathTemplates.logicalViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('materializedView', async () => { + const fakePath = '/rendered/path/materializedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + materialized_view: 'materializedViewValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.materializedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.materializedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('materializedViewPath', () => { + const result = client.materializedViewPath( + 'projectValue', + 'instanceValue', + 'materializedViewValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.materializedViewPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMaterializedViewName', () => { + const result = client.matchProjectFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromMaterializedViewName', () => { + const result = client.matchInstanceFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchMaterializedViewFromMaterializedViewName', () => { + const result = + client.matchMaterializedViewFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'materializedViewValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('project', async () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('schemaBundle', async () => { + const fakePath = '/rendered/path/schemaBundle'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + schema_bundle: 'schemaBundleValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.schemaBundlePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.schemaBundlePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('schemaBundlePath', () => { + const result = client.schemaBundlePath( + 'projectValue', + 'instanceValue', + 'tableValue', + 'schemaBundleValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.schemaBundlePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromSchemaBundleName', () => { + const result = client.matchProjectFromSchemaBundleName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.schemaBundlePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromSchemaBundleName', () => { + const result = client.matchInstanceFromSchemaBundleName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.schemaBundlePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableFromSchemaBundleName', () => { + const result = client.matchTableFromSchemaBundleName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.schemaBundlePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchSchemaBundleFromSchemaBundleName', () => { + const result = client.matchSchemaBundleFromSchemaBundleName(fakePath); + assert.strictEqual(result, 'schemaBundleValue'); + assert( + (client.pathTemplates.schemaBundlePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('snapshot', async () => { + const fakePath = '/rendered/path/snapshot'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + cluster: 'clusterValue', + snapshot: 'snapshotValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.snapshotPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.snapshotPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('snapshotPath', () => { + const result = client.snapshotPath( + 'projectValue', + 'instanceValue', + 'clusterValue', + 'snapshotValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.snapshotPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromSnapshotName', () => { + const result = client.matchProjectFromSnapshotName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromSnapshotName', () => { + const result = client.matchInstanceFromSnapshotName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchClusterFromSnapshotName', () => { + const result = client.matchClusterFromSnapshotName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchSnapshotFromSnapshotName', () => { + const result = client.matchSnapshotFromSnapshotName(fakePath); + assert.strictEqual(result, 'snapshotValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('table', async () => { + const fakePath = '/rendered/path/table'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.tablePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tablePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tablePath', () => { + const result = client.tablePath( + 'projectValue', + 'instanceValue', + 'tableValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tablePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromTableName', () => { + const result = client.matchProjectFromTableName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromTableName', () => { + const result = client.matchInstanceFromTableName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableFromTableName', () => { + const result = client.matchTableFromTableName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-bigtable-api/test/gapic_bigtable_table_admin_v2.ts b/packages/google-cloud-bigtable-api/test/gapic_bigtable_table_admin_v2.ts new file mode 100644 index 000000000000..eff8ed335339 --- /dev/null +++ b/packages/google-cloud-bigtable-api/test/gapic_bigtable_table_admin_v2.ts @@ -0,0 +1,7357 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import { SinonStub } from 'sinon'; +import { describe, it } from 'mocha'; +import * as bigtabletableadminModule from '../src'; + +import { PassThrough } from 'stream'; + +import { protobuf, LROperation, operationsProtos } from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, { defaults: true }); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error, +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error, +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error, +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error, +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({ done: true, value: undefined }); + } + return Promise.resolve({ done: false, value: responses![counter++] }); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2.BigtableTableAdminClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + bigtabletableadminModule.v2.BigtableTableAdminClient.servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + bigtabletableadminModule.v2.BigtableTableAdminClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new bigtabletableadminModule.v2.BigtableTableAdminClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'bigtableadmin.configured.example.com', + ); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new bigtabletableadminModule.v2.BigtableTableAdminClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = bigtabletableadminModule.v2.BigtableTableAdminClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.bigtableTableAdminStub, undefined); + await client.initialize(); + assert(client.bigtableTableAdminStub); + }); + + it('has close method for the initialized client', (done) => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.initialize().catch((err) => { + throw err; + }); + assert(client.bigtableTableAdminStub); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has close method for the non-initialized client', (done) => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.bigtableTableAdminStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('createTable', () => { + it('invokes createTable without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateTableRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Table(), + ); + client.innerApiCalls.createTable = stubSimpleCall(expectedResponse); + const [response] = await client.createTable(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTable without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateTableRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Table(), + ); + client.innerApiCalls.createTable = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTable( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ITable | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTable with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateTableRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTable = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.createTable(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTable with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateTableRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.createTable(request), expectedError); + }); + }); + + describe('getTable', () => { + it('invokes getTable without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Table(), + ); + client.innerApiCalls.getTable = stubSimpleCall(expectedResponse); + const [response] = await client.getTable(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTable without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Table(), + ); + client.innerApiCalls.getTable = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTable( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ITable | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTable with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTable = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTable(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTable with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getTable(request), expectedError); + }); + }); + + describe('deleteTable', () => { + it('invokes deleteTable without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteTable = stubSimpleCall(expectedResponse); + const [response] = await client.deleteTable(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTable without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteTable = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTable( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTable with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTable = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteTable(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTable with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteTable(request), expectedError); + }); + }); + + describe('getAuthorizedView', () => { + it('invokes getAuthorizedView without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAuthorizedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ); + client.innerApiCalls.getAuthorizedView = stubSimpleCall(expectedResponse); + const [response] = await client.getAuthorizedView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAuthorizedView without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAuthorizedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ); + client.innerApiCalls.getAuthorizedView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAuthorizedView( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IAuthorizedView | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAuthorizedView with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAuthorizedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAuthorizedView = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getAuthorizedView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAuthorizedView with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAuthorizedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getAuthorizedView(request), expectedError); + }); + }); + + describe('deleteAuthorizedView', () => { + it('invokes deleteAuthorizedView without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAuthorizedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteAuthorizedView = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteAuthorizedView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAuthorizedView without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAuthorizedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteAuthorizedView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAuthorizedView( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAuthorizedView with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAuthorizedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAuthorizedView = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteAuthorizedView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAuthorizedView with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAuthorizedViewRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteAuthorizedView(request), expectedError); + }); + }); + + describe('modifyColumnFamilies', () => { + it('invokes modifyColumnFamilies without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ModifyColumnFamiliesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ModifyColumnFamiliesRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Table(), + ); + client.innerApiCalls.modifyColumnFamilies = + stubSimpleCall(expectedResponse); + const [response] = await client.modifyColumnFamilies(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.modifyColumnFamilies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyColumnFamilies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes modifyColumnFamilies without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ModifyColumnFamiliesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ModifyColumnFamiliesRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Table(), + ); + client.innerApiCalls.modifyColumnFamilies = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.modifyColumnFamilies( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ITable | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.modifyColumnFamilies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyColumnFamilies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes modifyColumnFamilies with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ModifyColumnFamiliesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ModifyColumnFamiliesRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.modifyColumnFamilies = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.modifyColumnFamilies(request), expectedError); + const actualRequest = ( + client.innerApiCalls.modifyColumnFamilies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyColumnFamilies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes modifyColumnFamilies with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ModifyColumnFamiliesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ModifyColumnFamiliesRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.modifyColumnFamilies(request), expectedError); + }); + }); + + describe('dropRowRange', () => { + it('invokes dropRowRange without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DropRowRangeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DropRowRangeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.dropRowRange = stubSimpleCall(expectedResponse); + const [response] = await client.dropRowRange(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.dropRowRange as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.dropRowRange as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes dropRowRange without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DropRowRangeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DropRowRangeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.dropRowRange = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.dropRowRange( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.dropRowRange as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.dropRowRange as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes dropRowRange with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DropRowRangeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DropRowRangeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.dropRowRange = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.dropRowRange(request), expectedError); + const actualRequest = ( + client.innerApiCalls.dropRowRange as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.dropRowRange as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes dropRowRange with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DropRowRangeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DropRowRangeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.dropRowRange(request), expectedError); + }); + }); + + describe('generateConsistencyToken', () => { + it('invokes generateConsistencyToken without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GenerateConsistencyTokenRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GenerateConsistencyTokenRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.GenerateConsistencyTokenResponse(), + ); + client.innerApiCalls.generateConsistencyToken = + stubSimpleCall(expectedResponse); + const [response] = await client.generateConsistencyToken(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateConsistencyToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateConsistencyToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateConsistencyToken without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GenerateConsistencyTokenRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GenerateConsistencyTokenRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.GenerateConsistencyTokenResponse(), + ); + client.innerApiCalls.generateConsistencyToken = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateConsistencyToken( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateConsistencyToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateConsistencyToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateConsistencyToken with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GenerateConsistencyTokenRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GenerateConsistencyTokenRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateConsistencyToken = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.generateConsistencyToken(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.generateConsistencyToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateConsistencyToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateConsistencyToken with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GenerateConsistencyTokenRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GenerateConsistencyTokenRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.generateConsistencyToken(request), + expectedError, + ); + }); + }); + + describe('checkConsistency', () => { + it('invokes checkConsistency without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CheckConsistencyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CheckConsistencyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.CheckConsistencyResponse(), + ); + client.innerApiCalls.checkConsistency = stubSimpleCall(expectedResponse); + const [response] = await client.checkConsistency(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.checkConsistency as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkConsistency as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkConsistency without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CheckConsistencyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CheckConsistencyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.CheckConsistencyResponse(), + ); + client.innerApiCalls.checkConsistency = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkConsistency( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ICheckConsistencyResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.checkConsistency as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkConsistency as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkConsistency with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CheckConsistencyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CheckConsistencyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkConsistency = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.checkConsistency(request), expectedError); + const actualRequest = ( + client.innerApiCalls.checkConsistency as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkConsistency as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkConsistency with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CheckConsistencyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CheckConsistencyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.checkConsistency(request), expectedError); + }); + }); + + describe('getSnapshot', () => { + it('invokes getSnapshot without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetSnapshotRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Snapshot(), + ); + client.innerApiCalls.getSnapshot = stubSimpleCall(expectedResponse); + const [response] = await client.getSnapshot(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetSnapshotRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Snapshot(), + ); + client.innerApiCalls.getSnapshot = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSnapshot( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ISnapshot | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetSnapshotRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSnapshot = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getSnapshot(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetSnapshotRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getSnapshot(request), expectedError); + }); + }); + + describe('deleteSnapshot', () => { + it('invokes deleteSnapshot without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteSnapshotRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteSnapshot = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSnapshot(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteSnapshotRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteSnapshot = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSnapshot( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteSnapshotRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSnapshot = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteSnapshot(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteSnapshotRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteSnapshot(request), expectedError); + }); + }); + + describe('getBackup', () => { + it('invokes getBackup without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Backup(), + ); + client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); + const [response] = await client.getBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Backup(), + ); + client.innerApiCalls.getBackup = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackup( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IBackup | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getBackup(request), expectedError); + }); + }); + + describe('updateBackup', () => { + it('invokes updateBackup without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateBackupRequest(), + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateBackupRequest', + ['backup', 'name'], + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Backup(), + ); + client.innerApiCalls.updateBackup = stubSimpleCall(expectedResponse); + const [response] = await client.updateBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateBackupRequest(), + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateBackupRequest', + ['backup', 'name'], + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.Backup(), + ); + client.innerApiCalls.updateBackup = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackup( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IBackup | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateBackupRequest(), + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateBackupRequest', + ['backup', 'name'], + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateBackupRequest(), + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateBackupRequest', + ['backup', 'name'], + ); + request.backup.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.updateBackup(request), expectedError); + }); + }); + + describe('deleteBackup', () => { + it('invokes deleteBackup without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteBackup = stubSimpleCall(expectedResponse); + const [response] = await client.deleteBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteBackup = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackup( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteBackup(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy(), + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy(), + ); + client.innerApiCalls.getIamPolicy = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getIamPolicy(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy(), + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy(), + ); + client.innerApiCalls.setIamPolicy = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.setIamPolicy(request), expectedError); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse(), + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse(), + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.ITestIamPermissionsResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'], + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); + }); + + describe('getSchemaBundle', () => { + it('invokes getSchemaBundle without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetSchemaBundleRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ); + client.innerApiCalls.getSchemaBundle = stubSimpleCall(expectedResponse); + const [response] = await client.getSchemaBundle(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaBundle without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetSchemaBundleRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ); + client.innerApiCalls.getSchemaBundle = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSchemaBundle( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ISchemaBundle | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaBundle with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetSchemaBundleRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSchemaBundle = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getSchemaBundle(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaBundle with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetSchemaBundleRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getSchemaBundle(request), expectedError); + }); + }); + + describe('deleteSchemaBundle', () => { + it('invokes deleteSchemaBundle without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteSchemaBundleRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteSchemaBundle = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteSchemaBundle(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaBundle without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteSchemaBundleRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteSchemaBundle = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSchemaBundle( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaBundle with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteSchemaBundleRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSchemaBundle = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteSchemaBundle(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaBundle with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteSchemaBundleRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteSchemaBundle(request), expectedError); + }); + }); + + describe('createTableFromSnapshot', () => { + it('invokes createTableFromSnapshot without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableFromSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateTableFromSnapshotRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createTableFromSnapshot = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createTableFromSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createTableFromSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTableFromSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTableFromSnapshot without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableFromSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateTableFromSnapshotRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createTableFromSnapshot = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTableFromSnapshot( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createTableFromSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTableFromSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTableFromSnapshot with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableFromSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateTableFromSnapshotRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTableFromSnapshot = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createTableFromSnapshot(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createTableFromSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTableFromSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTableFromSnapshot with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableFromSnapshotRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateTableFromSnapshotRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTableFromSnapshot = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createTableFromSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createTableFromSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTableFromSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateTableFromSnapshotProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkCreateTableFromSnapshotProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateTableFromSnapshotProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateTableFromSnapshotProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateTable', () => { + it('invokes updateTable without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateTableRequest(), + ); + request.table ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateTableRequest', + ['table', 'name'], + ); + request.table.name = defaultValue1; + const expectedHeaderRequestParams = `table.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateTable = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateTable(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTable without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateTableRequest(), + ); + request.table ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateTableRequest', + ['table', 'name'], + ); + request.table.name = defaultValue1; + const expectedHeaderRequestParams = `table.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateTable = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTable( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUpdateTableMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTable with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateTableRequest(), + ); + request.table ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateTableRequest', + ['table', 'name'], + ); + request.table.name = defaultValue1; + const expectedHeaderRequestParams = `table.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTable = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateTable(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTable with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateTableRequest(), + ); + request.table ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateTableRequest', + ['table', 'name'], + ); + request.table.name = defaultValue1; + const expectedHeaderRequestParams = `table.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTable = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateTable(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateTableProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateTableProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateTableProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.checkUpdateTableProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('undeleteTable', () => { + it('invokes undeleteTable without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UndeleteTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UndeleteTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.undeleteTable = + stubLongRunningCall(expectedResponse); + const [operation] = await client.undeleteTable(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.undeleteTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeleteTable without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UndeleteTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UndeleteTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.undeleteTable = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.undeleteTable( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IUndeleteTableMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.undeleteTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeleteTable with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UndeleteTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UndeleteTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.undeleteTable = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.undeleteTable(request), expectedError); + const actualRequest = ( + client.innerApiCalls.undeleteTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeleteTable with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UndeleteTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UndeleteTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.undeleteTable = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.undeleteTable(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.undeleteTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUndeleteTableProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUndeleteTableProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUndeleteTableProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUndeleteTableProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createAuthorizedView', () => { + it('invokes createAuthorizedView without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateAuthorizedViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createAuthorizedView = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createAuthorizedView(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAuthorizedView without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateAuthorizedViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createAuthorizedView = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAuthorizedView( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAuthorizedView with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateAuthorizedViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAuthorizedView = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.createAuthorizedView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAuthorizedView with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAuthorizedViewRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateAuthorizedViewRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAuthorizedView = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createAuthorizedView(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAuthorizedViewProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateAuthorizedViewProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAuthorizedViewProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateAuthorizedViewProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateAuthorizedView', () => { + it('invokes updateAuthorizedView without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(), + ); + request.authorizedView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateAuthorizedViewRequest', + ['authorizedView', 'name'], + ); + request.authorizedView.name = defaultValue1; + const expectedHeaderRequestParams = `authorized_view.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateAuthorizedView = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAuthorizedView(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAuthorizedView without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(), + ); + request.authorizedView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateAuthorizedViewRequest', + ['authorizedView', 'name'], + ); + request.authorizedView.name = defaultValue1; + const expectedHeaderRequestParams = `authorized_view.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateAuthorizedView = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAuthorizedView( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAuthorizedView with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(), + ); + request.authorizedView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateAuthorizedViewRequest', + ['authorizedView', 'name'], + ); + request.authorizedView.name = defaultValue1; + const expectedHeaderRequestParams = `authorized_view.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAuthorizedView = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateAuthorizedView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAuthorizedView with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(), + ); + request.authorizedView ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateAuthorizedViewRequest', + ['authorizedView', 'name'], + ); + request.authorizedView.name = defaultValue1; + const expectedHeaderRequestParams = `authorized_view.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAuthorizedView = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateAuthorizedView(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAuthorizedViewProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateAuthorizedViewProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAuthorizedViewProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateAuthorizedViewProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('snapshotTable', () => { + it('invokes snapshotTable without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.SnapshotTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.SnapshotTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.snapshotTable = + stubLongRunningCall(expectedResponse); + const [operation] = await client.snapshotTable(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.snapshotTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.snapshotTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes snapshotTable without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.SnapshotTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.SnapshotTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.snapshotTable = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.snapshotTable( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.snapshotTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.snapshotTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes snapshotTable with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.SnapshotTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.SnapshotTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.snapshotTable = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.snapshotTable(request), expectedError); + const actualRequest = ( + client.innerApiCalls.snapshotTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.snapshotTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes snapshotTable with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.SnapshotTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.SnapshotTableRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.snapshotTable = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.snapshotTable(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.snapshotTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.snapshotTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSnapshotTableProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkSnapshotTableProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSnapshotTableProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkSnapshotTableProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackup', () => { + it('invokes createBackup without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateBackupRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackup without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateBackupRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackup with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateBackupRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackup = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.createBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackup with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateBackupRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackup = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateBackupProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.checkCreateBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('restoreTable', () => { + it('invokes restoreTable without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.RestoreTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.RestoreTableRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.restoreTable = stubLongRunningCall(expectedResponse); + const [operation] = await client.restoreTable(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreTable without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.RestoreTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.RestoreTableRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.restoreTable = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreTable( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreTable with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.RestoreTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.RestoreTableRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreTable = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.restoreTable(request), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreTable with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.RestoreTableRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.RestoreTableRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreTable = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.restoreTable(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestoreTableProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRestoreTableProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreTableProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.checkRestoreTableProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('copyBackup', () => { + it('invokes copyBackup without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CopyBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CopyBackupRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.copyBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.copyBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes copyBackup without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CopyBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CopyBackupRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.copyBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.copyBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes copyBackup with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CopyBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CopyBackupRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.copyBackup = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.copyBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes copyBackup with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CopyBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CopyBackupRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.copyBackup = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.copyBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCopyBackupProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCopyBackupProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCopyBackupProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.checkCopyBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createSchemaBundle', () => { + it('invokes createSchemaBundle without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateSchemaBundleRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createSchemaBundle = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createSchemaBundle(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchemaBundle without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateSchemaBundleRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createSchemaBundle = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createSchemaBundle( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.ICreateSchemaBundleMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchemaBundle with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateSchemaBundleRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSchemaBundle = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.createSchemaBundle(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchemaBundle with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateSchemaBundleRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateSchemaBundleRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSchemaBundle = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createSchemaBundle(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateSchemaBundleProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateSchemaBundleProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateSchemaBundleProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateSchemaBundleProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateSchemaBundle', () => { + it('invokes updateSchemaBundle without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateSchemaBundleRequest(), + ); + request.schemaBundle ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateSchemaBundleRequest', + ['schemaBundle', 'name'], + ); + request.schemaBundle.name = defaultValue1; + const expectedHeaderRequestParams = `schema_bundle.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateSchemaBundle = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateSchemaBundle(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaBundle without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateSchemaBundleRequest(), + ); + request.schemaBundle ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateSchemaBundleRequest', + ['schemaBundle', 'name'], + ); + request.schemaBundle.name = defaultValue1; + const expectedHeaderRequestParams = `schema_bundle.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateSchemaBundle = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSchemaBundle( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ISchemaBundle, + protos.google.bigtable.admin.v2.IUpdateSchemaBundleMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaBundle with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateSchemaBundleRequest(), + ); + request.schemaBundle ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateSchemaBundleRequest', + ['schemaBundle', 'name'], + ); + request.schemaBundle.name = defaultValue1; + const expectedHeaderRequestParams = `schema_bundle.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSchemaBundle = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateSchemaBundle(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaBundle with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateSchemaBundleRequest(), + ); + request.schemaBundle ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.UpdateSchemaBundleRequest', + ['schemaBundle', 'name'], + ); + request.schemaBundle.name = defaultValue1; + const expectedHeaderRequestParams = `schema_bundle.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSchemaBundle = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateSchemaBundle(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSchemaBundle as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchemaBundle as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateSchemaBundleProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = { type_url: 'url', value: Buffer.from('') }; + expectedResponse.metadata = { type_url: 'url', value: Buffer.from('') }; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateSchemaBundleProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateSchemaBundleProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateSchemaBundleProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listTables', () => { + it('invokes listTables without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + ]; + client.innerApiCalls.listTables = stubSimpleCall(expectedResponse); + const [response] = await client.listTables(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTables without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + ]; + client.innerApiCalls.listTables = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTables( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ITable[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTables with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTables = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listTables(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTablesStream without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + ]; + client.descriptors.page.listTables.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTablesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.Table[] = []; + stream.on('data', (response: protos.google.bigtable.admin.v2.Table) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listTables.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTables, request), + ); + assert( + (client.descriptors.page.listTables.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listTablesStream with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTables.createStream = stubPageStreamingCall( + undefined, + expectedError, + ); + const stream = client.listTablesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.Table[] = []; + stream.on('data', (response: protos.google.bigtable.admin.v2.Table) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listTables.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTables, request), + ); + assert( + (client.descriptors.page.listTables.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listTables without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + ]; + client.descriptors.page.listTables.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.ITable[] = []; + const iterable = client.listTablesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTables.asyncIterate as SinonStub).getCall( + 0, + ).args[1], + request, + ); + assert( + (client.descriptors.page.listTables.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listTables with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTables.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError, + ); + const iterable = client.listTablesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.ITable[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTables.asyncIterate as SinonStub).getCall( + 0, + ).args[1], + request, + ); + assert( + (client.descriptors.page.listTables.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listAuthorizedViews', () => { + it('invokes listAuthorizedViews without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + ]; + client.innerApiCalls.listAuthorizedViews = + stubSimpleCall(expectedResponse); + const [response] = await client.listAuthorizedViews(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAuthorizedViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAuthorizedViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAuthorizedViews without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + ]; + client.innerApiCalls.listAuthorizedViews = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAuthorizedViews( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IAuthorizedView[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAuthorizedViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAuthorizedViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAuthorizedViews with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAuthorizedViews = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listAuthorizedViews(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listAuthorizedViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAuthorizedViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAuthorizedViewsStream without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + ]; + client.descriptors.page.listAuthorizedViews.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAuthorizedViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.AuthorizedView[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.AuthorizedView) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listAuthorizedViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAuthorizedViews, request), + ); + assert( + (client.descriptors.page.listAuthorizedViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listAuthorizedViewsStream with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAuthorizedViews.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAuthorizedViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.AuthorizedView[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.AuthorizedView) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAuthorizedViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAuthorizedViews, request), + ); + assert( + (client.descriptors.page.listAuthorizedViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listAuthorizedViews without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView(), + ), + ]; + client.descriptors.page.listAuthorizedViews.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.IAuthorizedView[] = []; + const iterable = client.listAuthorizedViewsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAuthorizedViews.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listAuthorizedViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listAuthorizedViews with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAuthorizedViews.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAuthorizedViewsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.IAuthorizedView[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAuthorizedViews.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listAuthorizedViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listSnapshots', () => { + it('invokes listSnapshots without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSnapshotsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSnapshotsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + ]; + client.innerApiCalls.listSnapshots = stubSimpleCall(expectedResponse); + const [response] = await client.listSnapshots(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshots without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSnapshotsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSnapshotsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + ]; + client.innerApiCalls.listSnapshots = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSnapshots( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ISnapshot[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshots with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSnapshotsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSnapshotsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSnapshots = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listSnapshots(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshotsStream without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSnapshotsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSnapshotsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + ]; + client.descriptors.page.listSnapshots.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listSnapshotsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.Snapshot[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.Snapshot) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSnapshots, request), + ); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listSnapshotsStream with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSnapshotsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSnapshotsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSnapshots.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listSnapshotsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.Snapshot[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.Snapshot) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSnapshots, request), + ); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listSnapshots without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSnapshotsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSnapshotsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Snapshot()), + ]; + client.descriptors.page.listSnapshots.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.ISnapshot[] = []; + const iterable = client.listSnapshotsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listSnapshots.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listSnapshots with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSnapshotsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSnapshotsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSnapshots.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSnapshotsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.ISnapshot[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listSnapshots.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listBackups', () => { + it('invokes listBackups without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); + const [response] = await client.listBackups(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + ]; + client.innerApiCalls.listBackups = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackups( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IBackup[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackups = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listBackups(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupsStream without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + ]; + client.descriptors.page.listBackups.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.Backup[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.Backup) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackups, request), + ); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listBackupsStream with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.createStream = stubPageStreamingCall( + undefined, + expectedError, + ); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.Backup[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.Backup) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackups, request), + ); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listBackups without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Backup()), + ]; + client.descriptors.page.listBackups.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.IBackup[] = []; + const iterable = client.listBackupsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub).getCall( + 0, + ).args[1], + request, + ); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listBackups with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError, + ); + const iterable = client.listBackupsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.IBackup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub).getCall( + 0, + ).args[1], + request, + ); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listSchemaBundles', () => { + it('invokes listSchemaBundles without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSchemaBundlesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSchemaBundlesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + ]; + client.innerApiCalls.listSchemaBundles = stubSimpleCall(expectedResponse); + const [response] = await client.listSchemaBundles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSchemaBundles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSchemaBundles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaBundles without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSchemaBundlesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSchemaBundlesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + ]; + client.innerApiCalls.listSchemaBundles = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSchemaBundles( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ISchemaBundle[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSchemaBundles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSchemaBundles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaBundles with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSchemaBundlesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSchemaBundlesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSchemaBundles = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listSchemaBundles(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listSchemaBundles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSchemaBundles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaBundlesStream without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSchemaBundlesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSchemaBundlesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + ]; + client.descriptors.page.listSchemaBundles.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listSchemaBundlesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.SchemaBundle[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.SchemaBundle) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listSchemaBundles.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSchemaBundles, request), + ); + assert( + (client.descriptors.page.listSchemaBundles.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listSchemaBundlesStream with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSchemaBundlesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSchemaBundlesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSchemaBundles.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listSchemaBundlesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.SchemaBundle[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.SchemaBundle) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listSchemaBundles.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSchemaBundles, request), + ); + assert( + (client.descriptors.page.listSchemaBundles.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listSchemaBundles without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSchemaBundlesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSchemaBundlesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.SchemaBundle(), + ), + ]; + client.descriptors.page.listSchemaBundles.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.ISchemaBundle[] = []; + const iterable = client.listSchemaBundlesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listSchemaBundles.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listSchemaBundles.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listSchemaBundles with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListSchemaBundlesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListSchemaBundlesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSchemaBundles.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSchemaBundlesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.ISchemaBundle[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listSchemaBundles.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listSchemaBundles.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('Path templates', () => { + describe('appProfile', async () => { + const fakePath = '/rendered/path/appProfile'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + app_profile: 'appProfileValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.appProfilePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.appProfilePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('appProfilePath', () => { + const result = client.appProfilePath( + 'projectValue', + 'instanceValue', + 'appProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.appProfilePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAppProfileName', () => { + const result = client.matchProjectFromAppProfileName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.appProfilePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromAppProfileName', () => { + const result = client.matchInstanceFromAppProfileName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.appProfilePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAppProfileFromAppProfileName', () => { + const result = client.matchAppProfileFromAppProfileName(fakePath); + assert.strictEqual(result, 'appProfileValue'); + assert( + (client.pathTemplates.appProfilePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('authorizedView', async () => { + const fakePath = '/rendered/path/authorizedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + authorized_view: 'authorizedViewValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.authorizedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.authorizedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('authorizedViewPath', () => { + const result = client.authorizedViewPath( + 'projectValue', + 'instanceValue', + 'tableValue', + 'authorizedViewValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.authorizedViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAuthorizedViewName', () => { + const result = client.matchProjectFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromAuthorizedViewName', () => { + const result = client.matchInstanceFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableFromAuthorizedViewName', () => { + const result = client.matchTableFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAuthorizedViewFromAuthorizedViewName', () => { + const result = + client.matchAuthorizedViewFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'authorizedViewValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backup', async () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + cluster: 'clusterValue', + backup: 'backupValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'instanceValue', + 'clusterValue', + 'backupValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromBackupName', () => { + const result = client.matchInstanceFromBackupName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchClusterFromBackupName', () => { + const result = client.matchClusterFromBackupName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('cluster', async () => { + const fakePath = '/rendered/path/cluster'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + cluster: 'clusterValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.clusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.clusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('clusterPath', () => { + const result = client.clusterPath( + 'projectValue', + 'instanceValue', + 'clusterValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.clusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromClusterName', () => { + const result = client.matchProjectFromClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromClusterName', () => { + const result = client.matchInstanceFromClusterName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchClusterFromClusterName', () => { + const result = client.matchClusterFromClusterName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('hotTablet', async () => { + const fakePath = '/rendered/path/hotTablet'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + cluster: 'clusterValue', + hot_tablet: 'hotTabletValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.hotTabletPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.hotTabletPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('hotTabletPath', () => { + const result = client.hotTabletPath( + 'projectValue', + 'instanceValue', + 'clusterValue', + 'hotTabletValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.hotTabletPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromHotTabletName', () => { + const result = client.matchProjectFromHotTabletName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.hotTabletPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromHotTabletName', () => { + const result = client.matchInstanceFromHotTabletName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.hotTabletPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchClusterFromHotTabletName', () => { + const result = client.matchClusterFromHotTabletName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.hotTabletPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchHotTabletFromHotTabletName', () => { + const result = client.matchHotTabletFromHotTabletName(fakePath); + assert.strictEqual(result, 'hotTabletValue'); + assert( + (client.pathTemplates.hotTabletPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('instance', async () => { + const fakePath = '/rendered/path/instance'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.instancePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.instancePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath('projectValue', 'instanceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('logicalView', async () => { + const fakePath = '/rendered/path/logicalView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + logical_view: 'logicalViewValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.logicalViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.logicalViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('logicalViewPath', () => { + const result = client.logicalViewPath( + 'projectValue', + 'instanceValue', + 'logicalViewValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.logicalViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromLogicalViewName', () => { + const result = client.matchProjectFromLogicalViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.logicalViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromLogicalViewName', () => { + const result = client.matchInstanceFromLogicalViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.logicalViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLogicalViewFromLogicalViewName', () => { + const result = client.matchLogicalViewFromLogicalViewName(fakePath); + assert.strictEqual(result, 'logicalViewValue'); + assert( + (client.pathTemplates.logicalViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('materializedView', async () => { + const fakePath = '/rendered/path/materializedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + materialized_view: 'materializedViewValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.materializedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.materializedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('materializedViewPath', () => { + const result = client.materializedViewPath( + 'projectValue', + 'instanceValue', + 'materializedViewValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.materializedViewPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMaterializedViewName', () => { + const result = client.matchProjectFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromMaterializedViewName', () => { + const result = client.matchInstanceFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchMaterializedViewFromMaterializedViewName', () => { + const result = + client.matchMaterializedViewFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'materializedViewValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('project', async () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('schemaBundle', async () => { + const fakePath = '/rendered/path/schemaBundle'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + schema_bundle: 'schemaBundleValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.schemaBundlePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.schemaBundlePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('schemaBundlePath', () => { + const result = client.schemaBundlePath( + 'projectValue', + 'instanceValue', + 'tableValue', + 'schemaBundleValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.schemaBundlePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromSchemaBundleName', () => { + const result = client.matchProjectFromSchemaBundleName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.schemaBundlePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromSchemaBundleName', () => { + const result = client.matchInstanceFromSchemaBundleName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.schemaBundlePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableFromSchemaBundleName', () => { + const result = client.matchTableFromSchemaBundleName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.schemaBundlePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchSchemaBundleFromSchemaBundleName', () => { + const result = client.matchSchemaBundleFromSchemaBundleName(fakePath); + assert.strictEqual(result, 'schemaBundleValue'); + assert( + (client.pathTemplates.schemaBundlePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('snapshot', async () => { + const fakePath = '/rendered/path/snapshot'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + cluster: 'clusterValue', + snapshot: 'snapshotValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.snapshotPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.snapshotPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('snapshotPath', () => { + const result = client.snapshotPath( + 'projectValue', + 'instanceValue', + 'clusterValue', + 'snapshotValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.snapshotPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromSnapshotName', () => { + const result = client.matchProjectFromSnapshotName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromSnapshotName', () => { + const result = client.matchInstanceFromSnapshotName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchClusterFromSnapshotName', () => { + const result = client.matchClusterFromSnapshotName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchSnapshotFromSnapshotName', () => { + const result = client.matchSnapshotFromSnapshotName(fakePath); + assert.strictEqual(result, 'snapshotValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('table', async () => { + const fakePath = '/rendered/path/table'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.tablePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tablePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tablePath', () => { + const result = client.tablePath( + 'projectValue', + 'instanceValue', + 'tableValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tablePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromTableName', () => { + const result = client.matchProjectFromTableName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromTableName', () => { + const result = client.matchInstanceFromTableName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableFromTableName', () => { + const result = client.matchTableFromTableName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-bigtable-api/test/gapic_bigtable_v2.ts b/packages/google-cloud-bigtable-api/test/gapic_bigtable_v2.ts new file mode 100644 index 000000000000..e60aa7107295 --- /dev/null +++ b/packages/google-cloud-bigtable-api/test/gapic_bigtable_v2.ts @@ -0,0 +1,2175 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import { SinonStub } from 'sinon'; +import { describe, it } from 'mocha'; +import * as bigtableModule from '../src'; + +import { PassThrough } from 'stream'; + +import { protobuf } from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, { defaults: true }); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubServerStreamingCall( + response?: ResponseType, + error?: Error, +) { + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // write something to the stream to trigger transformStub and send the response back to the client + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + return sinon.stub().returns(mockStream); +} + +describe('v2.BigtableClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new bigtableModule.v2.BigtableClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtable.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new bigtableModule.v2.BigtableClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = bigtableModule.v2.BigtableClient.servicePath; + assert.strictEqual(servicePath, 'bigtable.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = bigtableModule.v2.BigtableClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtable.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new bigtableModule.v2.BigtableClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtable.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new bigtableModule.v2.BigtableClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtable.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new bigtableModule.v2.BigtableClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtable.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new bigtableModule.v2.BigtableClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtable.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new bigtableModule.v2.BigtableClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = bigtableModule.v2.BigtableClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new bigtableModule.v2.BigtableClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new bigtableModule.v2.BigtableClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.bigtableStub, undefined); + await client.initialize(); + assert(client.bigtableStub); + }); + + it('has close method for the initialized client', (done) => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.initialize().catch((err) => { + throw err; + }); + assert(client.bigtableStub); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has close method for the non-initialized client', (done) => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.bigtableStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('mutateRow', () => { + it('invokes mutateRow without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowResponse(), + ); + client.innerApiCalls.mutateRow = stubSimpleCall(expectedResponse); + const [response] = await client.mutateRow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.mutateRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateRow without error using callback', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowResponse(), + ); + client.innerApiCalls.mutateRow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.mutateRow( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.v2.IMutateRowResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.mutateRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateRow with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedError = new Error('expected'); + client.innerApiCalls.mutateRow = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.mutateRow(request), expectedError); + const actualRequest = ( + client.innerApiCalls.mutateRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateRow with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.mutateRow(request), expectedError); + }); + }); + + describe('checkAndMutateRow', () => { + it('invokes checkAndMutateRow without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowResponse(), + ); + client.innerApiCalls.checkAndMutateRow = stubSimpleCall(expectedResponse); + const [response] = await client.checkAndMutateRow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.checkAndMutateRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkAndMutateRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAndMutateRow without error using callback', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowResponse(), + ); + client.innerApiCalls.checkAndMutateRow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkAndMutateRow( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.v2.ICheckAndMutateRowResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.checkAndMutateRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkAndMutateRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAndMutateRow with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedError = new Error('expected'); + client.innerApiCalls.checkAndMutateRow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.checkAndMutateRow(request), expectedError); + const actualRequest = ( + client.innerApiCalls.checkAndMutateRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkAndMutateRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAndMutateRow with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.checkAndMutateRow(request), expectedError); + }); + }); + + describe('pingAndWarm', () => { + it('invokes pingAndWarm without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmResponse(), + ); + client.innerApiCalls.pingAndWarm = stubSimpleCall(expectedResponse); + const [response] = await client.pingAndWarm(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pingAndWarm as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pingAndWarm as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pingAndWarm without error using callback', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmResponse(), + ); + client.innerApiCalls.pingAndWarm = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pingAndWarm( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.v2.IPingAndWarmResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pingAndWarm as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pingAndWarm as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pingAndWarm with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedError = new Error('expected'); + client.innerApiCalls.pingAndWarm = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.pingAndWarm(request), expectedError); + const actualRequest = ( + client.innerApiCalls.pingAndWarm as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pingAndWarm as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pingAndWarm with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.pingAndWarm(request), expectedError); + }); + }); + + describe('readModifyWriteRow', () => { + it('invokes readModifyWriteRow without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowResponse(), + ); + client.innerApiCalls.readModifyWriteRow = + stubSimpleCall(expectedResponse); + const [response] = await client.readModifyWriteRow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readModifyWriteRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readModifyWriteRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readModifyWriteRow without error using callback', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowResponse(), + ); + client.innerApiCalls.readModifyWriteRow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readModifyWriteRow( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.v2.IReadModifyWriteRowResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readModifyWriteRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readModifyWriteRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readModifyWriteRow with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedError = new Error('expected'); + client.innerApiCalls.readModifyWriteRow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.readModifyWriteRow(request), expectedError); + const actualRequest = ( + client.innerApiCalls.readModifyWriteRow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readModifyWriteRow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readModifyWriteRow with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.readModifyWriteRow(request), expectedError); + }); + }); + + describe('prepareQuery', () => { + it('invokes prepareQuery without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PrepareQueryRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.PrepareQueryResponse(), + ); + client.innerApiCalls.prepareQuery = stubSimpleCall(expectedResponse); + const [response] = await client.prepareQuery(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.prepareQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.prepareQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes prepareQuery without error using callback', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PrepareQueryRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.PrepareQueryResponse(), + ); + client.innerApiCalls.prepareQuery = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.prepareQuery( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.v2.IPrepareQueryResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.prepareQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.prepareQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes prepareQuery with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PrepareQueryRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedError = new Error('expected'); + client.innerApiCalls.prepareQuery = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.prepareQuery(request), expectedError); + const actualRequest = ( + client.innerApiCalls.prepareQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.prepareQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes prepareQuery with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PrepareQueryRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.prepareQuery(request), expectedError); + }); + }); + + describe('readRows', () => { + it('invokes readRows without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsRequest(), + ); + // path template: {name=projects/*/instances/*}/** + request.materializedViewName = 'projects/value/instances/value/value'; + const expectedHeaderRequestParams = + 'name=projects%2Fvalue%2Finstances%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsResponse(), + ); + client.innerApiCalls.readRows = stubServerStreamingCall(expectedResponse); + const stream = client.readRows(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ReadRowsResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readRows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readRows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readRows without error and gaxServerStreamingRetries enabled', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + gaxServerStreamingRetries: true, + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsRequest(), + ); + // path template: {name=projects/*/instances/*}/** + request.materializedViewName = 'projects/value/instances/value/value'; + const expectedHeaderRequestParams = + 'name=projects%2Fvalue%2Finstances%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsResponse(), + ); + client.innerApiCalls.readRows = stubServerStreamingCall(expectedResponse); + const stream = client.readRows(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ReadRowsResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readRows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readRows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readRows with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsRequest(), + ); + // path template: {name=projects/*/instances/*}/** + request.materializedViewName = 'projects/value/instances/value/value'; + const expectedHeaderRequestParams = + 'name=projects%2Fvalue%2Finstances%2Fvalue'; + const expectedError = new Error('expected'); + client.innerApiCalls.readRows = stubServerStreamingCall( + undefined, + expectedError, + ); + const stream = client.readRows(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ReadRowsResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = ( + client.innerApiCalls.readRows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readRows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readRows with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadRowsRequest(), + ); + // path template: {name=projects/*/instances/*}/** + request.materializedViewName = 'projects/value/instances/value/value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + const stream = client.readRows(request, { + retryRequestOptions: { noResponseRetries: 0 }, + }); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ReadRowsResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new bigtableModule.v2.BigtableClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + + describe('sampleRowKeys', () => { + it('invokes sampleRowKeys without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysRequest(), + ); + // path template: {name=projects/*/instances/*}/** + request.materializedViewName = 'projects/value/instances/value/value'; + const expectedHeaderRequestParams = + 'name=projects%2Fvalue%2Finstances%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysResponse(), + ); + client.innerApiCalls.sampleRowKeys = + stubServerStreamingCall(expectedResponse); + const stream = client.sampleRowKeys(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.SampleRowKeysResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.sampleRowKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.sampleRowKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sampleRowKeys without error and gaxServerStreamingRetries enabled', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + gaxServerStreamingRetries: true, + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysRequest(), + ); + // path template: {name=projects/*/instances/*}/** + request.materializedViewName = 'projects/value/instances/value/value'; + const expectedHeaderRequestParams = + 'name=projects%2Fvalue%2Finstances%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysResponse(), + ); + client.innerApiCalls.sampleRowKeys = + stubServerStreamingCall(expectedResponse); + const stream = client.sampleRowKeys(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.SampleRowKeysResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.sampleRowKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.sampleRowKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sampleRowKeys with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysRequest(), + ); + // path template: {name=projects/*/instances/*}/** + request.materializedViewName = 'projects/value/instances/value/value'; + const expectedHeaderRequestParams = + 'name=projects%2Fvalue%2Finstances%2Fvalue'; + const expectedError = new Error('expected'); + client.innerApiCalls.sampleRowKeys = stubServerStreamingCall( + undefined, + expectedError, + ); + const stream = client.sampleRowKeys(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.SampleRowKeysResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = ( + client.innerApiCalls.sampleRowKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.sampleRowKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sampleRowKeys with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.SampleRowKeysRequest(), + ); + // path template: {name=projects/*/instances/*}/** + request.materializedViewName = 'projects/value/instances/value/value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + const stream = client.sampleRowKeys(request, { + retryRequestOptions: { noResponseRetries: 0 }, + }); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.SampleRowKeysResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new bigtableModule.v2.BigtableClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + + describe('mutateRows', () => { + it('invokes mutateRows without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsResponse(), + ); + client.innerApiCalls.mutateRows = + stubServerStreamingCall(expectedResponse); + const stream = client.mutateRows(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.MutateRowsResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.mutateRows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateRows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateRows without error and gaxServerStreamingRetries enabled', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + gaxServerStreamingRetries: true, + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsResponse(), + ); + client.innerApiCalls.mutateRows = + stubServerStreamingCall(expectedResponse); + const stream = client.mutateRows(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.MutateRowsResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.mutateRows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateRows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateRows with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedHeaderRequestParams = + 'table_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue'; + const expectedError = new Error('expected'); + client.innerApiCalls.mutateRows = stubServerStreamingCall( + undefined, + expectedError, + ); + const stream = client.mutateRows(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.MutateRowsResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = ( + client.innerApiCalls.mutateRows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateRows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateRows with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowsRequest(), + ); + // path template: {table_name=projects/*/instances/*/tables/*}/** + request.authorizedViewName = + 'projects/value/instances/value/tables/value/value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + const stream = client.mutateRows(request, { + retryRequestOptions: { noResponseRetries: 0 }, + }); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.MutateRowsResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new bigtableModule.v2.BigtableClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + + describe('generateInitialChangeStreamPartitions', () => { + it('invokes generateInitialChangeStreamPartitions without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest', + ['tableName'], + ); + request.tableName = defaultValue1; + const expectedHeaderRequestParams = `table_name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(), + ); + client.innerApiCalls.generateInitialChangeStreamPartitions = + stubServerStreamingCall(expectedResponse); + const stream = client.generateInitialChangeStreamPartitions(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + ( + response: protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, + ) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateInitialChangeStreamPartitions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateInitialChangeStreamPartitions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateInitialChangeStreamPartitions without error and gaxServerStreamingRetries enabled', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + gaxServerStreamingRetries: true, + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest', + ['tableName'], + ); + request.tableName = defaultValue1; + const expectedHeaderRequestParams = `table_name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(), + ); + client.innerApiCalls.generateInitialChangeStreamPartitions = + stubServerStreamingCall(expectedResponse); + const stream = client.generateInitialChangeStreamPartitions(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + ( + response: protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, + ) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateInitialChangeStreamPartitions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateInitialChangeStreamPartitions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateInitialChangeStreamPartitions with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest', + ['tableName'], + ); + request.tableName = defaultValue1; + const expectedHeaderRequestParams = `table_name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateInitialChangeStreamPartitions = + stubServerStreamingCall(undefined, expectedError); + const stream = client.generateInitialChangeStreamPartitions(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + ( + response: protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, + ) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = ( + client.innerApiCalls.generateInitialChangeStreamPartitions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateInitialChangeStreamPartitions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateInitialChangeStreamPartitions with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest', + ['tableName'], + ); + request.tableName = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + const stream = client.generateInitialChangeStreamPartitions(request, { + retryRequestOptions: { noResponseRetries: 0 }, + }); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + ( + response: protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, + ) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new bigtableModule.v2.BigtableClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + + describe('readChangeStream', () => { + it('invokes readChangeStream without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadChangeStreamRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.v2.ReadChangeStreamRequest', + ['tableName'], + ); + request.tableName = defaultValue1; + const expectedHeaderRequestParams = `table_name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.ReadChangeStreamResponse(), + ); + client.innerApiCalls.readChangeStream = + stubServerStreamingCall(expectedResponse); + const stream = client.readChangeStream(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ReadChangeStreamResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readChangeStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readChangeStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readChangeStream without error and gaxServerStreamingRetries enabled', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + gaxServerStreamingRetries: true, + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadChangeStreamRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.v2.ReadChangeStreamRequest', + ['tableName'], + ); + request.tableName = defaultValue1; + const expectedHeaderRequestParams = `table_name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.ReadChangeStreamResponse(), + ); + client.innerApiCalls.readChangeStream = + stubServerStreamingCall(expectedResponse); + const stream = client.readChangeStream(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ReadChangeStreamResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readChangeStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readChangeStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readChangeStream with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadChangeStreamRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.v2.ReadChangeStreamRequest', + ['tableName'], + ); + request.tableName = defaultValue1; + const expectedHeaderRequestParams = `table_name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.readChangeStream = stubServerStreamingCall( + undefined, + expectedError, + ); + const stream = client.readChangeStream(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ReadChangeStreamResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = ( + client.innerApiCalls.readChangeStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readChangeStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readChangeStream with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadChangeStreamRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.v2.ReadChangeStreamRequest', + ['tableName'], + ); + request.tableName = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + const stream = client.readChangeStream(request, { + retryRequestOptions: { noResponseRetries: 0 }, + }); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ReadChangeStreamResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new bigtableModule.v2.BigtableClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + + describe('executeQuery', () => { + it('invokes executeQuery without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ExecuteQueryRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.ExecuteQueryResponse(), + ); + client.innerApiCalls.executeQuery = + stubServerStreamingCall(expectedResponse); + const stream = client.executeQuery(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ExecuteQueryResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.executeQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.executeQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeQuery without error and gaxServerStreamingRetries enabled', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + gaxServerStreamingRetries: true, + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ExecuteQueryRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.ExecuteQueryResponse(), + ); + client.innerApiCalls.executeQuery = + stubServerStreamingCall(expectedResponse); + const stream = client.executeQuery(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ExecuteQueryResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.executeQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.executeQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeQuery with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ExecuteQueryRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedHeaderRequestParams = 'app_profile_id=value'; + const expectedError = new Error('expected'); + client.innerApiCalls.executeQuery = stubServerStreamingCall( + undefined, + expectedError, + ); + const stream = client.executeQuery(request); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ExecuteQueryResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = ( + client.innerApiCalls.executeQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.executeQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeQuery with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ExecuteQueryRequest(), + ); + // path template is empty + request.appProfileId = 'value'; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + const stream = client.executeQuery(request, { + retryRequestOptions: { noResponseRetries: 0 }, + }); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.bigtable.v2.ExecuteQueryResponse) => { + resolve(response); + }, + ); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new bigtableModule.v2.BigtableClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + + describe('Path templates', () => { + describe('authorizedView', async () => { + const fakePath = '/rendered/path/authorizedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + authorized_view: 'authorizedViewValue', + }; + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.authorizedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.authorizedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('authorizedViewPath', () => { + const result = client.authorizedViewPath( + 'projectValue', + 'instanceValue', + 'tableValue', + 'authorizedViewValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.authorizedViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAuthorizedViewName', () => { + const result = client.matchProjectFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromAuthorizedViewName', () => { + const result = client.matchInstanceFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableFromAuthorizedViewName', () => { + const result = client.matchTableFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAuthorizedViewFromAuthorizedViewName', () => { + const result = + client.matchAuthorizedViewFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'authorizedViewValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('instance', async () => { + const fakePath = '/rendered/path/instance'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + }; + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.instancePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.instancePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath('projectValue', 'instanceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('materializedView', async () => { + const fakePath = '/rendered/path/materializedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + materialized_view: 'materializedViewValue', + }; + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.materializedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.materializedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('materializedViewPath', () => { + const result = client.materializedViewPath( + 'projectValue', + 'instanceValue', + 'materializedViewValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.materializedViewPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMaterializedViewName', () => { + const result = client.matchProjectFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromMaterializedViewName', () => { + const result = client.matchInstanceFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchMaterializedViewFromMaterializedViewName', () => { + const result = + client.matchMaterializedViewFromMaterializedViewName(fakePath); + assert.strictEqual(result, 'materializedViewValue'); + assert( + (client.pathTemplates.materializedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('table', async () => { + const fakePath = '/rendered/path/table'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + }; + const client = new bigtableModule.v2.BigtableClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.tablePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tablePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tablePath', () => { + const result = client.tablePath( + 'projectValue', + 'instanceValue', + 'tableValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tablePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromTableName', () => { + const result = client.matchProjectFromTableName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInstanceFromTableName', () => { + const result = client.matchInstanceFromTableName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableFromTableName', () => { + const result = client.matchTableFromTableName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.tablePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-bigtable-api/tsconfig.json b/packages/google-cloud-bigtable-api/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/packages/google-cloud-bigtable-api/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/packages/google-cloud-bigtable-api/webpack.config.js b/packages/google-cloud-bigtable-api/webpack.config.js new file mode 100644 index 000000000000..cce59a43aba5 --- /dev/null +++ b/packages/google-cloud-bigtable-api/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'BigtableInstanceAdmin', + filename: './bigtable-instance-admin.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +};
include:samples/generated/v2/bigtable.read_change_stream.jsinclude:samples/generated/v2/bigtable.execute_query.jsinclude:samples/generated/v2/bigtable_instance_admin.get_instance.jsinclude:samples/generated/v2/bigtable_instance_admin.list_instances.jsinclude:samples/generated/v2/bigtable_instance_admin.update_instance.jsinclude:samples/generated/v2/bigtable_instance_admin.delete_instance.jsinclude:samples/generated/v2/bigtable_instance_admin.get_cluster.jsinclude:samples/generated/v2/bigtable_instance_admin.list_clusters.jsinclude:samples/generated/v2/bigtable_instance_admin.delete_cluster.jsinclude:samples/generated/v2/bigtable_instance_admin.create_app_profile.jsinclude:samples/generated/v2/bigtable_instance_admin.get_app_profile.jsinclude:samples/generated/v2/bigtable_instance_admin.delete_app_profile.jsinclude:samples/generated/v2/bigtable_instance_admin.get_iam_policy.jsinclude:samples/generated/v2/bigtable_instance_admin.set_iam_policy.jsinclude:samples/generated/v2/bigtable_instance_admin.test_iam_permissions.jsinclude:samples/generated/v2/bigtable_instance_admin.get_logical_view.jsinclude:samples/generated/v2/bigtable_instance_admin.delete_logical_view.jsinclude:samples/generated/v2/bigtable_instance_admin.get_materialized_view.jsinclude:samples/generated/v2/bigtable_instance_admin.delete_materialized_view.jsinclude:samples/generated/v2/bigtable_instance_admin.create_instance.jsinclude:samples/generated/v2/bigtable_instance_admin.create_instance.jsinclude:samples/generated/v2/bigtable_instance_admin.partial_update_instance.jsinclude:samples/generated/v2/bigtable_instance_admin.partial_update_instance.jsinclude:samples/generated/v2/bigtable_instance_admin.create_cluster.jsinclude:samples/generated/v2/bigtable_instance_admin.create_cluster.jsinclude:samples/generated/v2/bigtable_instance_admin.update_cluster.jsinclude:samples/generated/v2/bigtable_instance_admin.update_cluster.jsinclude:samples/generated/v2/bigtable_instance_admin.partial_update_cluster.jsinclude:samples/generated/v2/bigtable_instance_admin.partial_update_cluster.jsinclude:samples/generated/v2/bigtable_instance_admin.update_app_profile.jsinclude:samples/generated/v2/bigtable_instance_admin.update_app_profile.jsinclude:samples/generated/v2/bigtable_instance_admin.create_logical_view.jsinclude:samples/generated/v2/bigtable_instance_admin.create_logical_view.jsinclude:samples/generated/v2/bigtable_instance_admin.update_logical_view.jsinclude:samples/generated/v2/bigtable_instance_admin.update_logical_view.jsinclude:samples/generated/v2/bigtable_instance_admin.create_materialized_view.jsinclude:samples/generated/v2/bigtable_instance_admin.create_materialized_view.jsinclude:samples/generated/v2/bigtable_instance_admin.update_materialized_view.jsinclude:samples/generated/v2/bigtable_instance_admin.update_materialized_view.jsinclude:samples/generated/v2/bigtable_instance_admin.list_app_profiles.jsinclude:samples/generated/v2/bigtable_instance_admin.list_hot_tablets.jsinclude:samples/generated/v2/bigtable_instance_admin.list_logical_views.jsinclude:samples/generated/v2/bigtable_instance_admin.list_materialized_views.jsinclude:samples/generated/v2/bigtable_table_admin.create_table.jsinclude:samples/generated/v2/bigtable_table_admin.get_table.jsinclude:samples/generated/v2/bigtable_table_admin.delete_table.jsinclude:samples/generated/v2/bigtable_table_admin.get_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.delete_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.modify_column_families.jsinclude:samples/generated/v2/bigtable_table_admin.drop_row_range.jsinclude:samples/generated/v2/bigtable_table_admin.generate_consistency_token.jsinclude:samples/generated/v2/bigtable_table_admin.check_consistency.jsinclude:samples/generated/v2/bigtable_table_admin.get_snapshot.jsinclude:samples/generated/v2/bigtable_table_admin.delete_snapshot.jsinclude:samples/generated/v2/bigtable_table_admin.get_backup.jsinclude:samples/generated/v2/bigtable_table_admin.update_backup.jsinclude:samples/generated/v2/bigtable_table_admin.delete_backup.jsinclude:samples/generated/v2/bigtable_table_admin.get_iam_policy.jsinclude:samples/generated/v2/bigtable_table_admin.set_iam_policy.jsinclude:samples/generated/v2/bigtable_table_admin.test_iam_permissions.jsinclude:samples/generated/v2/bigtable_table_admin.get_schema_bundle.jsinclude:samples/generated/v2/bigtable_table_admin.delete_schema_bundle.jsinclude:samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.jsinclude:samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.jsinclude:samples/generated/v2/bigtable_table_admin.update_table.jsinclude:samples/generated/v2/bigtable_table_admin.update_table.jsinclude:samples/generated/v2/bigtable_table_admin.undelete_table.jsinclude:samples/generated/v2/bigtable_table_admin.undelete_table.jsinclude:samples/generated/v2/bigtable_table_admin.create_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.create_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.update_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.update_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.snapshot_table.jsinclude:samples/generated/v2/bigtable_table_admin.snapshot_table.jsinclude:samples/generated/v2/bigtable_table_admin.create_backup.jsinclude:samples/generated/v2/bigtable_table_admin.create_backup.jsinclude:samples/generated/v2/bigtable_table_admin.restore_table.jsinclude:samples/generated/v2/bigtable_table_admin.restore_table.jsinclude:samples/generated/v2/bigtable_table_admin.copy_backup.jsinclude:samples/generated/v2/bigtable_table_admin.copy_backup.jsinclude:samples/generated/v2/bigtable_table_admin.create_schema_bundle.jsinclude:samples/generated/v2/bigtable_table_admin.create_schema_bundle.jsinclude:samples/generated/v2/bigtable_table_admin.update_schema_bundle.jsinclude:samples/generated/v2/bigtable_table_admin.update_schema_bundle.jsinclude:samples/generated/v2/bigtable_table_admin.list_tables.jsinclude:samples/generated/v2/bigtable_table_admin.list_authorized_views.jsinclude:samples/generated/v2/bigtable_table_admin.list_snapshots.jsinclude:samples/generated/v2/bigtable_table_admin.list_backups.jsinclude:samples/generated/v2/bigtable_table_admin.list_schema_bundles.js